[Release] Checkmk stable release 2.4.0p6

Dear friends of Checkmk,

the new stable release 2.4.0p6 of Checkmk is ready for download.

This stable release ships with 20 changes affecting all editions of Checkmk,
3 changes for the Enterprise editions, 2 Cloud Edition specific and
0 Managed Services Edition specific changes.

Changes in all Checkmk Editions:

BI

  • 18232 FIX: BI: handle FileNotFoundError in update config migration…

Checks & agents

  • 18164 proxmox_ve: Improved Backup Log Fetching and Cache Persistence…
    NOTE: Please refer to the migration notes!
  • 18235 KUBE: Addition of support for Kubernetes version 1.32…
  • 18203 New Disk Backend Metric Added for Bazel Cache…
  • 18226 FIX: AWS WAFV2 monitoring: Report correct metric values in case of multiple firewalls per AWS region…
  • 17932 FIX: Add exceptional value reported by Ciena 5164 devices with SAOS 10…
  • 18166 FIX: Added “paused” state to windows service rulset…
  • 17546 FIX: MS SQL Server monitoring no longer generates excessive crash reports…
  • 18225 FIX: Unbreak checking of administrative status of network interfaces for some devices…
  • 18215 FIX: Wrong display of dual stack hosts on CLI…
  • 18217 FIX: adva_fsp_current: Fix levels…
  • 18250 FIX: check_http: Fix proxy authentication…
  • 18028 FIX: systemd-timedated: avoid agent timeout when service is down…

Notifications

  • 18193 FIX: Time period matching for test notifications…

REST API

  • 17954 REST API: Extend acknowledge endpoints…
  • 17987 SEC: Fix Livestatus injection in autocomplete endpoint…

Site management

  • 18145 FIX: omd create: Create system group…

User interface

  • 14251 FIX: Average scatterplot: Fixed incorrect scatterplot point detection…
  • 18228 FIX: Increase range of Perf-O-Meters of network interface services…
  • 18227 FIX: Unbreak rendering of open parts of bidirectional Perf-O-Meters…

Changes in the Checkmk Enterprise Edition:

Agent Bakery

  • 17909 FIX: Agent Bakery: TMPDIR environment variable was not applied for single directory setup…
    NOTE: Please refer to the migration notes!
  • 17908 FIX: Agent Deployment fails to check host tag condition…

Reporting & availability

  • 18074 FIX: Render all scheduled reports without error…

Changes in the Checkmk Cloud Edition:

Checks & agents

  • 18249 FIX: OTel: Fix metric name for OTel datapoints without attributes…
    NOTE: Please refer to the migration notes!

REST API

  • 18212 OTel: REST API endpoint to configure Otel collector…

Changes in the Checkmk Cloud (SaaS):

NO CHANGES

Changes in the Checkmk Managed Services Edition:

NO CHANGES

You can download Checkmk from our download page: Download Checkmk for free | Checkmk

List of all changes: Werks

We greatly thank you for using Checkmk and wish you a successful monitoring,

Your Checkmk Team

1 Like

This Werk breaks the proxmox monitoring for ALL hosts.
At the moment you get the following error message.

  File "/omd/sites/home/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 398, in fetch_backup_data
    storage = Storage(program_ident="agent_proxmox_ve", host=args.hostname)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/special_agents/v0_unstable/storage.py", line 35, in __init__
    self._get_base_path(), self._sanitize_key(program_ident), self._sanitize_key(host)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/special_agents/v0_unstable/storage.py", line 49, in _sanitize_key
    raise ValueError("key must only contain ASCII letters, digits, or underscores.")
ValueError: key must only contain ASCII letters, digits, or underscores.

If you use IPs to connect to the proxmox host or FQDN or names with dash inside.

The next error occurs if you use a name with only letters.

