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:
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)
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).
Service SNMP alerts only sending top level Status error...
-
JakeHatMacys
- Posts: 281
- Joined: Thu Sep 25, 2014 3:21 pm
Service SNMP alerts only sending top level Status error...
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.
I can tell you how you can modify the trap sender component to do this, modify these 2 lines
change this
to this
and this
to this
This would need to be done again if you update this component in the future
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%\"";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%\"";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%\"";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%\"";-
JakeHatMacys
- Posts: 281
- Joined: Thu Sep 25, 2014 3:21 pm
Re: Service SNMP alerts only sending top level Status error.
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.
Sounds like a good planJakeHatMacys 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