CMK version: 2.4.0 (no patch) CCE
OS version: Debian 12
Error message: Unhandled exception: RuntimeError('Either Username/Passwort or ClientID/ClientSecret/TenantID have to be set')
Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)
cmk -D --debug -vvn <REDACTED>
<REDACTED>
Addresses: <REDACTED>
Tags: [address_family:ip-v4-only], [agent:cmk-agent], [checkmk-agent:checkmk-agent], [criticality:prod], [ip-v4:ip-v4], [is_unifi:unset], [networking:lan], [piggyback:no-piggyback], [site:<SITE>], [snmp_ds:no-snmp], [tcp:tcp]
Labels: [cmk/device_type:container], [cmk/os_family:linux], [cmk/os_name:Debian GNU/Linux], [cmk/os_platform:debian], [cmk/os_type:linux], [cmk/os_version:12], [cmk/site:<SITE>]
Host groups: check_mk
Contact groups: all
Agent mode: Normal Checkmk agent, or special agent if configured
Type of agent: TCP: <REDACTED>:6556
Services:
checktype item params description groups
------------------------------ --------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------- ------
apt None {'normal': 1, 'removals': 1, 'security': 2} APT Updates
cpu_utilization_os None {} CPU utilization
checkmk_agent None {'agent_version': ('ignore', {}), 'agent_version_missmatch': 1, 'restricted_address_mismatch': 1, 'legacy_pull_mode': 1, 'only_from': ('cmk_postprocessed', 'only_from', None)} Check_MK Agent
diskstat SUMMARY {} Disk IO SUMMARY
df / {'levels': (80.0, 90.0), 'magic_normsize': 20, 'levels_low': (50.0, 60.0), 'show_levels': 'onmagic', 'inodes_levels': (10.0, 5.0), 'show_inodes': 'onlow', 'show_reserved': False, 'trend_range': 24, 'trend_perfdata': True, 'item_appearance': 'mountpoint', 'mountpoint_for_block_devices': 'volume_name'} Filesystem /
lnx_if 2 {'errors': {'both': ('perc', (0.1, 0.5))}, 'discovered_oper_status': ['1'], 'discovered_speed': 10000000000, 'item_appearance': 'index'} Interface 2
mem_linux None {'levels_virtual': ('perc_used', (98.0, 98.0)), 'levels_total': ('perc_used', (120.0, 150.0)), 'levels_shm': 'ignore', 'levels_pagetables': 'ignore', 'levels_committed': ('perc_used', (125.0, 150.0)), 'levels_commitlimit': ('perc_free', (20.0, 10.0)), 'levels_vmalloc': ('abs_free', (52428800, 31457280)), 'levels_hardwarecorrupted': ('abs_used', (1, 1)), 'levels_ram': ('perc_used', (98.0, 98.0)), 'levels_swap': ('perc_used', (98.0, 98.0))} Memory
postfix_mailq default {'deferred': (2, 10), 'active': (5, 10), 'failed': (1, 1)} Postfix Queue default
postfix_mailq_status default {} Postfix status default
local Reboot required {} Reboot required
systemd_units_services_summary None {'states': {'active': 0, 'inactive': 0, 'failed': 2}, 'states_default': 2, 'activating_levels': None, 'deactivating_levels': (30, 60), 'reloading_levels': (30, 60), 'ignored': []} Systemd Service Summary
systemd_units_services postfix {'states': {'active': 0, 'inactive': 1, 'failed': 2}, 'states_default': 1, 'else': 1} Systemd Service postfix
systemd_units_services postfix@- {'states': {'active': 0, 'inactive': 1, 'failed': 2}, 'states_default': 1, 'else': 1} Systemd Service postfix@-
systemd_units_sockets_summary None {'states': {'active': 0, 'inactive': 0, 'failed': 2}, 'states_default': 2, 'activating_levels': None, 'deactivating_levels': (30, 60), 'reloading_levels': (30, 60), 'ignored': ['systemd-journald-audit$']} Systemd Socket Summary
tcp_conn_stats None {} TCP Connections
uptime None {'min': (1800, 0)} Uptime
local sshd currently banned {} sshd currently banned
local sshd currently failed {} sshd currently failed
local sshd total banned {} sshd total banned
local sshd total failed {} sshd total failed
Being an active check, it does not show up in cmk -D. My postfix relay is no-authentication required, but limited by firewall and postfix config to only certain IPv4. The CheckMK container is allowed and notifications flow as expected, so it’s not that.
Here is the rule. It was working fine on 2.3. It broke with the 2.4.0 upgrade:
In text form (line breaks added for readability):
check_mk_active-mail_loop!--fetch-protocol=IMAP --fetch-server=imap.gmail.com
--fetch-tls --fetch-username <REDACTED> --fetch-password-reference imap_loop_gmail_pass:/omd/sites/<SITE>/var/check_mk/core/helper_config/latest/stored_passwords
--connect-timeout=60 --send-protocol=SMTP --send-server=<REDACTED> --send-port=25
--mail-from=<REDACTED>@gmail.com --mail-to=<REDACTED>@gmail.com
--delete-messages '--status-suffix=<REDACTED>-Local Postfix'
--warning=3660 --critical=3720
I don’t see where I miss user or ‘passwort’ (sic). I have tried an explicit password and pulling from the credential store.
I am having a hard time executing the check directly from the CLI. I have yet to locate the script that “check_mk_active-mail_loop” resolves to.

