[SOLVED] SNMP - Interface Statistics on Linux

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

Moderators: Developers, Moderators

Post Reply
ptalbot
Posts: 3
Joined: Fri Feb 08, 2008 2:03 pm

[SOLVED] SNMP - Interface Statistics on Linux

Post by ptalbot »

I've been looking around the forums all morning and can't seem to find a solution to my problem. I have installed Cacti on my Fecora Core bo, and everything seems to run great. SNMP is working as well. I'm trying to capture the Interface Stats, but this is where I run into problems.

If I go to the Device, and add [SNMP - Interface Statistics] it comes back with a reply of:
Success [27 Items, 4 Rows]
And when I run it in debug mode I get (replaced my public IP with xx):
+ 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'
+ 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='Down'] index: 2 [from value]
+ Found item [ifOperStatus='Up'] 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='0'] index: 2 [from value]
+ Found item [ifSpeed='10000000'] 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:A0:C9:36:D1:6D'] index: 2 [from value]
+ Found item [ifHwAddr='00:00:20:78:E0:87:E6'] 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 item [ifIP='xx.xx.xx.xx'] index: 2 [from regexp oid parse]
+ Found item [ifIP='127.0.0.1'] index: 1 [from regexp oid parse]
+ Found item [ifIP='192.168.1.1'] index: 3 [from regexp oid parse]
+ 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'
So far so good! I go to 'Create Graphs' and I see:
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
Any ideas?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is which version of cacti, please?
Reinhard
ptalbot
Posts: 3
Joined: Fri Feb 08, 2008 2:03 pm

Post by ptalbot »

