Change $SERVICESTATE$ for some UNKNOWN alarms

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
GersonGarcia
Posts: 2
Joined: Tue Aug 05, 2014 5:52 pm

Change $SERVICESTATE$ for some UNKNOWN alarms

Post by GersonGarcia »

All,

I have requirement to change the $SERVICESTATE from UNKNOWN to CRITICAL for some services when the Nagios plugin is deleted. We have some customized Nagios plugins that is deleted often from the host. The Service in Nagios became UNKN - NRPE: Unable to read output. These events are not visible to our operations and we no longer provide its monitor.

I would like to know if is there a method to change it to CRITICAL, so we can restore it right the way.

Thank you,

Gerson Garcia
[email protected]
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Change $SERVICESTATE$ for some UNKNOWN alarms

Post by tmcdonald »

So the checks are being run through NRPE, and the plugins are deleted from the remote machine?

In theory you can write a wrapper script around the check_nrpe command and have it look for the UNKNOWN exit code (and optionally a specific message) then if change that to CRITICAL.

But this isn't something that would exist by default in Nagios.
Former Nagios employee
Locked