Page 1 of 2

Monitoring network device which can send SNMP Trap

Posted: Thu Sep 19, 2013 4:32 am
by phyolwin
Dear all,

I am finding the solution how to monitor the network device which can send SNMP Traps.

I uploaded the MIBs file through Admin>>manage mibs files

Add generic network device from monitoring wizard.

Add SNMP traps service from Monitoring wizard. But I can only see waiting for trap on SNMP Traps services.

I also installed SNMPTT. But I don't know which step miss out.

I appreciated if someone guide me the way.

Re: Monitoring network device which can send SNMP Trap

Posted: Thu Sep 19, 2013 2:36 pm
by abrist
Have you followed the snmptt document?
http://assets.nagios.com/downloads/nagi ... ith_XI.pdf

Re: Monitoring network device which can send SNMP Trap

Posted: Thu Sep 19, 2013 8:18 pm
by phyolwin
Thanks for reply. I followed these step. But still can't get the trap.

So I tried with these link also.
But in ngaiosxi service status of SNMP Traps is waiting for trap.

Re: Monitoring network device which can send SNMP Trap

Posted: Thu Sep 19, 2013 8:29 pm
by phyolwin
Thanks for your reply. First I followed that link. But still not working. So I followed below link:
But still not ok.

There is two log file @ /var/log/snmptt/ called snmptt.log and snmpttsystem.log

snmptt.log

Code: Select all

Thu Sep 19 05:09:40 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  1 1048589 No signal on port B ipswitch 1 0 2013-09-19 13:10:49 0 -1 1 37
Thu Sep 19 05:09:40 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  2 1048589 No signal on port A ipswitch 1 0 2013-09-19 13:10:49 0 -1 0 32
Thu Sep 19 06:26:09 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  3 1048589 No signal on port B ipswitch 5 0 2013-09-19 13:10:49 0 -1 1 37
Thu Sep 19 06:26:11 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  4 1048589 No signal on port B ipswitch 1 0 2013-09-19 13:10:49 0 -1 1 37
Thu Sep 19 06:26:11 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  5 1048589 No signal on port A ipswitch 5 0 2013-09-19 13:10:49 0 -1 0 32
Thu Sep 19 06:26:11 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  6 1048589 No signal on port A ipswitch 1 0 2013-09-19 13:10:49 0 -1 0 32
Thu Sep 19 06:52:15 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  7 1048589 No signal on port A ipswitch 5 0 2013-09-19 13:10:49 0 -1 0 32
Thu Sep 19 06:52:15 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  8 1048589 No signal on port A ipswitch 1 0 2013-09-19 13:10:49 0 -1 0 32
Thu Sep 19 06:52:22 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  9 1048589 No signal on port B ipswitch 5 0 2013-09-19 13:10:49 0 -1 1 37
Thu Sep 19 06:52:23 2013 .1.3.6.1.4.1.23916.2.1.0.1 Normal "Status Events" 192.168.1.100 - Every time a message is generated, an SNMP trap will  10 1048589 No signal on port B ipswitch 1 0 2013-09-19 13:10:49 0 -1 1 37

snmpttsystem.log

Code: Select all

Thu Sep 19 02:58:00 2013 Unable to enter spool dir /var/spool/snmptt/
Thu Sep 19 02:58:05 2013 Unable to enter spool dir /var/spool/snmptt/
Thu Sep 19 02:58:10 2013 Unable to enter spool dir /var/spool/snmptt/
Thu Sep 19 02:58:15 2013 Unable to enter spool dir /var/spool/snmptt/
Thu Sep 19 02:58:20 2013 Unable to enter spool dir /var/spool/snmptt/
Thu Sep 19 02:58:25 2013 Unable to enter spool dir /var/spool/snmptt/
Thu Sep 19 02:58:30 2013 Unable to enter spool dir /var/spool/snmptt/
Thu Sep 19 02:58:35 2013 Unable to enter spool dir /var/spool/snmptt/
Thu Sep 19 03:32:47 2013 SNMPTT v1.3 shutdown
Thu Sep 19 03:32:47 2013 Total traps received=0,Total traps translated=0,Total traps ignored=0,Total unknown traps=0
Let me know which configuration i missed out and which config need to check.