Traceback (most recent call last):
  File "/omd/sites/home/lib/python3/cmk/special_agents/v0_unstable/agent_common.py", line 151, in _special_agent_main_core
    return main_fn(args)
           ^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 478, in agent_proxmox_ve_main
    logged_backup_data = fetch_backup_data(args, session, data["nodes"])
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 399, in fetch_backup_data
    with JsonCachedData(
         ^^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/special_agents/v0_unstable/misc.py", line 369, in JsonCachedData
    cache = json.loads(storage.read(key=storage_key, default="{}"))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/special_agents/v0_unstable/storage.py", line 80, in read
    path = self._get_path(key)
           ^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/special_agents/v0_unstable/storage.py", line 55, in _get_path
    safe_key = self._sanitize_key(key)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/home/lib/python3/cmk/special_agents/v0_unstable/storage.py", line 49, in _sanitize_key
    raise ValueError("key must only contain ASCII letters, digits, or underscores.")
ValueError: key must only contain ASCII letters, digits, or underscores.

Again a error for a key name.
Now it is way better than before.
The error is inside the code itself. Hardcoded :smiley:

    with JsonCachedData(
        storage=storage,
        storage_key="upid.log.cache.json",
        cutoff_condition=lambda k, v: bool(v[0] < cutoff_date),
    ) as cached:

If i change the storage key to “upid_log_cache_json” then it works.
For the hostname problem before i cleanup the hostname inside the code with replacing “.” and “-” with “_” then it works also.

But i think this Werk was not tested on any system. :frowning:

4 Likes

I can confirm this behavior, same here.
My hostname has only letters.

With the workaround provided it also works for me.

Clearly not the way it should have been :frowning: .

We’ll provide you with a fix ASAP. Meanwhile, to unbreak your site, you can copy the folder ~/lib/python3/cmk/special_agents/v0_unstable to the local folder (so to ~/local/lib/python3/cmk/special_agents/v0_unstable) and edit ~/local/lib/python3/cmk/special_agents/v0_unstable/storage.py to bypass the offending function:

diff --git a/cmk/special_agents/v0_unstable/storage.py b/cmk/special_agents/v0_unstable/storage.py
index c8ab8671e35..5150bac40f8 100644
--- a/cmk/special_agents/v0_unstable/storage.py
+++ b/cmk/special_agents/v0_unstable/storage.py
@@ -45,6 +45,7 @@ class Storage:
 
     @staticmethod
     def _sanitize_key(key: str) -> str:
+        return key
         if not key or any(c not in ALLOWED_KEY_CHARS for c in key):
             raise ValueError("key must only contain ASCII letters, digits, or underscores.")
         if len(key) > 255:

1 Like

Hey @moritz ,

will the fix be released soon or how long does it take?

Greetings

Just remember something similar happening to me during the update to 2.3.0p23… there the update complained about dashes in the stored password’s “Unique ID”.

The cmk-update-config is complaining that the id “is not a valid, non-reserved Python identifier”.

But… in the GUI you still are allowed to store passwords with a “Unique ID” being literaly anything.

1 Like

I have 2 notes; one is back in the monitoring after changing the “storage_key” you suggest; the other still run into an error:

[cpu_tracking] Stop [7f1bff2ef260 - Snapshot(process=posix.times_result(user=0.040000000000000036, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.03999999910593033))]
[agent] Success, [special_proxmox_ve] FileNotFoundError: [Errno 2] No such file or directory: '/omd/sites/cmk/tmp/check_mk/special_agents/agent_proxmox_ve/erroneous-UPID:pve01:002C3EF4:03B304BD:6869BC83:vzdump::root@pam:.log'(!!), [piggyback] Success (but no data found for this host), execution time 7.6 sec | execution_time=7.590 user_time=0.050 system_time=0.000 children_user_time=0.480 children_system_time=0.050 cmk_time_agent=6.860 cmk_time_ds=0.150
Agent exited with code 1: ERROR 2025-07-06 21:07:55 root: Error in log at line 145: LogParseWarning(145, "End of VM '105' while still information is missing (we have: {'total_duration', 'started_time'})")
Agent failed - please submit a crash report! (Crash-ID: 86082540-5a9c-11f0-bf0f-d6446ff3d984)

Traceback (most recent call last):
  File "/omd/sites/cmk/lib/python3/cmk/special_agents/v0_unstable/agent_common.py", line 151, in _special_agent_main_core
    return main_fn(args)
           ^^^^^^^^^^^^^
  File "/omd/sites/cmk/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 478, in agent_proxmox_ve_main
    logged_backup_data = fetch_backup_data(args, session, data["nodes"])
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/cmk/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 423, in fetch_backup_data
    return collect_vm_backup_info(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/cmk/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 376, in collect_vm_backup_info
    for task in backup_tasks:
                ^^^^^^^^^^^^
  File "/omd/sites/cmk/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 424, in <genexpr>
    BackupTask(task, backup_log, strict=args.debug, dump_logs=args.dump_logs)
  File "/omd/sites/cmk/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 126, in __init__
    with (LogCacheFilePath / (f"erroneous-{task['upid']}.log")).open("w") as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/cmk/lib/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/omd/sites/cmk/tmp/check_mk/special_agents/agent_proxmox_ve/erroneous-UPID:pve01:002C3EF4:03B304BD:6869BC83:vzdump::root@pam:.log'(!!)

the bypass hack doesn’t work, what else can I do? Was working fine with 2.4.0p4

1 Like

My workaround looks a little bit different than @moritz version.

Inside agent_proxmox_ve.py i changed this

def fetch_backup_data(
    args: Args,
    session: "ProxmoxVeAPI",
    nodes: Iterable[Mapping[str, Any]],
) -> Mapping[str, BackupInfo]:
    """Since the Proxmox API does not provide us with information about past backups we read the
    information we need from log entries created for each backup process"""
    # Fetching log files is by far the most time consuming process issued by the ProxmoxVE agent.
    # Since logs have a unique UPID we can safely cache them
    cutoff_date = int((datetime.now() - timedelta(weeks=args.log_cutoff_weeks)).timestamp())
    hostname = args.hostname.replace("-","_").replace(".","_") # line added
    storage = Storage(program_ident="agent_proxmox_ve", host=hostname)  # changed to use the cleaned name
    with JsonCachedData(
        storage=storage,
        storage_key="upid_log_cache_json",   # hardcoded the internal storage key
        cutoff_condition=lambda k, v: bool(v[0] < cutoff_date),
    ) as cached:
1 Like

Thank you; I start from scratch and it works! :smiley:

i can confirm this too - proxmox montoring is now broken

We are working on a release right now. This will (probably) be the fix: 18169 FIX special_agent storage/proxmox_ve: url quote key and hostnam… · Checkmk/checkmk@af90f87 · GitHub

If you want to test it right now: I’ll hang out in https://meet.google.com/meg-wauq-pod for a while.

4 Likes

p7 with the fix was released today.

2 Likes