Since I’ve always been helped so well here so far, I thought I’d ask here again about my problem. Unfortunately I haven’t found anything similar in the forum.
I am still in the process of writing my own SNMP checks for the CMK (v2.3) and have already made a lot of progress. So much progress that the tank level of my emergency generator is now correctly displayed in liters in the CMK. However, I would still like to have a performance graph for this. In previous versions it was enough to set a “has_perfdata=true”, but that no longer seems to work. The check checks two sensors and outputs the results as separate checks with liters and degrees (°C). Can anyone here put me on the right track? Code snippets of similar SNMP checks would already help me! Best regards and thanks in advance
For agent_based.v2 checks, it is a little different. Yes, SNMP checks use the agent_based.v2 API.
I definitely recommend checking the git repo included on the above page, it’s earlier on in the page. This has been my go to reference for all the v2 plugins I’ve written in the last year.
thank you for your response
The thing is, I checked the repo you mentioned but I’ve no clue where to start.
So for example, there is a graphing_v0_v1.py with a ParsedUnit named UNIT_DEGREE_CELSIUS. But there’s nothing for volume or litres.
And how do I use this stuff within my SNMP code? That are the questions I’m asking myself
Do you have some public examples for SNMP checks which fetch similiar units that I want to check?
Hello!
yeah I’ve checked the examples in the git repo, but I can’t find a SNMP check which includes metric graphs. The checks I built are working like a charm, the only thing that’s missing is the metric data
You’ll have to use examples from the non-snmp plugins in that repo. That functions the same regardless of it SNMP or agent. They both use the same agent_based.v2 APIs for graphing