Re: SNMP traps sending with var2=%hostoutput%
Posted: Mon Nov 04, 2019 6:04 pm
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"
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"