You can run all scripts you like as classical active and passive monitoring checks. It’s just important that the script has the output checkmk need. See also https://checkmk.com/cms_localchecks.html
I managed to get it working providing the full path of python before the script.
I followed the documentation and in my python script I output
0 myservice count1=42|count2=21;23;27|count3=73 This is my custom output
I created a Classical active and passive Monitoring checks then on checkmk service description it doesn’t detect all the metrics and classify both the metrics and custom output as performance data?
When I check the service overview page I see under the attributes
Output of check plugin 0 check_json count1=42
Service Metrics Count2: 21.0
Service performance data (source code) count2=21;23;27|count3=73 This is my custom output
Is the issue related to how I execute the script? instead of the local agent I use the Classical active and passive Monitoring check?
Are you running CRE version or CEE? If you use CEE is the microcore or nagios core active?
I guess there were a situation the nagios core expect the output in a differnt manner. Additional the checkbox for metrics need to be checked at the rule for classical active and passive monitoring checks.
Your output is no Classical active and passive Monitoring checks.
This is a normal Local check. It should be put inside the folder “/usr/lib/check_mk_agent/local” on the host it should run on.
The link from @tosch was not the right one for classical active and passive monitoring checks it was for the local checks.
Inside the link you find also the information where these scripts should be placed.
I would like to check the Json response of an http get request call, and I would like to create services with parameters that define the url, the json path and critical and warning values.
I have create a small python script that takes all these parameters and returns, now, the Nagio output format. Is that the way to go?
If your check should create other services depending on the json output, it should contain a inventory function. Check out the manual at https://checkmk.de/cms_legacy_devel_agentbased.html
It explains how to write such checks.
Regards,
Simon