Thanks.

Re: Monitoring network device which can send SNMP Trap

Posted: Fri Sep 20, 2013 10:42 am
by sreinhardt
Looks like you might have some permissions issues here. return the output of the following please.

Code: Select all

ll /user/share/snmp/mibs
ll /var/spool/snmp
ll /var/log/snmptt
tail /var/log/snmptt/unknown_log

Re: Monitoring network device which can send SNMP Trap

Posted: Sun Sep 22, 2013 9:19 pm
by phyolwin
Thanks for your reply. I would like to say sorry if I did stupidly. Last friday, I cleaned my Virtualbox and unfortunately I have deleted the VM that I used. So I installed from the beginning.

There is one file @ /var/log/snmptt/snmpttsystem.log

snmpttsystem.log

Code: Select all

[root@nagios snmptt]# tail snmpttsystem.log
2013-09-23 08:02:22 Could not convert user id 'snmptt' to a numeric UID
2013-09-23 08:02:38 SNMPTT v1.3 shutdown
2013-09-23 08:02:38 Total traps received=0,Total traps translated=0,Total traps ignored=0,Total unknown traps=0
2013-09-23 08:03:35 SNMPTT v1.3 started
2013-09-23 08:03:36 Loading /etc/snmp/snmptt.conf.tv
2013-09-23 08:03:36 Finished loading 43 lines from /etc/snmp/snmptt.conf.tv
2013-09-23 08:03:36 Could not convert user id 'snmptt' to a numeric UID
2013-09-23 08:03:36 MySQL error: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
There is no file called snmptt.log

Here are the file permission:

ll /user/share/snmp/mibs

Code: Select all

