To configure nagiosxi monitoring snmp trap service, I follow the below article but failed to get the trap messages in nagiosxi (Nagios XI 2014R2.5).
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
1. I run the below scripts to install extra package and snmptt package.
NagiosXI-SNMPTrap-setup.sh
2. Use SNMP Trap wizard to configure the device
3. In side client device, generate a SNMP trap messages and success
Code: Select all
snmptrap -v 2c -c public 172.31.4.166 '' NOTIFICATION-LOG-MIB::nlmLogVariableOctetStringVal SNMPv2-MIB::sysDescr s "`date`[INFO]-[CPLUS]-[CBT]: MySQL Dump execution failure. Please contact CBT DO during office hour."Code: Select all
Apr 12 13:38:13 nagiosxi snmptrapd[15922]: 2015-04-12 13:38:13 nagiosxir [UDP: [172.31.4.165]:55751->[172.31.4.166]]:#012.1.3.6.1.2.1.1.3.0 = Timeticks: (335143994) 38 days, 18:57:19.94#011.1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.2.1.92.1.3.2.1.8#011.1.3.6.1.2.1.1.1 = STRING: Sun Apr 12 13:38:13 HKT 2015[INFO]-[CPLUS]-[CBT]: MySQL Dump execution failure. Please contact CBT DO during office hour.Code: Select all
Sun Apr 12 13:38:13 2015: Unknown trap (.1.3.6.1.2.1.92.1.3.2.1.8) received from nagiosxir at:
Value 0: nagiosxir
Value 1: 172.31.4.165
Value 2: 38:18:57:19.94
Value 3: .1.3.6.1.2.1.92.1.3.2.1.8
Value 4: 172.31.4.165
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
Ent Value 0: .1.3.6.1.2.1.1.1=Sun Apr 12 13:38:13 HKT 2015[INFO]-[CPLUS]-[CBT]: MySQL Dump execution failure. Please contact CBT DO during office hour.I further find nagios snmp trap article in google and follow below procedure.
http://xavier.dusart.free.fr/nagios/en/snmptraps.html
In step "Compiling MIBs", I execute below command but result is "Failed translations: 1"
Code: Select all
snmpttconvertmib --in=/usr/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt --out=/etc/snmp/snmptt.confNOTIFICATION-LOG-MIB --exec='/usr/local/nagios/libexec/eventhandlers/submit_check_result $r TRAP 1'Code: Select all
***** Processing MIB file *****
snmptranslate version: NET-SNMP version: 5.7.3
severity: Normal
File to load is: /usr/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
File to APPEND TO: /etc/snmp/snmptt.confNOTIFICATION-LOG-MIB
MIBS environment var: /usr/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
mib name: NOTIFICATION-LOG-MIB
Processing MIB: NOTIFICATION-LOG-MIB
#
Line: 475
NOTIFICATION-TYPE: The
Enterprise: nlmLog
Looking up via snmptranslate: NOTIFICATION-LOG-MIB::The
Unknown object identifier: NOTIFICATION-LOG-MIB::The
OID:
Done
Total translations: 1
Successful translations: 0
Failed translations: 1
In ngaiosxi server, I cannot find the below directory and file
Code: Select all
[root@nagiosxi /]# ls -ld /usr/local/nagios/libexec/eventhandlers
ls: cannot access /usr/local/nagios/libexec/eventhandlers: No such file or directory
[root@nagiosxi /]# ls -l /usr/local/nagios/libexec/eventhandlers/submit_check_result
ls: cannot access /usr/local/nagios/libexec/eventhandlers/submit_check_result: No such file or directory