Page 1 of 1

Modify Nagios Alert

Posted: Fri Aug 28, 2015 10:19 am
by dazx2k
Hi Guys,

Is there anyway to change error code for nagios alert?

The Nagios Server installed following packages:

nagios-4.0.8
nagios-plugins-2.0.3
snmptt_1.3

Everything working fine except. I can receive the traps and nagios display the alert.
The issue is the device connected to nagios server will trigger state 1 for OK; state 2 for Warning; state 3 for Critical whereas Nagios default is 1 for OK; 2 for Critical; 3 for Unknown.

Thanks in advanced

Re: Modify Nagios Alert

Posted: Fri Aug 28, 2015 10:22 am
by hsmith
dazx2k wrote:Hi Guys,

Is there anyway to change error code for nagios alert?

The Nagios Server installed following packages:

nagios-4.0.8
nagios-plugins-2.0.3
snmptt_1.3

Everything working fine except. I can receive the traps and nagios display the alert.
The issue is the device connected to nagios server will trigger state 1 for OK; state 2 for Warning; state 3 for Critical whereas Nagios default is 1 for OK; 2 for Critical; 3 for Unknown.

Thanks in advanced
This is for XI, but the same ideas apply.

You should look into the negate plugin and see if it suits your needs.

Re: Modify Nagios Alert

Posted: Fri Aug 28, 2015 12:09 pm
by dazx2k
Hi hsmith,

Thanks for fast reply. Do you have any example how to implement negate in snmptt.conf?

Thanks

Re: Modify Nagios Alert

Posted: Fri Aug 28, 2015 12:58 pm
by hsmith
dazx2k wrote:Hi hsmith,

Thanks for fast reply. Do you have any example how to implement negate in snmptt.conf?

Thanks
I do not, because that is not how Negate works. Basically, what Negate does is flips the results from a service check.

For example...

No Negate:

Image

Nagios thinks: "Apache is running, everything is wonderful!"



Negate:

Image

Nagios thinks: "Oh no, Apache is running, this is horrible!"

I'm not sure if this is what you're looking for exactly, but it is one solution that I figured may fit! :?