I have a local check, it is a simple bash script which checks a VPN connection by making an API request, if the state is up, then the check_mk state is 1, otherwise it should go to critical. here is the script:
I am not interesting on a warning state, just either there is a connection or not, that is why I left the warning metric undefined, what I understand from you example that the graph will be from 0 to 2, one is up, 0 is warning and 2 is critical. Please correct me if I am wrong.
I wanted to connect the graph with the state, some thing like the attached image
This is interpreted as @Dirk described
the value is 1
the first two numbers are the warning from - to → warning if 0 or lower and warning if 2 or higher
the second two numbers are critical from - to → critical if 0 or lower and critical if 2 or higher
As warning and critical have the same value you will get no warning but instant critical.
I only write it this way that all values are filled and it is clear for myself that there is no warning and only critical.
In my example there are a colon between the 0 and 2.
If you only want to make a critical with lower values your can write state=1;0:;0:
But i think CMK has a problem with local checks and this special format. That is why i write a upper value. You can also use there a value not reached at all like 99999.
Your check will be critical for every value 0 or higher. With this writing.
got you, didn’t see the colon, now it makes sense. So basically either setting an upper value or leave it empty, so I understand it correctly, I should use either: state=1;;0 or state=1;0:;0: