Service SNMP alerts only sending top level Status error...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Service SNMP alerts only sending top level Status error...

Post by JakeHatMacys »

So this has never been a problem for us per se but i'm alerting with a script and it's only sending the monitor status information at the top layer in the trap. Basically this:
Capture.JPG
Where as when I click into the service alert I see the full output which is much longer and what i'd like to send over in our trap...

Which would show up here basically: (I do not have a live example)
Capture1.JPG
Is there a way I can tweak our trap settings / MIB to make sure this comes over???

I can DM examples they just contain some servers names and what not in the full message I copied vs what comes over in the trap... I can give both outputs (trap message vs Status output I want that got cut off).
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service SNMP alerts only sending top level Status error.

Post by scottwilkerson »

I can tell you how you can modify the trap sender component to do this, modify these 2 lines

change this

Code: Select all

$trap_command = "/usr/bin/snmptrap -v 2c -c $community $tcp$address$port '' NAGIOS-NOTIFY-MIB::nHostEvent nHostname s \"%host%\" nHostStateID i %hoststateid% nHostOutput s \"%hostoutput%\"";
to this

Code: Select all

$trap_command = "/usr/bin/snmptrap -v 2c -c $community $tcp$address$port '' NAGIOS-NOTIFY-MIB::nHostEvent nHostname s \"%host%\" nHostStateID i %hoststateid% nHostOutput s \"%hostoutput% %longhostoutput%\"";
and this

Code: Select all

$trap_command = "/usr/bin/snmptrap -v 2c -c $community $tcp$address$port '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s \"%host%\" nSvcDesc s \"%service%\" nSvcStateID i %servicestateid% nSvcOutput s \"%serviceoutput%\"";
to this

Code: Select all

$trap_command = "/usr/bin/snmptrap -v 2c -c $community $tcp$address$port '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s \"%host%\" nSvcDesc s \"%service%\" nSvcStateID i %servicestateid% nSvcOutput s \"%serviceoutput% %longserviceoutput%\"";
This would need to be done again if you update this component in the future
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Service SNMP alerts only sending top level Status error.

Post by JakeHatMacys »

Thanks, I'll get this put in on Monday morning... just in case we run into some problems i'd rather have some runway O.o
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service SNMP alerts only sending top level Status error.

Post by scottwilkerson »

JakeHatMacys wrote:Thanks, I'll get this put in on Monday morning... just in case we run into some problems i'd rather have some runway O.o
Sounds like a good plan
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked