SNMP traps sending with var2=%hostoutput%

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
thomas.coffman
Posts: 12
Joined: Mon Apr 10, 2017 1:54 pm

Re: SNMP traps sending with var2=%hostoutput%

Post by thomas.coffman »

Everything in the /usr/local/nagiosxi/var/components/snmptrapsender.log file is "NAGIOS-NOTIFY-MIB::nHostEvent" but I see services being checked.

SNMP Trap Sender
Allows Nagios XI to send SNMP traps to other network management systems when host and service alerts occur.
1.6.0 Nagios Enterprises, LLC

Here is a nagios.log service
[1572908459] SERVICE ALERT: uk6-owsaapp.mgmt.savvis.net;Check HPSA VIP version;CRITICAL;SOFT;1;CRITICAL: TIME - 3.32949900627 - VERSION - 70.0.76156.0

and the snmptrapsender.log entry

[1572908462] /usr/bin/snmptrap -v 2c -c NagiosXI 10.12.194.21:162 '' NAGIOS-NOTIFY-MIB::nHostEvent nHostname s "uk6-owsaapp.mgmt.savvis.net" nHostStateID i 0 nHostOutput s "%hostoutput%" nHostAlias s "uk6-owsaapp.mgmt.savvis.net"



and the eventman.log entry ( I think )

*** GLOBAL HANDLER (snmptrapsender)...
Array
(
[event_id] => 2504541
[event_source] => 2
[event_type] => 1
[event_time] => 2019-11-04 17:02:01
[event_meta] => Array
(
[handler-type] => service
[host] => uk6-owsaapp.mgmt.savvis.net
[service] => Check HPSA VIP version
[hostaddress] => 212.124.244.88
[hoststate] => UP
[hoststateid] => 0
[hosteventid] => 268924
[hostproblemid] => 0
[servicestate] => CRITICAL
[servicestateid] => 2
[lastservicestate] => CRITICAL
[lastservicestateid] => 2
[servicestatetype] => SOFT
[currentattempt] => 2
[maxattempts] => 4
[serviceeventid] => 277426
[serviceproblemid] => 136803
[serviceoutput] => CRITICAL: TIME - 3.07077980042 - VERSION - 70.0.76156.0
[longserviceoutput] =>
[servicedowntime] => 0
)

[logging_enabled] => 1
)
PROCESSING:
Array
(
[address] => 10.12.194.21
[port] => 162
[hoststateid] => 0
[servicestateid] => 0
[statetype] => BOTH
[snmpversion] => 2c
[community] => NagiosXI
)
PHP Notice: Undefined index: contact in /usr/local/nagiosxi/html/includes/utils-notification
s.inc.php on line 0
PHP Notice: Undefined variable: _SESSION in /usr/local/nagiosxi/html/includes/utils-users.in
c.php on line 1944
RUNNING COMMAND: /usr/bin/snmptrap -v 2c -c NagiosXI 10.12.194.21:162 '' NAGIOS-NOTIFY-MIB::n
HostEvent nHostname s "uk6-owsaapp.mgmt.savvis.net" nHostStateID i 0 nHostOutput s "%hostoutp
ut%" nHostAlias s "uk6-owsaapp.mgmt.savvis.net"
thomas.coffman
Posts: 12
Joined: Mon Apr 10, 2017 1:54 pm

Re: SNMP traps sending with var2=%hostoutput%

Post by thomas.coffman »

I guess it was just a bug. I did the component upgrade in the UI to 1.6.2

SNMP Trap Sender
Allows Nagios XI to send SNMP traps to other network management systems when host and service alerts occur.
1.6.2 Nagios Enterprises, LLC

and things are just working dandy I think.

2019-11-05 09:19:26 - /usr/bin/snmptrap -v 2c -c NagiosXI 10.12.194.21:162 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "dc3-owsaapp.mgmt.savvis.net" nSvcDesc s "Check HPSA VIP version" nSvcStateID i 2 nSvcOutput s "CRITICAL: TIME - 3.39026618004 - VERSION - 70.0.76156.0" nHostAlias s "dc3-owsaapp.mgmt.savvis.net"
2019-11-05 09:20:31 - /usr/bin/snmptrap -v 2c -c NagiosXI 10.12.194.21:162 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "dc3-owsaapp.mgmt.savvis.net" nSvcDesc s "Check HPSA VIP version" nSvcStateID i 2 nSvcOutput s "CRITICAL: TIME - 5.44098806381 - VERSION - 70.0.76156.0" nHostAlias s "dc3-owsaapp.mgmt.savvis.net"
2019-11-05 09:20:43 - /usr/bin/snmptrap -v 2c -c NagiosXI 10.12.194.21:162 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "vntpdsql01.savvis.ad.savvis.net" nSvcDesc s "Am I up" nSvcStateID i 2 nSvcOutput s "PING CRITICAL - Packet loss = 40%, RTA = 100.42 ms" nHostAlias s "vntpdsql01.savvis.ad.savvis.net"
2019-11-05 09:21:31 - /usr/bin/snmptrap -v 2c -c NagiosXI 10.12.194.21:162 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "dc3-owsaapp.mgmt.savvis.net" nSvcDesc s "Check HPSA VIP version" nSvcStateID i 0 nSvcOutput s "OK: TIME - 2.19090199471 - VERSION - 70.0.76156.0" nHostAlias s "dc3-owsaapp.mgmt.savvis.net"
2019-11-05 09:21:43 - /usr/bin/snmptrap -v 2c -c NagiosXI 10.12.194.21:162 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "vntpdsql01.savvis.ad.savvis.net" nSvcDesc s "Am I up" nSvcStateID i 0 nSvcOutput s "PING OK - Packet loss = 0%, RTA = 85.58 ms" nHostAlias s "vntpdsql01.savvis.ad.savvis.net"
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: SNMP traps sending with var2=%hostoutput%

Post by cdienger »

That does look a lot better. I'll close this one out for now. Just shoot me a PM if you need it reopened.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked