1st auto commit with script

This commit is contained in:
2026-03-07 17:23:29 +00:00
parent a8e26b4cd1
commit 027a303af1
3 changed files with 1 additions and 18 deletions

View File

@@ -3,10 +3,6 @@
"""Mailcow check for domains""" """Mailcow check for domains"""
from pprint import pprint
from cmk.utils import debug
# import necessary elements from API version 2 # import necessary elements from API version 2
from cmk.agent_based.v2 import ( from cmk.agent_based.v2 import (
AgentSection, AgentSection,
@@ -96,8 +92,6 @@ def discover_mailcow_domains(section):
def check_mailcow_domains(item, params, section): def check_mailcow_domains(item, params, section):
"""the check function""" """the check function"""
if debug.enabled():
pprint(section)
domain = section.get(item) domain = section.get(item)
if not domain: if not domain:
# if a previously found domain does not exist anymore, create a meaningful result # if a previously found domain does not exist anymore, create a meaningful result

View File

@@ -1,9 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# pylint: disable=line-too-long, simplifiable-if-statement, missing-module-docstring, too-many-locals, unused-argument # pylint: disable=line-too-long, simplifiable-if-statement, missing-module-docstring, too-many-locals
from pprint import pprint
from cmk.utils import debug
# import necessary elements from API version 2 # import necessary elements from API version 2
from cmk.agent_based.v2 import ( from cmk.agent_based.v2 import (
@@ -65,8 +61,6 @@ def discover_mailcow_info(section):
def check_mailcow_info(params, section): def check_mailcow_info(params, section):
"""the check function""" """the check function"""
if debug.enabled():
pprint(section)
# get thresholds # get thresholds
_type, levels_num_domains = params["levels_num_domains"] _type, levels_num_domains = params["levels_num_domains"]
_type, levels_num_mailboxes = params["levels_num_mailboxes"] _type, levels_num_mailboxes = params["levels_num_mailboxes"]

View File

@@ -3,9 +3,6 @@
"""Mailcow check for mailboxes""" """Mailcow check for mailboxes"""
import time import time
from pprint import pprint
from cmk.utils import debug
# import necessary elements from API version 2 # import necessary elements from API version 2
from cmk.agent_based.v2 import ( from cmk.agent_based.v2 import (
@@ -115,8 +112,6 @@ def parse_mailcow_mailboxes(string_table):
def discover_mailcow_mailboxes(section): def discover_mailcow_mailboxes(section):
"""the discover function""" """the discover function"""
# since we have a service with item here we must create one service per item # since we have a service with item here we must create one service per item
if debug.enabled():
pprint(section)
for key in section: for key in section:
yield Service(item=key) yield Service(item=key)