SNMP - Interface Graphing

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
dinux
Posts: 15
Joined: Tue Dec 20, 2005 6:55 pm
Location: Scottsdale, AZ, USA
Contact:

SNMP - Interface Graphing

Post by dinux »

Well, lets start with the fact that I am new to both SNMP and Cacti. I have it up and running and graphing two systems using the Unix graphs for Load Averages and a few others. Any time I try something with SNMP and then run in the query verbose I get the following:

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'

Can someone help me out with why I am not getting an SNMP Data return please? Thanks !
ua_mk_2005
Posts: 15
Joined: Mon Dec 19, 2005 11:21 am
Location: Columbus, Ohio, U.S.A.

Post by ua_mk_2005 »

Don't take this the wrong way, but is SNMP installed? If so, check if it is working by trying snmpwalk on a host. If you arent sure on how to use it, just man snmpwalk. Basically, the syntax (on an snmp1 host) would be:

snmpwalk -v <version> -c <community> hostname or ip

Like: snmpwalk -v 1 -c Public 192.168.1.5

That helps rule in or out SNMP as the issue. It would also help if you post your platform, and version, as well as the versions of Apache, net-snmp, php, mysql, etc... to make sure you are using compatible versions.
dinux
Posts: 15
Joined: Tue Dec 20, 2005 6:55 pm
Location: Scottsdale, AZ, USA
Contact:

Post by dinux »

Haha! No worries. If you need something answered to help me, stupid or not, then I will give you what I can. First, the platform:

OS: Fedora Core 4
MySQL: Ver 14.7 Distrib 4.1.15, for redhat-linux-gnu (i386) using readline 4.3
PHP: PHP 5.0.4 (cli) (built: Nov 8 2005 08:27:12)
Apache: 2.0.54
net-snmp: 5.2.1.2

Output from a remote server:
SNMPv2-MIB::sysDescr.0 = STRING: Linux skittles.blankverse.net 2.6.12-1.1398_FC4 #1 Fri Jul 15 00:52:32 EDT 2005 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (5591584) 15:31:55.84
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/sn mp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: skittles.blankverse.net
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: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects fo r network interface sub-layers
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing TCP implementatio ns
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP imple mentations
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing UDP implementatio ns
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.8 = STRING: The MIB for Message Processing and Dispatchin g.
SNMPv2-MIB::sysORDescr.9 = STRING: The management information definitions for th e SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (1) 0:00:00.01
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (271880665) 31 days, 11:13:26. 65
End of MIB

Output from localhost:
SNMPv2-MIB::sysDescr.0 = STRING: Linux pipin.netboundaries.com 2.6.14-1.1653_FC4smp #1 SMP Tue Dec 13 21:46:01 EST 2005 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (5458820) 15:09:48.20
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: pipin.netboundaries.com
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-layers
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.8 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.9 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (2) 0:00:00.02
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (13980184) 1 day, 14:50:01.84
End of MIB

So to me it appears to be working fine. But like I said, I am new to SNMP and what not. Thank you for the help!
ua_mk_2005
Posts: 15
Joined: Mon Dec 19, 2005 11:21 am
Location: Columbus, Ohio, U.S.A.

Post by ua_mk_2005 »

I agree, it looks to be installed correctly. Have you looked at the cacti logs and the SNMP cache? Try setting the logging to debug, then run poller.php from the shell. Does it run that way? If so, it may be related to permissions with the cacti user. When I was debugging my installation, I gave the cacti user a login shell, and su'd to _cacti then ran poller.php. I also know that PHP 5 isnt really supported. You may try removing PHP 5 and going back to PHP 4 (but the fact that you are graphing local stuff leads me to believe that PHP is fine). You are also able to walk the SNMP trees, so that looks to be ok too... I'd start with the cacti logs and the SNMP cache. Clear them both before you start, so that the errors will be easy to find.
Once in a while you get shown the light in the strangest of places if you look at it right.

-Robert Hunter
dinux
Posts: 15
Joined: Tue Dec 20, 2005 6:55 pm
Location: Scottsdale, AZ, USA
Contact:

Post by dinux »

Ok, so I had our Vice President of Software Engineering help me out and we got it working. He gave me a copy of our snmpd.conf files here and I tweaked it a little to match my settings and now we're up and running. Thank you much!
ua_mk_2005
Posts: 15
Joined: Mon Dec 19, 2005 11:21 am
Location: Columbus, Ohio, U.S.A.

Post by ua_mk_2005 »

Nice... I forgot about that. I guess I assumed that since you were able to run snmpwalk, that you had snmpd running. That's what I get for assuming. In the future, there is a really easy way to configure SNMP. Run snmpconf and it will ask you a series of questions that will allow you to create an snmpd.conf file. Once the file is created, you copy it to /usr/local/share/snmp (at least on *bsd) and then start snmpd on startup , linux may be different, with the System V init, and init levels and what have you... Glad you were able to get it working.
Once in a while you get shown the light in the strangest of places if you look at it right.

-Robert Hunter
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

new post split off into http://forums.cacti.net/viewtopic.php?t=11224
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests