added debug options

This commit is contained in:
2025-04-12 15:22:11 +02:00
parent cc2aaee908
commit 567f4d8602
12 changed files with 18 additions and 1 deletions

View File

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