Hi there,
Apologies, I am not that clued up on python. Are there any guides/documentation/examples that explain how to configure the check under /omd/sites/yoursite/local/share/check_mk/checks?
The closest I could find for any explanations is https://docs.checkmk.com/latest/en/dev_guidelines.html but this doesn’t seem to help me with any examples.
I can’t seem to workout how the value(s) of the output from the script that executes on the local server under the plugins folder get translated to set some default levels, or translate these into variables that can be passed into the return value which presents in the cmk check.
Any help would be appreciated. I’ve posted my current python code below with an example output.
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#Output sample:
#<<<win_patching>>>
#CAP-RG-GPO-WUA_Reboot_XXXXXXX_XXXX
factory_settings["win_patching_default_levels"] = {
}
def inventory_win_patching(info):
return[ (None, {}) ]
def check_win_patching(no_item, params, info):
if xxxx == "False":
return 2, "Patching Group: Not Configured(!!)"
else:
return 0, "Patching Group: Configured %value"
check_info["win_patching"] = {
"check_function" : check_win_patching,
"inventory_function" : inventory_win_patching,
"default_levels_variable" : "win_patching_default_levels",
"group" : "win_patching",
"service_description" : "Windows Patching",
"has_perfdata" : False,}