Sorry! I suppose that would have bene helpful - it's a brand new fresh install:
Cacti Version 0.8.7a
Cacti OS unix
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x
I did run the two patches available as well, in case that helps (which it didn't, for me).
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please find "Utilities -> View SNMP Cache", filter for your target and post the findings.
Reinhard
ptalbot
Posts: 3
Joined: Fri Feb 08, 2008 2:03 pm

Post by ptalbot »

Thanks for the help! Once more replaced my outside IP with XX.XX.XX.XX
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 1 , Field Name: ifDescr , Field Value: lo
OID: .1.3.6.1.2.1.2.2.1.2.1
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 2 , Field Name: ifDescr , Field Value: eth0
OID: .1.3.6.1.2.1.2.2.1.2.2
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 3 , Field Name: ifDescr , Field Value: eth1
OID: .1.3.6.1.2.1.2.2.1.2.3
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 4 , Field Name: ifDescr , Field Value: sit0
OID: .1.3.6.1.2.1.2.2.1.2.4
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 1 , Field Name: ifHwAddr , Field Value:
OID: .1.3.6.1.2.1.2.2.1.6.1
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 2 , Field Name: ifHwAddr , Field Value: 00:00:A0:C9:36:D1:6D
OID: .1.3.6.1.2.1.2.2.1.6.2
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 3 , Field Name: ifHwAddr , Field Value: 00:00:20:78:E0:87:E6
OID: .1.3.6.1.2.1.2.2.1.6.3
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 4 , Field Name: ifHwAddr , Field Value:
OID: .1.3.6.1.2.1.2.2.1.6.4
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 1 , Field Name: ifIndex , Field Value: 1
OID: .1.3.6.1.2.1.2.2.1.1.1
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 2 , Field Name: ifIndex , Field Value: 2
OID: .1.3.6.1.2.1.2.2.1.1.2
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 3 , Field Name: ifIndex , Field Value: 3
OID: .1.3.6.1.2.1.2.2.1.1.3
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 4 , Field Name: ifIndex , Field Value: 4
OID: .1.3.6.1.2.1.2.2.1.1.4
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 1 , Field Name: ifIP , Field Value: 127.0.0.1
OID: .1.3.6.1.2.1.4.20.1.2.127.0.0.1
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 2 , Field Name: ifIP , Field Value: XX.XX.XX.XX
OID: .1.3.6.1.2.1.4.20.1.2.66.92.77.91
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 3 , Field Name: ifIP , Field Value: 192.168.1.1
OID: .1.3.6.1.2.1.4.20.1.2.192.168.1.1
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 1 , Field Name: ifOperStatus , Field Value: Up
OID: .1.3.6.1.2.1.2.2.1.8.1
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 2 , Field Name: ifOperStatus , Field Value: Down
OID: .1.3.6.1.2.1.2.2.1.8.2
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 3 , Field Name: ifOperStatus , Field Value: Up
OID: .1.3.6.1.2.1.2.2.1.8.3
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 4 , Field Name: ifOperStatus , Field Value: Down
OID: .1.3.6.1.2.1.2.2.1.8.4
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 1 , Field Name: ifSpeed , Field Value: 10000000
OID: .1.3.6.1.2.1.2.2.1.5.1
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 2 , Field Name: ifSpeed , Field Value: 0
OID: .1.3.6.1.2.1.2.2.1.5.2
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 3 , Field Name: ifSpeed , Field Value: 10000000
OID: .1.3.6.1.2.1.2.2.1.5.3
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 4 , Field Name: ifSpeed , Field Value: 0
OID: .1.3.6.1.2.1.2.2.1.5.4
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 1 , Field Name: ifType , Field Value: softwareLoopback(24)
OID: .1.3.6.1.2.1.2.2.1.3.1
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 2 , Field Name: ifType , Field Value: ethernetCsmacd(6)
OID: .1.3.6.1.2.1.2.2.1.3.2
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 3 , Field Name: ifType , Field Value: ethernetCsmacd(6)
OID: .1.3.6.1.2.1.2.2.1.3.3
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 4 , Field Name: ifType , Field Value: tunnel(131)
OID: .1.3.6.1.2.1.2.2.1.3.4
Host: Faraday , SNMP Query: Unix - Get Mounted Partitions
Index: /dev/hda1 , Field Name: dskDevice , Field Value: /dev/hda1
OID:
Host: Faraday , SNMP Query: Unix - Get Mounted Partitions
Index: /dev/hda2 , Field Name: dskDevice , Field Value: /dev/hda2
OID:
Host: Faraday , SNMP Query: Unix - Get Mounted Partitions
Index: /dev/hda1 , Field Name: dskMount , Field Value: /boot
OID:
Host: Faraday , SNMP Query: SNMP - Interface Statistics
Index: 1 , Field Name: ifIndex , Field Value: 1
OID: .1.3.6.1.2.1.2.2.1.1.1
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please set logging verbosity to DEBUG and retry. Have a look at cacti.log and search for SQL errors. Don't forget to reset logging level afterwards
Reinhard
gripp
Posts: 9
Joined: Tue Jan 29, 2008 1:05 pm
Location: Brasil

Post by gripp »

Hi,

I'm with the same problem, my server is a linux box too and I'm on cacti 0.8.7b.

I tried a lot of devices and all of them lists no interfaces on the page to create the graphs. but I had notice something wired, look at the attached image, besides telling that "returned 0 rows" it shows "Showing Rows 1 to 20 of 76 [1,2,3,4]". Something is not right here....

Of course I have tried "run this data query in debug mode" and it shows nothing wrong, all the interfaces are listened and no errors are showing.

What else can I try?

Thanks,

Regards,

Gripp.
Attachments
cacti-dataquery-snmp-interface.JPG
cacti-dataquery-snmp-interface.JPG (33.7 KiB) Viewed 13692 times
sburkleo
Posts: 1
Joined: Fri Feb 01, 2008 11:26 am

Post by sburkleo »

Hello,

I had the exact issue after I upgraded to 0.8.7a from 0.8.6g. The fix for me was uprading MySQL. This was a FC2 install w/MySQL 3.23.58 and I upgraded to 4.0.27....problem solved. I'll be installing 5.0 in the near future but for tonight I'm just happy to able to create new graphs again.

Steve
VaSh1
Posts: 29
Joined: Wed Feb 20, 2008 3:44 pm

Post by VaSh1 »

've got simular problem:
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

And your mysql version is which one, please?
Reinhard
VaSh1
Posts: 29
Joined: Wed Feb 20, 2008 3:44 pm

Post by VaSh1 »

gandalf wrote:And your mysql version is which one, please?
Reinhard
if this post is addressed to me, than
# mysql -V
mysql Ver 14.12 Distrib 5.0.51
VaSh1
Posts: 29
Joined: Wed Feb 20, 2008 3:44 pm

Post by VaSh1 »

VaSh1 wrote:'ve got simular problem:
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
*SOLVED*
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

how did you solve it ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
VaSh1
Posts: 29
Joined: Wed Feb 20, 2008 3:44 pm

Post by VaSh1 »

fmangeant wrote:Hi

how did you solve it ?
By chosing SNMP Version.

...I thought that "Choosing the SNMP version for this device." can using default value which is equal to "Not in use", that's why I got the mistakes in identifying network interfaces.

Anyway, many thanx for trying to help me, guys!
Attachments
snmp.PNG
snmp.PNG (4.53 KiB) Viewed 13383 times
gripp
Posts: 9
Joined: Tue Jan 29, 2008 1:05 pm
Location: Brasil

Post by gripp »

ok, thanks Steve.

I finished upgrading my mysql server and php now and the problem is solved.

Thanks all,

Gripp.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest