How would i correctly use these multiple results (ignoring for now the format) to be correctly reflected in CMK in either the metrics and/or the details?
0 "My service" count1=42|count2=23 A service with 2 graphs
Checkmk will then draw two graphs for the two counters. It will use the legend, color, and unit of predefined metrics with the name count1 and count2, if they exist. So if checkmk already has a metric named count1, then it will paint a line or area according to that definition. If not, the graph will have some default layout. Possible metric names can be found in the directory ~/lib/python3/cmk/gui/plugins/metrics. Just do a grep 'metric_info\[' *.py in that directory so see what’s already there and which one possibly matches your need.
For example, if you want to draw some sort of utilization, you might use
0 "My service" generic_util=42 Some utilization
and because of the existing definition (in cpu.py):
a graph with a certain color and unit percentage will be drawn.
But 20241126003009Z is a timestamp and doesn’t seem to be really suitable for a graph.
If you want to use the detail lines, then your local check should output it like so, with \n as a separator between the “overview” and the detail lines and between each of the detail lines:
0 "My service" count1=42|count2=23 A service with 2 graphs\ndetail line 1\ndetail line 2\ndetail line 3
Thank you for the detailed post.
Regarding the docs, i had already dived into them, and found most of what you have written/explained in detail.
The idea/question behind it all is having the datetime/ZuluTime as a metric which then would be to evaluate if it was in the future, and thus a task/process was still correctly scheduled.
As to give some detail as to what i am working on:
I am trying to get information from an LDAP-query (in python via ldap (not ldap3)) formatted correctly to CMK to be able to monitor it.
The last (oldest i could find) regarding this was a nagios (bash-)script utilizing a very old (and unwanted) method (eDirectory Obituaries Check) calling dsrepair.
Since then eDirectory offers a virtual LDAP object (Using cn=monitor for Monitoring), which i am using as information-source.
I am currently starting out with a Localcheck, but the end-goal is to create a special agent.
The output is giving me a bit of a headache, as some metrics are in Bytes, some in seconds, some in KiloBytes, etc.
They are all over the place