Override the status if a check

Hello,

I wonder if there is a way to override or rather manipulate the status of a check. For example, I’ve nrpe based checks returning Critical or Warning depending on the result status or thresholds. So if I want to override the status Critical to Warning ( only for certain peculiar case I’ve) , without modifying the nrpe script on the client locally.

If someone has a way implemented this way, please share an example.

Thanks

Depending on your setup, you can change the results afterwards via a process-check-result API call. However, doing so will still result in a time period where the check has the undesired state.

Another approach would be to wrap the actual command to be executed with another script, altering the output in a desired fashion. You might find inspiration in the Monitoring Plugin’s negate plugin.

Depending on your specific conditions, writing a short shell script to cache and manipulate the actual results may be the way to go. Btw, this script does not have to be installed on the client, but can reside on your monitoring host, at least when you are using check_nrpe. Maybe posting some details of your setup may help giving you a better answer.

1 Like