Checkmk 2.4.0 CEE – Debug Function Removed, Breaking Extensions

Thanks for your answer!


Why does it leads to false results? Checkmk use it in the offical docu for programming.


After your answer I dived into debugging with vscode which looks promising for bugs like changed OIDs in SNMP checks. And probably unitttest for some plugins.

I wrote a debug file that calls the functions like this:

import debugpy
import template_plugin as plugin
import inspect 
from cmk.agent_based.v2 import (
    Service,
    Metric,
    CheckPlugin
)

debugpy.listen(("localhost", 5678))
print("Waiting for debugger attach...")
debugpy.wait_for_client()


string_table =  [['2', '2']]

section = plugin.parse_template_plugin(string_table)

discovery_service = plugin.discover_template_plugin(section)
discovery_service_obj = list(discovery_service)
for single_service_obj in discovery_service_obj:
    print(single_service_obj)

check = plugin.check_template_plugin(discovery_service_obj[0].item, section)

check_obj = list(check)
for single_obj in check_obj:
    print(single_obj)

Saadly we can’t use the remote_containers extension, like you did and described, because of our security regulations. :confused:

But we working our way to CI/CD for the extensions with testing and building in container. And then i will look again into your .vscode.

Cheers,