Page 1 of 3

net-snmp

Posted: Wed Sep 03, 2014 8:58 am
by hanya.radwan
hi,

i installed net-snmp on redhat server, and add all MIBs but this server not send trap ?
shall I modify this parameter in snmptt.ini at nagios server "net_snmp_perl_best_guess = 0" to 1?

please I need way to check if remote host send trap or for tracing ?
please what is the best way to deal with traps or help document descrip that in details since I follow up the same steps in the user guide but not traps reach?

thanks,

Re: net-snmp

Posted: Wed Sep 03, 2014 3:40 pm
by tmcdonald
Let's check the basics:

Code: Select all

service snmptrapd status
service snmptt status
service crond status
Is the remote server not sending traps or is Nagios not receiving them? Or are you not sure which it is?

Re: net-snmp

Posted: Thu Sep 04, 2014 3:51 am
by hanya.radwan
i run the command on Nagios server:-

[root@nms ~]# service snmptrapd status
snmptrapd (pid 31337) is running...
You have new mail in /var/spool/mail/root
[root@nms ~]# service snmptt status
snmptt (pid 41311) is running...
[root@nms ~]# service crond status
crond (pid 1854) is running...
regards remote server< I don't know, how can I debug that

Re: net-snmp

Posted: Thu Sep 04, 2014 10:48 am
by lmiltchev
How are you sending traps? Are you using Nagios XI and the SNMP Trap Sender component? Can you explain in details?

Re: net-snmp

Posted: Mon Sep 08, 2014 7:52 am
by hanya.radwan
it is sending trap
I added rocommunity public 10.102.4.10 .1.3.6.1.2.1.1 to the /etc/snmp/snmpd.conf(remote host server)
snmp Ok:
/check_snmp -H 10.200.21.58 -o .1.3.6.1.2.1.1.3.0 -C public
SNMP OK - Timeticks: (435715) 1:12:37.15 |
also I try to check storage , an error appear:
[root@nms libexec]# ./check_snmp_storage.pl -H 10.200.21.58 -C public -m "^/$" -w 2 -c 4
ERROR: Description/Type table : Requested table is empty or does not exist.
also
[root@nms ~]# snmpwalk -v2c -c public 10.200.21.58 system
No log handling enabled - turning on stderr logging
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
SNMPv2-MIB::sysDescr.0 = STRING: Linux db1.jawwal.ps 2.6.18-92.el5PAE #1 SMP Tue Apr 29 13:31:02 EDT 2008 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (349273) 0:58:12.73
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: db1.jawwal.ps
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: RFC1213-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.8 = No more variables left in this MIB View (It is past the end of the MIB tree)

Re: net-snmp

Posted: Mon Sep 08, 2014 12:17 pm
by sreinhardt
OK you are talking about two totally different but related through the use of snmp, tasks. Are you attempting to run snmpd and have this system accessible for check_snmp checks against it, or do you want it to sent traps to your nagios instance on its own? Your initial comments indicate that you want this system to send to nagios, but your last two posts indicate that you actually just want to be able to use check_snmp against it, we need to clarify what exactly you are attempting to do.

Re: net-snmp

Posted: Tue Sep 09, 2014 5:12 am
by hanya.radwan
I want the two options:
1- Nagios check server resources and logs
2-server send traps to Nagios

Re: net-snmp

Posted: Tue Sep 09, 2014 4:52 pm
by tmcdonald
Let's take a look at the traps first. Are you getting any entries in your /var/log/snmptt/snmpttunknown.log file relating to the traps? Are there any files in /var/spool/snmptt at all?

Also, can you please identify which IP is for the Nagios server and which is for the remote server to confirm?

Re: net-snmp

Posted: Thu Sep 11, 2014 4:27 am
by hanya.radwan
no traps in the unknown related to our traps

and there are files in snmptt
[root@nms snmptt]# ls -ltr
total 12
-rw-r--r-- 1 root root 473 Sep 11 12:25 #snmptt-trap-1410427505042897
-rw-r--r-- 1 root root 500 Sep 11 12:25 #snmptt-trap-1410427506110460
-rw-r--r-- 1 root root 476 Sep 11 12:25 #snmptt-trap-1410427506590022

nagios IP:10.102.4.10

remote server IP:10.200.21.58

Re: net-snmp

Posted: Thu Sep 11, 2014 4:28 pm
by tmcdonald
Can you post the contents of your /etc/snmp/snmptt.conf file please? Let's also take a look at your snmptt.ini:

Code: Select all

grep "mode =" /etc/snmp/snmptt.ini
Did you follow a particular guide for setting up SNMP traps? If so, please link to it.