Page 1 of 1
Service SNMP alerts only sending top level Status error...
Posted: Wed Mar 28, 2018 2:16 pm
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).
Re: Service SNMP alerts only sending top level Status error.
Posted: Wed Mar 28, 2018 2:44 pm
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
Re: Service SNMP alerts only sending top level Status error.
Posted: Thu Mar 29, 2018 2:19 pm
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
Re: Service SNMP alerts only sending top level Status error.
Posted: Thu Mar 29, 2018 2:21 pm
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