Hi all,
I hope someone can help me with this one.
I'm trying to graph all traffic on the localhost's network card with Cacti.
From what I understand I should use SNMP to query the traffic, but I can't
seem to get SNMP info for the network interface.
I have installed all the necessary snmp tools, "yum install snmpd net-snmp net-snmp-utils net-snmp-devel net-snmpt-libs " and then started snmpd (/etc/init.d/snmpd start)
running snmpwalk, I get the following:
snmpwalk -v 1 -c public localhost SNMPv2-MIB::sysDescr.0 = STRING: Linux localhost 2.6.18-92.1.10.el5xen #1 SMP Tue Aug 5 08:11:18 EDT 2008 x86_64 SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (127237) 0:21:12.37 SNMPv2-MIB::sysContact.0 = STRING: Rudi Ahlers root@localhost SNMPv2-MIB::sysName.0 = STRING: localhost SNMPv2-MIB::sysLocation.0 = STRING: IS SNMPv2-MIB::sysORLastChange.0 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB SNMPv2-MIB::sysORID.3 = OID: IP-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: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.2 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.3 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.4 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.5 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.6 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.7 = Timeticks: (6) 0:00:00.06 SNMPv2-MIB::sysORUpTime.8 = Timeticks: (6) 0:00:00.06 HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (130862) 0:21:48.62 End of MIB
Yet, when I try and query the "SNMP - Interface Statistics", it doesn't return any information.
Running debug for the interface in Cacti, I get the following:
+ Running data query [1]. + Found type = '3' [snmp query]. + Found data query XML file at '/var/www/html/graphs/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/graphs/resource/snmp_queries/interface.xml' + Found data query XML file at '/var/www/html/graphs/resource/snmp_queries/interface.xml' + Found data query XML file at '/var/www/html/graphs/resource/snmp_queries/interface.xml'
Can someone please help me with this one?
Rudi Ahlers wrote:
running snmpwalk, I get the following:
Likely you need to open up your snmpd.conf, take a look at this one as an example: http://portal.aphroland.org/~aphro/snmp/snmpd.conf
For CentOS 4.x at least the OIDs are:
eth0 in: .1.3.6.1.2.1.2.2.1.10.2 eth0 out: .1.3.6.1.2.1.2.2.1.16.2 eth1 in: .1.3.6.1.2.1.2.2.1.10.3 eth1 out: .1.3.6.1.2.1.2.2.1.16.3
[cacti@dc1-mon002:~/bin]$ snmpget -v1 -c public localhost .1.3.6.1.2.1.2.2.1.10.2 IF-MIB::ifInOctets.2 = Counter32: 1203591015 [cacti@dc1-mon002:~/bin]$ snmpget -v1 -c public localhost .1.3.6.1.2.1.2.2.1.16.2 IF-MIB::ifOutOctets.2 = Counter32: 4079516345
For cacti I use all my own custom scripts to gather data, I don't use the built in stuff. I've gotten my custom install to scale to 10.6 million data points updated per day, and I'm only running at 16% cpu usage. Love that efficiency, though unfortunately I can't virtualize it as it's too page fault heavy(just nailed that down this morning).
nate
On Fri, Aug 8, 2008 at 9:05 PM, nate centos@linuxpowered.net wrote:
Rudi Ahlers wrote:
running snmpwalk, I get the following:
Likely you need to open up your snmpd.conf, take a look at this one as an example: http://portal.aphroland.org/~aphro/snmp/snmpd.confhttp://portal.aphroland.org/%7Eaphro/snmp/snmpd.conf
For CentOS 4.x at least the OIDs are:
eth0 in: .1.3.6.1.2.1.2.2.1.10.2 eth0 out: .1.3.6.1.2.1.2.2.1.16.2 eth1 in: .1.3.6.1.2.1.2.2.1.10.3 eth1 out: .1.3.6.1.2.1.2.2.1.16.3
[cacti@dc1-mon002:~/bin]$ snmpget -v1 -c public localhost .1.3.6.1.2.1.2.2.1.10.2 IF-MIB::ifInOctets.2 = Counter32: 1203591015 [cacti@dc1-mon002:~/bin]$ snmpget -v1 -c public localhost .1.3.6.1.2.1.2.2.1.16.2 IF-MIB::ifOutOctets.2 = Counter32: 4079516345
For cacti I use all my own custom scripts to gather data, I don't use the built in stuff. I've gotten my custom install to scale to 10.6 million data points updated per day, and I'm only running at 16% cpu usage. Love that efficiency, though unfortunately I can't virtualize it as it's too page fault heavy(just nailed that down this morning).
nate
Hey Nate,
What you just said made me think, check what interfaces are listed, so I got this:
snmpwalk -Of -v2c -c public localhost interfaces .iso.org.dod.internet.mgmt.mib-2.interfaces = No Such Object available on this agent at this OID
So the question now is, what should the OID's be for CentOS 5.2 to get the network car's SNMP info? And where exactly do I add it to the snmpd.conf file?
Rudi Ahlers wrote:
snmpwalk -Of -v2c -c public localhost interfaces .iso.org.dod.internet.mgmt.mib-2.interfaces = No Such Object available on this agent at this OID
So the question now is, what should the OID's be for CentOS 5.2 to get the network car's SNMP info? And where exactly do I add it to the snmpd.conf file?
I think your getting that response because your snmpd.conf security config is not allowing that community string to access that portion of the stats.
nate
On Fri, Aug 8, 2008 at 10:19 PM, nate centos@linuxpowered.net wrote:
Rudi Ahlers wrote:
snmpwalk -Of -v2c -c public localhost interfaces .iso.org.dod.internet.mgmt.mib-2.interfaces = No Such Object available on this agent at this OID
So the question now is, what should the OID's be for CentOS 5.2 to get
the
network car's SNMP info? And where exactly do I add it to the snmpd.conf file?
I think your getting that response because your snmpd.conf security config is not allowing that community string to access that portion of the stats.
nate
Hello Nate,
It could be, but I don't know snmp at all. What do I need to change, if you don't mind telling me?
Rudi Ahlers wrote on Sat, 9 Aug 2008 09:18:45 +0200:
It could be, but I don't know snmp at all. What do I need to change, if you don't mind telling me?
net-snmp? I didn't have much knowledge about SNMP until yesterday either where I started to play with getting readings from sensors via SNMP. Just look in the snmpd.conf. There's some description and there's commented stuff. You uncomment that, change the values for network and community (so nobody knows your community) and off you go. Really easy, at least that part. Much more difficult to actually make use of it and how to make use of a vendor- specific MIB.
Kai
2008/8/9 Rudi Ahlers rudiahlers@gmail.com:
It could be, but I don't know snmp at all. What do I need to change, if you don't mind telling me?
You can try creating a /etc/snmp/snmpd.conf file with only this line in it:
rocommunity public 192.168.1.0/24
If you want, change "public" to a (secret) community name you want, and change the IP range to the IP range you want to allow to query your server via SNMP. (Note that localhost is not included there, so include another line for 127.0.0.0/8 if you want queries from localhost.)
This will expose the whole MIB to any host on that IP range using that community name, and it is a good starting point for your configuration.
This should be enough to get you started. However, this is a very permissive configuration (although it doesn't allow writes which could be dangerous in terms of allowing other hosts to change settings on your host). It's OK for me, but it might not be considering your security policies. If you need something more restrictive than that, read the snmpd.conf manual page very carefully to establish what exactly you need.
HTH, Filipe
On Sun, Aug 10, 2008 at 6:50 PM, Filipe Brandenburger filbranden@gmail.comwrote:
2008/8/9 Rudi Ahlers rudiahlers@gmail.com:
It could be, but I don't know snmp at all. What do I need to change, if
you
don't mind telling me?
You can try creating a /etc/snmp/snmpd.conf file with only this line in it:
rocommunity public 192.168.1.0/24
If you want, change "public" to a (secret) community name you want, and change the IP range to the IP range you want to allow to query your server via SNMP. (Note that localhost is not included there, so include another line for 127.0.0.0/8 if you want queries from localhost.)
This will expose the whole MIB to any host on that IP range using that community name, and it is a good starting point for your configuration.
This should be enough to get you started. However, this is a very permissive configuration (although it doesn't allow writes which could be dangerous in terms of allowing other hosts to change settings on your host). It's OK for me, but it might not be considering your security policies. If you need something more restrictive than that, read the snmpd.conf manual page very carefully to establish what exactly you need.
HTH, Filipe _______________________________________________
Unfortunately this didn't work. Although I could see a whole lot of MIB's now, Cacti still doesn't graph the network interface
The error I'm getting is :
*Data Query* [SNMP - Interface Statistics] [image: Reload Associated Query]http://saturn.softdux.com/graphs/graphs_new.php?action=query_reload&id=1&host_id=1 This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug modehttp://saturn.softdux.com/graphs/host.php?action=query_verbose&id=1&host_id=1to get more information.
When I enable debug mode for the interface, this is all I get:
+ Running data query [1]. + Found type = '3' [snmp query]. + Found data query XML file at '/var/www/html/graphs/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' + Located input field 'ifIndex' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.1' + Found item [ifIndex='1'] index: 1 [from value] + Found item [ifIndex='2'] index: 2 [from value] + Found item [ifIndex='3'] index: 3 [from value] + Found item [ifIndex='4'] index: 4 [from value] + Found item [ifIndex='5'] index: 5 [from value] + Found item [ifIndex='6'] index: 6 [from value] + Found item [ifIndex='7'] index: 7 [from value] + Found item [ifIndex='8'] index: 8 [from value] + Found item [ifIndex='9'] index: 9 [from value] + Found item [ifIndex='10'] index: 10 [from value] + Found item [ifIndex='11'] index: 11 [from value] + Found item [ifIndex='15'] index: 15 [from value] + Found item [ifIndex='20'] index: 20 [from value] + Found item [ifIndex='21'] index: 21 [from value] + Found item [ifIndex='25'] index: 25 [from value] + Located input field 'ifOperStatus' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.8' + Found item [ifOperStatus='Up'] index: 1 [from value] + Found item [ifOperStatus='Up'] index: 2 [from value] + Found item [ifOperStatus='Down'] index: 3 [from value] + Found item [ifOperStatus='Up'] index: 4 [from value] + Found item [ifOperStatus='Up'] index: 5 [from value] + Found item [ifOperStatus='Down'] index: 6 [from value] + Found item [ifOperStatus='Down'] index: 7 [from value] + Found item [ifOperStatus='Down'] index: 8 [from value] + Found item [ifOperStatus='Down'] index: 9 [from value] + Found item [ifOperStatus='Down'] index: 10 [from value] + Found item [ifOperStatus='Down'] index: 11 [from value] + Found item [ifOperStatus='Up'] index: 15 [from value] + Found item [ifOperStatus='Up'] index: 20 [from value] + Found item [ifOperStatus='Up'] index: 21 [from value] + Found item [ifOperStatus='Up'] index: 25 [from value] + Located input field 'ifDescr' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.2' + Found item [ifDescr='lo'] index: 1 [from value] + Found item [ifDescr='peth0'] index: 2 [from value] + Found item [ifDescr='sit0'] index: 3 [from value] + Found item [ifDescr='vif0.0'] index: 4 [from value] + Found item [ifDescr='eth0'] index: 5 [from value] + Found item [ifDescr='vif0.1'] index: 6 [from value] + Found item [ifDescr='veth1'] index: 7 [from value] + Found item [ifDescr='vif0.2'] index: 8 [from value] + Found item [ifDescr='veth2'] index: 9 [from value] + Found item [ifDescr='vif0.3'] index: 10 [from value] + Found item [ifDescr='veth3'] index: 11 [from value] + Found item [ifDescr='xenbr0'] index: 15 [from value] + Found item [ifDescr='vif8.0'] index: 20 [from value] + Found item [ifDescr='vif9.0'] index: 21 [from value] + Found item [ifDescr='vifzsas0'] index: 25 [from value] + Located input field 'ifName' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.1' + Found item [ifName='lo'] index: 1 [from value] + Found item [ifName='peth0'] index: 2 [from value] + Found item [ifName='sit0'] index: 3 [from value] + Found item [ifName='vif0.0'] index: 4 [from value] + Found item [ifName='eth0'] index: 5 [from value] + Found item [ifName='vif0.1'] index: 6 [from value] + Found item [ifName='veth1'] index: 7 [from value] + Found item [ifName='vif0.2'] index: 8 [from value] + Found item [ifName='veth2'] index: 9 [from value] + Found item [ifName='vif0.3'] index: 10 [from value] + Found item [ifName='veth3'] index: 11 [from value] + Found item [ifName='xenbr0'] index: 15 [from value] + Found item [ifName='vif8.0'] index: 20 [from value] + Found item [ifName='vif9.0'] index: 21 [from value] + Found item [ifName='vifzsas0'] index: 25 [from value] + Located input field 'ifAlias' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.18' + Found item [ifAlias=''] index: 1 [from value] + Found item [ifAlias=''] index: 2 [from value] + Found item [ifAlias=''] index: 3 [from value] + Found item [ifAlias=''] index: 4 [from value] + Found item [ifAlias=''] index: 5 [from value] + Found item [ifAlias=''] index: 6 [from value] + Found item [ifAlias=''] index: 7 [from value] + Found item [ifAlias=''] index: 8 [from value] + Found item [ifAlias=''] index: 9 [from value] + Found item [ifAlias=''] index: 10 [from value] + Found item [ifAlias=''] index: 11 [from value] + Found item [ifAlias=''] index: 15 [from value] + Found item [ifAlias=''] index: 20 [from value] + Found item [ifAlias=''] index: 21 [from value] + Found item [ifAlias=''] index: 25 [from value] + Located input field 'ifType' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3' + Found item [ifType='softwareLoopback(24)'] index: 1 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 2 [from value] + Found item [ifType='tunnel(131)'] index: 3 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 4 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 5 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 6 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 7 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 8 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 9 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 10 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 11 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 15 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 20 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 21 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 25 [from value] + Located input field 'ifSpeed' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.5' + Found item [ifSpeed='10000000'] index: 1 [from value] + Found item [ifSpeed='1000000000'] index: 2 [from value] + Found item [ifSpeed='0'] index: 3 [from value] + Found item [ifSpeed='10000000'] index: 4 [from value] + Found item [ifSpeed='10000000'] index: 5 [from value] + Found item [ifSpeed='10000000'] index: 6 [from value] + Found item [ifSpeed='10000000'] index: 7 [from value] + Found item [ifSpeed='10000000'] index: 8 [from value] + Found item [ifSpeed='10000000'] index: 9 [from value] + Found item [ifSpeed='10000000'] index: 10 [from value] + Found item [ifSpeed='10000000'] index: 11 [from value] + Found item [ifSpeed='10000000'] index: 15 [from value] + Found item [ifSpeed='10000000'] index: 20 [from value] + Found item [ifSpeed='10000000'] index: 21 [from value] + Found item [ifSpeed='10000000'] index: 25 [from value] + Located input field 'ifHwAddr' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.6' + Found item [ifHwAddr=''] index: 1 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 2 [from value] + Found item [ifHwAddr=''] index: 3 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 4 [from value] + Found item [ifHwAddr='00:00:1C:C0:52:6A:D8'] index: 5 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 6 [from value] + Found item [ifHwAddr=''] index: 7 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 8 [from value] + Found item [ifHwAddr=''] index: 9 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 10 [from value] + Found item [ifHwAddr=''] index: 11 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 15 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 20 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 21 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 25 [from value] + Located input field 'ifIP' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.4.20.1.2' + Found item [ifIP='127.0.0.1'] index: 1 [from regexp oid parse] + Found item [ifIP='192.168.10.11'] index: 5 [from regexp oid parse] + Found item [ifIP='196.34.136.110'] index: 5 [from regexp oid parse] + Found data query XML file at '/var/www/html/graphs/resource/snmp_queries/interface.xml' + Found data query XML file at '/var/www/html/graphs/resource/snmp_queries/interface.xml' + Found data query XML file at '/var/www/html/graphs/resource/snmp_queries/interface.xml'
On Wed, Aug 13, 2008 at 04:00, Rudi Ahlers rudiahlers@gmail.com wrote:
Unfortunately this didn't work. Although I could see a whole lot of MIB's now, Cacti still doesn't graph the network interface
I'm not an expert on Cacti, but... are you sure you configured the proper interface name on it? Are you sure it is looking for, e.g., eth0?
From the output, these are the interface names you have on your system:
+ Found item [ifName='lo'] index: 1 [from value] + Found item [ifName='peth0'] index: 2 [from value] + Found item [ifName='sit0'] index: 3 [from value] + Found item [ifName='vif0.0'] index: 4 [from value] + Found item [ifName='eth0'] index: 5 [from value] + Found item [ifName='vif0.1'] index: 6 [from value] + Found item [ifName='veth1'] index: 7 [from value] + Found item [ifName='vif0.2'] index: 8 [from value] + Found item [ifName='veth2'] index: 9 [from value] + Found item [ifName='vif0.3'] index: 10 [from value] + Found item [ifName='veth3'] index: 11 [from value] + Found item [ifName='xenbr0'] index: 15 [from value] + Found item [ifName='vif8.0'] index: 20 [from value] + Found item [ifName='vif9.0'] index: 21 [from value] + Found item [ifName='vifzsas0'] index: 25 [from value]
And these are the IPs assigned to eth0:
+ Found item [ifIP='192.168.10.11'] index: 5 [from regexp oid parse] + Found item [ifIP='196.34.136.110'] index: 5 [from regexp oid parse]
HTH, Filipe
On Wed, Aug 13, 2008 at 2:26 PM, Filipe Brandenburger filbranden@gmail.comwrote:
On Wed, Aug 13, 2008 at 04:00, Rudi Ahlers rudiahlers@gmail.com wrote:
Unfortunately this didn't work. Although I could see a whole lot of MIB's now, Cacti still doesn't graph the network interface
I'm not an expert on Cacti, but... are you sure you configured the proper interface name on it? Are you sure it is looking for, e.g., eth0?
From the output, these are the interface names you have on your system:
- Found item [ifName='lo'] index: 1 [from value]
- Found item [ifName='peth0'] index: 2 [from value]
- Found item [ifName='sit0'] index: 3 [from value]
- Found item [ifName='vif0.0'] index: 4 [from value]
- Found item [ifName='eth0'] index: 5 [from value]
- Found item [ifName='vif0.1'] index: 6 [from value]
- Found item [ifName='veth1'] index: 7 [from value]
- Found item [ifName='vif0.2'] index: 8 [from value]
- Found item [ifName='veth2'] index: 9 [from value]
- Found item [ifName='vif0.3'] index: 10 [from value]
- Found item [ifName='veth3'] index: 11 [from value]
- Found item [ifName='xenbr0'] index: 15 [from value]
- Found item [ifName='vif8.0'] index: 20 [from value]
- Found item [ifName='vif9.0'] index: 21 [from value]
- Found item [ifName='vifzsas0'] index: 25 [from value]
And these are the IPs assigned to eth0:
- Found item [ifIP='192.168.10.11'] index: 5 [from regexp oid parse]
- Found item [ifIP='196.34.136.110'] index: 5 [from regexp oid parse]
HTH, Filipe _______________________________________________
Well, that's the thing, in Cacti there' an option, "SMP Interface Statistics" - which you need to enable first, and then select the different interfaces. It's supposed to list eth0 - xenbr0, and everything in between, but it doesn't.
Rudi Ahlers wrote:
Well, that's the thing, in Cacti there' an option, "SMP Interface Statistics" - which you need to enable first, and then select the different interfaces. It's supposed to list eth0 - xenbr0, and everything in between, but it doesn't.
Run a snmpwalk against your system's full tree and count the lines just to verify that it's wide open
snmpwalk -v1 -c public localhost .1 | wc -l
One of my systems returns over 4500 lines, if yours is returning a small amount(few dozen) then security is too tight for the community string your using and you need to adjust snmpd.conf
See this as an example: http://portal.aphroland.org/~aphro/snmp/snmpd.conf
nate
On Wed, Aug 13, 2008 at 3:20 PM, nate centos@linuxpowered.net wrote:
Rudi Ahlers wrote:
Well, that's the thing, in Cacti there' an option, "SMP Interface Statistics" - which you need to enable first, and then select the
different
interfaces. It's supposed to list eth0 - xenbr0, and everything in
between,
but it doesn't.
Run a snmpwalk against your system's full tree and count the lines just to verify that it's wide open
snmpwalk -v1 -c public localhost .1 | wc -l
One of my systems returns over 4500 lines, if yours is returning a small amount(few dozen) then security is too tight for the community string your using and you need to adjust snmpd.conf
See this as an example: http://portal.aphroland.org/~aphro/snmp/snmpd.confhttp://portal.aphroland.org/%7Eaphro/snmp/snmpd.conf
nate
Mine returns 6861 entries:
snmpwalk -v1 -c public localhost .1 | wc -l
6861 [root@saturn snmp]# [root@saturn snmp]# more snmpd.conf rocommunity public 127.0.0.1
includeAllDisks
Rudi Ahlers wrote:
Mine returns 6861 entries:
snmpwalk -v1 -c public localhost .1 | wc -l
6861
And cacti still doesn't see the interfaces? Did you change the snmpd.conf after adding the device into cacti? Cacti doesn't automatically pick up new devices, you have to tell it to re-issue the SNMP query. In the device page for the server click on the little green circle, I think that's the link that tells cacti to re-scan the device.
My cacti consoles aren't easily accessible from where I'm at so I can't verify exactly right now.
I've never seen cacti not pick up the interfaces when the SNMP permissions are correct. And it sounds like yours are fine, at least right now.
nate
On Wed, Aug 13, 2008 at 3:36 PM, nate centos@linuxpowered.net wrote:
Rudi Ahlers wrote:
Mine returns 6861 entries:
snmpwalk -v1 -c public localhost .1 | wc -l
6861
And cacti still doesn't see the interfaces? Did you change the snmpd.conf after adding the device into cacti? Cacti doesn't automatically pick up new devices, you have to tell it to re-issue the SNMP query. In the device page for the server click on the little green circle, I think that's the link that tells cacti to re-scan the device.
My cacti consoles aren't easily accessible from where I'm at so I can't verify exactly right now.
I've never seen cacti not pick up the interfaces when the SNMP permissions are correct. And it sounds like yours are fine, at least right now.
nate
Hi Nate,
Yes, I have clicked on the green circle a few times, and I have even removed the "Interface Statistics" altogether, and added it again
Rudi Ahlers wrote:
Yes, I have clicked on the green circle a few times, and I have even removed the "Interface Statistics" altogether, and added it again
Very strange, can you include the output of the verbose query? What version of cacti?
This is what I get, though I don't use this method to get network stats from my systems, I have scripts that gather it for me(they return about 20 points of data that I put into a single RRD per-host, vastly improving performance by 10x+, though it's a labor intensive process to add a new system to cacti for me as cacti wasn't designed for doing things the way I'm doing them).
+ Running data query [1]. + Found type = '3' [snmp query]. + Found data query XML file at '/home/cacti/public_html/cacti-0.8.7b/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' + Located input field 'ifIndex' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.1' + Found item [ifIndex='1'] index: 1 [from value] + Found item [ifIndex='2'] index: 2 [from value] + Found item [ifIndex='3'] index: 3 [from value] + Found item [ifIndex='4'] index: 4 [from value] + Located input field 'ifOperStatus' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.8' + Found item [ifOperStatus='Up'] index: 1 [from value] + Found item [ifOperStatus='Up'] index: 2 [from value] + Found item [ifOperStatus='Down'] index: 3 [from value] + Found item [ifOperStatus='Down'] index: 4 [from value] + Located input field 'ifDescr' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.2' + Found item [ifDescr='lo'] index: 1 [from value] + Found item [ifDescr='eth0'] index: 2 [from value] + Found item [ifDescr='eth1'] index: 3 [from value] + Found item [ifDescr='sit0'] index: 4 [from value] + Located input field 'ifName' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.1' + Located input field 'ifAlias' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.18' + Located input field 'ifType' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3' + Found item [ifType='softwareLoopback(24)'] index: 1 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 2 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 3 [from value] + Found item [ifType='tunnel(131)'] index: 4 [from value] + Located input field 'ifSpeed' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.5' + Found item [ifSpeed='10000000'] index: 1 [from value] + Found item [ifSpeed='100000000'] index: 2 [from value] + Found item [ifSpeed='0'] index: 3 [from value] + Found item [ifSpeed='0'] index: 4 [from value] + Located input field 'ifHwAddr' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.6' + Found item [ifHwAddr=''] index: 1 [from value] + Found item [ifHwAddr='00:00:14:22:24:4C:FB'] index: 2 [from value] + Found item [ifHwAddr='00:00:14:22:24:4C:FC'] index: 3 [from value] + Found item [ifHwAddr=''] index: 4 [from value] + Located input field 'ifIP' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.4.20.1.2' + Found data query XML file at '/home/cacti/public_html/cacti-0.8.7b/resource/snmp_queries/interface.xml' + Found data query XML file at '/home/cacti/public_html/cacti-0.8.7b/resource/snmp_queries/interface.xml' + Found data query XML file at '/home/cacti/public_html/cacti-0.8.7b/resource/snmp_queries/interface.xml'
nate
On Wed, Aug 13, 2008 at 5:59 PM, nate centos@linuxpowered.net wrote:
Rudi Ahlers wrote:
Yes, I have clicked on the green circle a few times, and I have even
removed
the "Interface Statistics" altogether, and added it again
Very strange, can you include the output of the verbose query? What version of cacti?
This is what I get, though I don't use this method to get network stats from my systems, I have scripts that gather it for me(they return about 20 points of data that I put into a single RRD per-host, vastly improving performance by 10x+, though it's a labor intensive process to add a new system to cacti for me as cacti wasn't designed for doing things the way I'm doing them).
nate
Here's my verbose output:
+ Running data query [1]. + Found type = '3' [snmp query]. + Found data query XML file at '/var/www/html/graphs/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' + Located input field 'ifIndex' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.1' + Found item [ifIndex='1'] index: 1 [from value] + Found item [ifIndex='2'] index: 2 [from value] + Found item [ifIndex='3'] index: 3 [from value] + Found item [ifIndex='4'] index: 4 [from value] + Found item [ifIndex='5'] index: 5 [from value] + Found item [ifIndex='6'] index: 6 [from value] + Found item [ifIndex='7'] index: 7 [from value] + Found item [ifIndex='8'] index: 8 [from value] + Found item [ifIndex='9'] index: 9 [from value] + Found item [ifIndex='10'] index: 10 [from value] + Found item [ifIndex='11'] index: 11 [from value] + Found item [ifIndex='15'] index: 15 [from value] + Found item [ifIndex='20'] index: 20 [from value] + Found item [ifIndex='21'] index: 21 [from value] + Found item [ifIndex='25'] index: 25 [from value] + Found item [ifIndex='26'] index: 26 [from value] + Found item [ifIndex='27'] index: 27 [from value] + Located input field 'ifOperStatus' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.8' + Found item [ifOperStatus='Up'] index: 1 [from value] + Found item [ifOperStatus='Up'] index: 2 [from value] + Found item [ifOperStatus='Down'] index: 3 [from value] + Found item [ifOperStatus='Up'] index: 4 [from value] + Found item [ifOperStatus='Up'] index: 5 [from value] + Found item [ifOperStatus='Down'] index: 6 [from value] + Found item [ifOperStatus='Down'] index: 7 [from value] + Found item [ifOperStatus='Down'] index: 8 [from value] + Found item [ifOperStatus='Down'] index: 9 [from value] + Found item [ifOperStatus='Down'] index: 10 [from value] + Found item [ifOperStatus='Down'] index: 11 [from value] + Found item [ifOperStatus='Up'] index: 15 [from value] + Found item [ifOperStatus='Up'] index: 20 [from value] + Found item [ifOperStatus='Down'] index: 21 [from value] + Found item [ifOperStatus='Down'] index: 25 [from value] + Found item [ifOperStatus='Down'] index: 26 [from value] + Found item [ifOperStatus='Up'] index: 27 [from value] + Located input field 'ifDescr' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.2' + Found item [ifDescr='lo'] index: 1 [from value] + Found item [ifDescr='peth0'] index: 2 [from value] + Found item [ifDescr='sit0'] index: 3 [from value] + Found item [ifDescr='vif0.0'] index: 4 [from value] + Found item [ifDescr='eth0'] index: 5 [from value] + Found item [ifDescr='vif0.1'] index: 6 [from value] + Found item [ifDescr='veth1'] index: 7 [from value] + Found item [ifDescr='vif0.2'] index: 8 [from value] + Found item [ifDescr='veth2'] index: 9 [from value] + Found item [ifDescr='vif0.3'] index: 10 [from value] + Found item [ifDescr='veth3'] index: 11 [from value] + Found item [ifDescr='xenbr0'] index: 15 [from value] + Found item [ifDescr='vif8.0'] index: 20 [from value] + Found item [ifDescr='vif9.0'] index: 21 [from value] + Found item [ifDescr='vifzsas0'] index: 25 [from value] + Found item [ifDescr='vif14.0'] index: 26 [from value] + Found item [ifDescr='vif15.0'] index: 27 [from value] + Located input field 'ifName' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.1' + Found item [ifName='lo'] index: 1 [from value] + Found item [ifName='peth0'] index: 2 [from value] + Found item [ifName='sit0'] index: 3 [from value] + Found item [ifName='vif0.0'] index: 4 [from value] + Found item [ifName='eth0'] index: 5 [from value] + Found item [ifName='vif0.1'] index: 6 [from value] + Found item [ifName='veth1'] index: 7 [from value] + Found item [ifName='vif0.2'] index: 8 [from value] + Found item [ifName='veth2'] index: 9 [from value] + Found item [ifName='vif0.3'] index: 10 [from value] + Found item [ifName='veth3'] index: 11 [from value] + Found item [ifName='xenbr0'] index: 15 [from value] + Found item [ifName='vif8.0'] index: 20 [from value] + Found item [ifName='vif9.0'] index: 21 [from value] + Found item [ifName='vifzsas0'] index: 25 [from value] + Found item [ifName='vif14.0'] index: 26 [from value] + Found item [ifName='vif15.0'] index: 27 [from value] + Located input field 'ifAlias' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.18' + Found item [ifAlias=''] index: 1 [from value] + Found item [ifAlias=''] index: 2 [from value] + Found item [ifAlias=''] index: 3 [from value] + Found item [ifAlias=''] index: 4 [from value] + Found item [ifAlias=''] index: 5 [from value] + Found item [ifAlias=''] index: 6 [from value] + Found item [ifAlias=''] index: 7 [from value] + Found item [ifAlias=''] index: 8 [from value] + Found item [ifAlias=''] index: 9 [from value] + Found item [ifAlias=''] index: 10 [from value] + Found item [ifAlias=''] index: 11 [from value] + Found item [ifAlias=''] index: 15 [from value] + Found item [ifAlias=''] index: 20 [from value] + Found item [ifAlias=''] index: 21 [from value] + Found item [ifAlias=''] index: 25 [from value] + Found item [ifAlias=''] index: 26 [from value] + Found item [ifAlias=''] index: 27 [from value] + Located input field 'ifType' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3' + Found item [ifType='softwareLoopback(24)'] index: 1 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 2 [from value] + Found item [ifType='tunnel(131)'] index: 3 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 4 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 5 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 6 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 7 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 8 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 9 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 10 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 11 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 15 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 20 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 21 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 25 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 26 [from value] + Found item [ifType='ethernetCsmacd(6)'] index: 27 [from value] + Located input field 'ifSpeed' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.5' + Found item [ifSpeed='10000000'] index: 1 [from value] + Found item [ifSpeed='1000000000'] index: 2 [from value] + Found item [ifSpeed='0'] index: 3 [from value] + Found item [ifSpeed='10000000'] index: 4 [from value] + Found item [ifSpeed='10000000'] index: 5 [from value] + Found item [ifSpeed='10000000'] index: 6 [from value] + Found item [ifSpeed='10000000'] index: 7 [from value] + Found item [ifSpeed='10000000'] index: 8 [from value] + Found item [ifSpeed='10000000'] index: 9 [from value] + Found item [ifSpeed='10000000'] index: 10 [from value] + Found item [ifSpeed='10000000'] index: 11 [from value] + Found item [ifSpeed='10000000'] index: 15 [from value] + Found item [ifSpeed='10000000'] index: 20 [from value] + Found item [ifSpeed='10000000'] index: 21 [from value] + Found item [ifSpeed='10000000'] index: 25 [from value] + Found item [ifSpeed='10000000'] index: 26 [from value] + Found item [ifSpeed='10000000'] index: 27 [from value] + Located input field 'ifHwAddr' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.6' + Found item [ifHwAddr=''] index: 1 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 2 [from value] + Found item [ifHwAddr=''] index: 3 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 4 [from value] + Found item [ifHwAddr='00:00:1C:C0:52:6A:D8'] index: 5 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 6 [from value] + Found item [ifHwAddr=''] index: 7 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 8 [from value] + Found item [ifHwAddr=''] index: 9 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 10 [from value] + Found item [ifHwAddr=''] index: 11 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 15 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 20 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 21 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 25 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 26 [from value] + Found item [ifHwAddr='00:FE:FF:FF:FF:FF:FF'] index: 27 [from value] + Located input field 'ifIP' [walk] + Executing SNMP walk for data @ '.1.3.6.1.2.1.4.20.1.2' + Found item [ifIP='127.0.0.1'] index: 1 [from regexp oid parse] + Found item [ifIP='192.168.10.11'] index: 5 [from regexp oid parse] + Found item [ifIP='196.34.136.110'] index: 5 [from regexp oid parse] + Found data query XML file at '/var/www/html/graphs/resource/snmp_queries/interface.xml' + Found data query XML file at '/var/www/html/graphs/resource/snmp_queries/interface.xml' + Found data query XML file at '/var/www/html/graphs/resource/snmp_queries/interface.xml'
I've submitted this on the Cacti forums & list as well, but have had no reply whatsoever.
Rudi Ahlers wrote:
Here's my verbose output:
[..]
- Found item [ifName='lo'] index: 1 [from value]
- Found item [ifName='peth0'] index: 2 [from value]
- Found item [ifName='sit0'] index: 3 [from value]
It certainly looks like cacti is finding a bunch of stuff, what does the status column say to the left of the green circle? For my test system it says -
Success [24 Items, 4 Rows]
When you go to the 'Create graphs for this host', do you see just the Header with nothing below it? (Data Query [SNMP - Interface Statistics])
What version of cacti? Though it shouldn't matter this is a pretty basic thing.
nate
Hi, I didn't follow the whole thread but had the same problem when using net-snmp with bridges (an I see peth0 and that rang the bell). The problem seems to be that net-snmp does not like nics with same ips (I didn't find very much on that topic). You should see some errors from net-snmp in the syslogs of your managed servers. What does your syslog say?
I solved it by changing the bridge configuration from the scripts provided by xen /etc/xen/scripts/network-bridge to using ifcfg bridges. Then cacti could monitor the interfaces like normal.
Hope that helps.
Regards marc. On Wednesday 13 August 2008 20:42:30 nate wrote:
Rudi Ahlers wrote:
Here's my verbose output:
[..]
- Found item [ifName='lo'] index: 1 [from value]
- Found item [ifName='peth0'] index: 2 [from value]
- Found item [ifName='sit0'] index: 3 [from value]
It certainly looks like cacti is finding a bunch of stuff, what does the status column say to the left of the green circle? For my test system it says -
Success [24 Items, 4 Rows]
When you go to the 'Create graphs for this host', do you see just the Header with nothing below it? (Data Query [SNMP - Interface Statistics])
What version of cacti? Though it shouldn't matter this is a pretty basic thing.
nate
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Marc Grimme wrote:
Hi, I didn't follow the whole thread but had the same problem when using net-snmp with bridges (an I see peth0 and that rang the bell). The problem seems to be that net-snmp does not like nics with same ips (I didn't find very much on that topic). You should see some errors from net-snmp in the syslogs of your managed servers. What does your syslog say?
I solved it by changing the bridge configuration from the scripts provided by xen /etc/xen/scripts/network-bridge to using ifcfg bridges. Then cacti could monitor the interfaces like normal.
Interesting, good to know.
I've never run Xen myself.
nate
On 8/13/08, Marc Grimme grimme@atix.de wrote:
Hi, I didn't follow the whole thread but had the same problem when using net-snmp with bridges (an I see peth0 and that rang the bell). The problem seems to be that net-snmp does not like nics with same ips (I didn't find very much on that topic). You should see some errors from net-snmp in the syslogs of your managed servers. What does your syslog say?
I solved it by changing the bridge configuration from the scripts provided by xen /etc/xen/scripts/network-bridge to using ifcfg bridges. Then cacti could monitor the interfaces like normal.
Hope that helps.
Regards marc.
Hi Mark,
I don't think that's quite the case. Each interface has a different IP. In fact, if each interface had the same IP, then the whole network in that IP range, on the server, would be problematic - and there would be not traffic flowing through. For TCP/IP to work properly, each interface has to have a unique IP address (and depending on the subnet, a different subnet mask / gateway pair as well).
Each XEN interface is also a seperate interface, but it uses the bridgetools to work properly - i.e. connect directly to the external network.