[Check_mk (english)] Using WATO for check parameters
Max.Caines at wlv.ac.uk
Thu Jul 7 12:17:57 CEST 2016
I finally worked this one out. The problem is that I had set the “itemspec” parameter (number 5) in the register_check_parameters call in “custom_check_parameters.py” to “None”. This cases the rule to be ignored when Check_MK is looking for the appropriate values for the check parameters when the check is invoked (and also when the rule is displayed by WATO)
From: Marcel Schulte [mailto:schulte.marcel at gmail.com]
Sent: 05 July 2016 21:52
To: Caines, Max <Max.Caines at wlv.ac.uk>; checkmk-en at lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Using WATO for check parameters
Could we get the check and custom_check_parameters file attached? Most likely the issue's in the code...
Caines, Max <Max.Caines at wlv.ac.uk<mailto:Max.Caines at wlv.ac.uk>> schrieb am Di., 5. Juli 2016 15:40:
I thought I understood this, but it’s clear I don’t, and maybe someone else can explain. I’m using RAW 1.2.6p10. I’ve written an SNMP check for a Swiftbase climate monitor, which works fine, but now I’m trying to add code to configure the check parameters via WATO. I’ve followed Craig Cook’s example at https://github.com/cncook001/check_mk/tree/master/redis, and created a custom_check_parameters.py in the appropriate directory under /local, which registers a Dictionary containing the check parameters. An extra item has appeared in the right subgroup in the “Host and Service Parameters” page of the GUI, with the right prompts. I’ve created an all-hosts rule, which has appeared in etc/check_mk/conf.d/wato/rules.mk<http://rules.mk>. If I look at the Parameters screen for the service on a host running it, it says the parameters are coming from “Rule 1 in Main directory”, but the values it lists are the ones specified by the “default_levels_variable” variable in the check script, which is a “factory_settings” variable. But if I click “Rule 1 in Main directory”, it displays the rule with the correct values. The values the script is actually using are the ones from the “factory_settings” variable, because it lists them as part of the output from the check. So although the rule values are in rules.mk<http://rules.mk>, the check isn’t picking them up. I’ve also looked at the generated check script for the host in var/check_mk/precompiled, and it contains the “factory_settings” values too, rather than the ones in the rule.
Does anyone have any idea what I’ve got wrong? Would any more information be useful, and if so what?
Max Caines | Network Design Consultant | IT Services | Directorate of Academic Support | University of Wolverhampton | 01902 322245 | 07976 841874
For contact details and general information on IT Services please visit http://www.wlv.ac.uk/its This email, together with any attachment, is for the exclusive and confidential use of the addressee(s) and may contain legally privileged information. If you receive this email in error, please visit http://www.wlv.ac.uk/ITS-disclaimer . Please consider the environment before printing this e-mail.
checkmk-en mailing list
checkmk-en at lists.mathias-kettner.de<mailto:checkmk-en at lists.mathias-kettner.de>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the checkmk-en