Modify Nagios Alert

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
dazx2k
Posts: 2
Joined: Fri Aug 28, 2015 9:55 am

Modify Nagios Alert

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Modify Nagios Alert

Post 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.
Former Nagios Employee.
me.
dazx2k
Posts: 2
Joined: Fri Aug 28, 2015 9:55 am

Re: Modify Nagios Alert

Post by dazx2k »

Hi hsmith,

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

Thanks
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Modify Nagios Alert

Post 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! :?
Former Nagios Employee.
me.
Locked