Agent based checks: access previous check result data?

(fork) #1


is it possible for a check_mk agent based check to access previous check_data?

The use-case is that I want to implement a check that’s looking at the past 5 values. And only if the past 5 values are bad I want to have “CRIT” outcome. I do not want to be bothered visible in the web interface with a check that has not at least 5 values over a threshhold.


(Philipp Näther) #2

I am not aware of a function that provides caching the check state for more than 2 periods.
You could write a small local script on the cmk server that continuously checks the service state via livestatus query and outputs the according calculated nagios exit code. Drawback would be that this script only adds a service to the host it is running on, in this case the cmk server, not the queried host itself.

(fork) #3

Hi Philipp,

thanks for the answer. I’ll probably do a local check then.