[root@nagios mibs]# ll
total 1796
-rw-r--r--. 1 root   nagios  17455 Aug 12 22:46 AGENTX-MIB.txt
-rw-rw-r--  1 apache apache   6297 Sep 23 06:22 Appear_Messages.mib
-rw-rw-r--  1 apache apache   1272 Sep 23 06:22 Appear_Root.mib
-rw-rw-r--  1 apache apache   2453 Sep 23 06:22 Appear_TrapControl.mib
-rw-rw-r--  1 apache apache   3480 Sep 23 06:23 Appear_TrapDestination.mib
-rw-r--r--. 1 root   nagios  50948 Aug 12 22:46 BRIDGE-MIB.txt
-rw-r--r--. 1 root   nagios  68104 Aug 12 22:46 DISMAN-EVENT-MIB.txt
-rw-r--r--. 1 root   nagios  24613 Aug 12 22:46 DISMAN-SCHEDULE-MIB.txt
-rw-r--r--. 1 root   nagios  64311 Aug 12 22:46 DISMAN-SCRIPT-MIB.txt
-rw-r--r--. 1 root   nagios  84492 Aug 12 22:46 EtherLike-MIB.txt
-rw-r--r--. 1 root   nagios   4660 Aug 12 22:46 HCNUM-TC.txt
-rw-r--r--. 1 root   nagios  52544 Aug 12 22:46 HOST-RESOURCES-MIB.txt
-rw-r--r--. 1 root   nagios  10583 Aug 12 22:46 HOST-RESOURCES-TYPES.txt
-rw-r--r--. 1 root   nagios   4819 Aug 12 22:46 IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
-rw-r--r--. 1 root   nagios  29665 Aug 12 22:46 IANAifType-MIB.txt
-rw-r--r--. 1 root   nagios   4299 Aug 12 22:46 IANA-LANGUAGE-MIB.txt
-rw-r--r--. 1 root   nagios   3513 Aug 12 22:46 IANA-RTPROTO-MIB.txt
-rw-r--r--. 1 root   nagios   5066 Aug 12 22:46 IF-INVERTED-STACK-MIB.txt
-rw-r--r--. 1 root   nagios  71691 Aug 12 22:46 IF-MIB.txt
-rw-r--r--. 1 root   nagios  16782 Aug 12 22:46 INET-ADDRESS-MIB.txt
-rw-r--r--. 1 root   nagios  46286 Aug 12 22:46 IP-FORWARD-MIB.txt
-rw-r--r--. 1 root   nagios 185667 Aug 12 22:46 IP-MIB.txt
-rw-r--r--. 1 root   nagios  15936 Aug 12 22:46 IPV6-ICMP-MIB.txt
-rw-r--r--. 1 root   nagios  48703 Aug 12 22:46 IPV6-MIB.txt
-rw-r--r--. 1 root   nagios   7257 Aug 12 22:46 IPV6-TCP-MIB.txt
-rw-r--r--. 1 root   nagios   2367 Aug 12 22:46 IPV6-TC.txt
-rw-r--r--. 1 root   nagios   4400 Aug 12 22:46 IPV6-UDP-MIB.txt
-rw-r--r--. 1 root   nagios   5931 Aug 12 22:46 LM-SENSORS-MIB.txt
-rw-r--r--. 1 root   nagios  42375 Aug 12 22:46 MTA-MIB.txt
-rw-r--r--. 1 root   nagios  15732 Aug 12 22:46 NET-SNMP-AGENT-MIB.txt
-rw-r--r--. 1 root   nagios   9160 Aug 12 22:46 NET-SNMP-EXAMPLES-MIB.txt
-rw-r--r--. 1 root   nagios   9198 Aug 12 22:46 NET-SNMP-EXTEND-MIB.txt
-rw-r--r--. 1 root   nagios   2036 Aug 12 22:46 NET-SNMP-MIB.txt
-rw-r--r--. 1 root   nagios   3351 Aug 12 22:46 NET-SNMP-PASS-MIB.txt
-rw-r--r--. 1 root   nagios   4686 Aug 12 22:46 NET-SNMP-TC.txt
-rw-r--r--. 1 root   nagios   5039 Aug 12 22:46 NET-SNMP-VACM-MIB.txt
-rw-r--r--. 1 root   nagios  21006 Aug 12 22:46 NETWORK-SERVICES-MIB.txt
-rw-r--r--. 1 root   nagios  24694 Aug 12 22:46 NOTIFICATION-LOG-MIB.txt
drwxr-sr-x  2 apache nagios   4096 Sep 23 06:22 processed_mibs
-rw-r--r--. 1 root   nagios   3067 Aug 12 22:46 RFC1155-SMI.txt
-rw-r--r--. 1 root   nagios  79667 Aug 12 22:46 RFC1213-MIB.txt
-rw-r--r--. 1 root   nagios   1174 Aug 12 22:46 RFC-1215.txt
-rw-r--r--. 1 root   nagios 147822 Aug 12 22:46 RMON-MIB.txt
-rw-r--r--. 1 root   nagios  45323 Aug 12 22:46 SCTP-MIB.txt
-rw-r--r--. 1 root   nagios   4595 Aug 12 22:46 SMUX-MIB.txt
-rw-r--r--. 1 root   nagios  15490 Aug 12 22:46 SNMP-COMMUNITY-MIB.txt
-rw-r--r--. 1 root   nagios  22342 Aug 12 22:46 SNMP-FRAMEWORK-MIB.txt
-rw-r--r--. 1 root   nagios   5496 Aug 12 22:46 SNMP-MPD-MIB.txt
-rw-r--r--. 1 root   nagios  20014 Aug 12 22:46 SNMP-NOTIFICATION-MIB.txt
-rw-r--r--. 1 root   nagios   9106 Aug 12 22:46 SNMP-PROXY-MIB.txt
-rw-r--r--. 1 root   nagios  22769 Aug 12 22:46 SNMP-TARGET-MIB.txt
-rw-r--r--. 1 root   nagios  39201 Aug 12 22:46 SNMP-USER-BASED-SM-MIB.txt
-rw-r--r--. 1 root   nagios   2205 Aug 12 22:46 SNMP-USM-AES-MIB.txt
-rw-r--r--. 1 root   nagios  21101 Aug 12 22:46 SNMP-USM-DH-OBJECTS-MIB.txt
-rw-r--r--. 1 root   nagios   8263 Aug 12 22:46 SNMPv2-CONF.txt
-rw-r--r--. 1 root   nagios  29305 Aug 12 22:46 SNMPv2-MIB.txt
-rw-r--r--. 1 root   nagios   8924 Aug 12 22:46 SNMPv2-SMI.txt
-rw-r--r--. 1 root   nagios  38034 Aug 12 22:46 SNMPv2-TC.txt
-rw-r--r--. 1 root   nagios   5775 Aug 12 22:46 SNMPv2-TM.txt
-rw-r--r--. 1 root   nagios  34162 Aug 12 22:46 SNMP-VIEW-BASED-ACM-MIB.txt
-rw-r--r--. 1 root   nagios  28564 Aug 12 22:46 TCP-MIB.txt
-rw-r--r--. 1 root   nagios  16418 Aug 12 22:46 TRANSPORT-ADDRESS-MIB.txt
-rw-r--r--. 1 root   nagios   2163 Aug 12 22:46 UCD-DEMO-MIB.txt
-rw-r--r--. 1 root   nagios   4402 Aug 12 22:46 UCD-DISKIO-MIB.txt
-rw-r--r--. 1 root   nagios   3010 Aug 12 22:46 UCD-DLMOD-MIB.txt
-rw-r--r--. 1 root   nagios   8118 Aug 12 22:46 UCD-IPFWACC-MIB.txt
-rw-r--r--. 1 root   nagios  46150 Aug 12 22:46 UCD-SNMP-MIB.txt
-rw-r--r--. 1 root   nagios  20882 Aug 12 22:46 UDP-MIB.txt
ll /var/spool/snmptt

