Page 1 of 1

nagios monitoring snmp trap

Posted: Sat Jun 13, 2015 12:11 am
by michaelli
Hi,

I would like to migrate our BB monitor system to nagiosxi, some of clients are configured send snmp trap to BB servers. I attached with BB trap log for reference.

During this migration, I have no idea how to configure nagiosxi to handling this trap messages and display in nagiosxi gui.

Could you have any procedure for this implement?

I have follow this url to implement snmp trap from the trouble-shoot example and success send a trap by command. But in above issue. I have no idea.

https://assets.nagios.com/downloads/nag ... ios_XI.pdf

Re: nagios monitoring snmp trap

Posted: Sun Jun 14, 2015 11:52 pm
by Box293
You can upload MIBs that have TRAP definitions via Admin > System Extensions > Manage MIBs
When you upload, click the "Process Trap" checkbox.
This will create traps in /etc/snmp/snmptt.conf
Trap that are now received and matched will be submitted to Nagios, targetting the Service "SNMP Traps".
If this service does not exist, check Admin > Monitoring Config > Unconfigured Objects.

Does this help?

Re: nagios monitoring snmp trap

Posted: Mon Jun 15, 2015 2:58 am
by michaelli
Hi Box293,

Code: Select all

DISMAN-EVENT-MIB::sysUpTimeInstance = 39:9:58:36.88 SNMPv2-MIB::snmpTrapOID.0 = SNMPv2-SMI::experimental.1.21.1.11.0.5008 SNMPv2-MIB::sysDescr = A1_ Material Handling_ PLC Communication_ PCS Activate: Process started SNMP-COMMUNITY-MIB::snmpTrapAddress.0 = 172.31.8.167 SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 = "Public" SNMPv2-MIB::snmpTrapEnterprise.0 = SNMPv2-SMI::experimental.1.21.1.11 
From the TRAP messages in SNMP server, Can we know it use "DISMAN-EVENT-MIB", "SNMPv2-MIB" and "SNMP-COMMUNITY-MIB" for trap information.

As I have ask before, When I upload MIBs with enable "TRAP" check box in nagios. But it show 0 conversation for TRAP

All above MIBs are contains in /usr/share/snmp/mibs by default. In my observation, it will convert the MIB.txt file if "TRAPE-TYPE" is defined.

Code: Select all

[root@nagiosxi mibs]# ls -l DISMAN-EVENT-MIB.txt SNMPv2-MIB.txt SNMP-COMMUNITY-MIB.txt
-rw-r--r-- 1 root   nagios 68104 Oct  7  2014 DISMAN-EVENT-MIB.txt
-rw-rw-r-- 1 apache apache 15490 Jun 13 12:44 SNMP-COMMUNITY-MIB.txt
-rw-rw-r-- 1 apache apache 29305 Apr 13 15:51 SNMPv2-MIB.txt
[root@nagiosxi mibs]# pwd
/usr/share/snmp/mibs
[root@nagiosxi mibs]# ls -l DISMAN-EVENT-MIB.txt SNMPv2-MIB.txt SNMP-COMMUNITY-MIB.txt
-rw-r--r-- 1 root   nagios 68104 Oct  7  2014 DISMAN-EVENT-MIB.txt
-rw-rw-r-- 1 apache apache 15490 Jun 13 12:44 SNMP-COMMUNITY-MIB.txt
-rw-rw-r-- 1 apache apache 29305 Apr 13 15:51 SNMPv2-MIB.txt
[root@nagiosxi mibs]# grep TRAP-TYPE DISMAN-EVENT-MIB.txt SNMPv2-MIB.txt SNMP-COMMUNITY-MIB.txt
[root@nagiosxi mibs]#
PS. When I grep TRAP-TYPE in /usr/share/snmp/mibs, no result found.

Please correct me if I have any wrong concern for SNMP.

I have success follow the trouble-shoot parts from below documents but I cannot setup in my real environment.

https://assets.nagios.com/downloads/nag ... ios_XI.pdf

Re: nagios monitoring snmp trap

Posted: Mon Jun 15, 2015 11:36 am
by ssax
Run these commands:

Code: Select all

addmib /usr/share/snmp/mibs/SNMPv2-MIB.txt
addmib /usr/share/snmp/mibs/DISMAN-EVENT-MIB.txt
service snmptt restart
You can view them now in your /etc/snmp/snmptt.conf file.