After Nagios XI got was upgraded to 5.5.10, everything in "snmptt.conf" got commented out, saying that NXTI handles all the traps now.
Problem is that all the trap definitions got migrated into NXTI, but EXEC action is missing from all of them, so now i can see received traps in NXTI, but they are not getting passed to nagios "SNMP Traps" service.
snmptt.conf sample:
Code: Select all
# This trap definition is being managed by NXTI
#EVENT coldStart .1.3.6.1.6.3.1.1.5.1 "Status Events" Warning
#FORMAT Device reinitialized (coldStart)
#EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "Device reinitialized (coldStart) $*"
#SDESC
#A coldStart trap signifies that the SNMPv2 entity, acting
#in an agent role, is reinitializing itself and that its
#configuration may have been altered.
#EDESC
##
Code: Select all
EVENT nsNotifyRestart .1.3.6.1.4.1.8072.4.0.3 "Status Events" Normal
FORMAT Received trap "$N" with variables "$+*"
EXEC php /usr/local/nagiosxi/scripts/nxti.php --event_name="$N" --event_oid="$i" --numeric_oid="$o" --symbolic_oid="$O" --community="$C" --trap_hostname="$R" --trap_ip="$aR" --agent_hostname="$A" --agent_ip="$aA" --category="$c" --severity="$s" --uptime="$T" --datetime="$x $X" --unixtime="$@" --bindings="$+*"
SDESC
An indication that the agent has been restarted.
This does not imply anything about whether the configuration has
changed or not (unlike the standard coldStart or warmStart traps)
Variables:
EDESC
Code: Select all
OID of received trap: .1.3.6.1.4.1.9.9.41.2.0.1. Will attempt to translate to text
OID found in cache: '.1.3.6.1.4.1.9.9.41.2.0.1' -> 'clogMessageGenerated'
Translated to clogMessageGenerated
EXEC command:php /usr/local/nagiosxi/scripts/nxti.php --event_name="clogMessageGenerated" --event_oid=".1.3.6.1.4.1.9.9.41.2.0.1" --numeric_oid=".1.3.6.1.4.1.9.9.41
.2.0.1" --symbolic_oid="clogMessageGenerated" --community="" --trap_hostname="xxxxxxxx" --trap_ip="xxxxxxxxx" --agent_hostname="xxxxxxxxx" --agent_ip
="xxxxxxxxx" --category="Status Events" --severity="Normal" --uptime="337:19:03:08.03" --datetime="2019-03-01 14:27:36" --unixtime="1551468456" --bindings="clog
HistFacility.161072:PLATFORM_ENV clogHistSeverity.161072:2 clogHistMsgName.161072:FRU_PS_ACCESS clogHistMsgText.161072:FRU Power Supply is not responding clogHistTim
estamp.161072:337:19:03:08.00"
Sleeping for 5 seconds