Code: Select all

[root@nagios spool]# ll /var/spool/snmptt
total 0
ll /var/log/snmptt

Code: Select all

[root@nagios spool]# ll /var/log/snmptt
total 4
-rw-r--r-- 1 root root 395 Sep 23 07:04 snmpttsystem.log
tail /var/log/snmptt/unknown_log

Code: Select all

[root@nagios snmptt]# tail /var/log/snmptt/unknown_log
tail: cannot open `/var/log/snmptt/unknown_log' for reading: No such file or directory
Waiting for your reply.

Re: Monitoring network device which can send SNMP Trap

Posted: Mon Sep 23, 2013 10:28 am
by sreinhardt
According to the system log, it looks like you have attempted to configured for mysql logging? Have you also disabled flat file logging? Per your snmpttsystem.log, it states that no traps have come in at this point.

Re: Monitoring network device which can send SNMP Trap

Posted: Mon Sep 23, 2013 9:06 pm
by phyolwin
Yeah. I want to log with MySql also. Because we want to see the error log of snmp trap from web interface. ( I will install NSTI when current problem have solved.)

What do you mean "have you disabled flat file logging?" ? I didn't get it.
You mean this:(This is from /etc/snmp/snmptt.ini)

Code: Select all

# Set to 1 to enable text logging of *TRAPS*.  Make sure you specify a log_file
# location
log_enable = 1
# Log file location.  The COMPLETE path and filename.  Ex: '/var/log/snmptt/snmptt.log'
log_file = /var/log/snmptt/snmptt.log
# Set to 1 to enable text logging of *SNMPTT system errors*.  Make sure you
# specify a log_system_file location
log_system_enable = 1
# Log file location.  The COMPLETE path and filename.
# Ex: '/var/log/snmptt/snmpttsystem.log'
log_system_file = /var/log/snmptt/snmpttsystem.log
To get the trap from the device, I already point Nagios XI server ip address on SNMP Trap destination. And allowed the UDP port 162 on nagios xi server firewall.

If I used snmpwalk 192.168.1.100 -v2c -c public command from nagios, I can get the respond. (In this case 192.168.1.100 is the device that we want to monitor).

I don't know which configuration is missed out.

Re: Monitoring network device which can send SNMP Trap

Posted: Tue Sep 24, 2013 10:01 am
by sreinhardt
Well, snmpwalks and gets are completely separate from traps. Having one respond, does not mean the other will, unfortunately. The fact that you do not have an snmptt_unknown log was pointing me towards that you may not have flat file logging enabled. Since you do, next could you tar the /etc/snmp directory and send it to me please.

Code: Select all

cd /tmp
tar pcjf etc-snmp.tar.bz2 /etc/snmp/

Re: Monitoring network device which can send SNMP Trap

Posted: Tue Sep 24, 2013 9:08 pm
by phyolwin
Thanks for your reply. Here is the link that you requested.

Code: Select all

http://bit.ly/19xOjmY