SNMP || Can not list interfaces

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
sachar
Posts: 14
Joined: Sun Apr 21, 2002 9:52 pm

SNMP || Can not list interfaces

Post by sachar »

hello,

When trying to gather the ethernet interfaces for a host it fails with the following error:

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.2.interfaces.ifTable.ifEntry.ifIndex.5 = 5 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.3.interfaces.ifTable.ifEntry.ifIndex.5 = 5 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.5.interfaces.ifTable.ifEntry.ifIndex.5 = 5 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.6.interfaces.ifTable.ifEntry.ifIndex.5 = 5 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.2.interfaces.ifTable.ifEntry.ifIndex.6 = 6 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.3.interfaces.ifTable.ifEntry.ifIndex.6 = 6 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.5.interfaces.ifTable.ifEntry.ifIndex.6 = 6 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.6.interfaces.ifTable.ifEntry.ifIndex.6 = 6 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.2.interfaces.ifTable.ifEntry.ifIndex.7 = 7 in /var/www/cacti/include/snmp_functions.php on line 35

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.3.interfaces.ifTable.ifEntry.ifIndex.7 = 7 in /var/www/cacti/include/snmp_functions.php on line 35

running the latest version of cacti, tried net-snmp and the latest version of ucd-snmp.

when doing an snmpwalk on the device:
interfaces.ifTable.ifEntry.ifIndex.5 = 5
interfaces.ifTable.ifEntry.ifIndex.6 = 6
interfaces.ifTable.ifEntry.ifIndex.7 = 7
interfaces.ifTable.ifEntry.ifIndex.8 = 8
interfaces.ifTable.ifEntry.ifIndex.9 = 9
interfaces.ifTable.ifEntry.ifIndex.10 = 10
etc. etc.

It then does gather all the interfcaes, but without any info about it, so I can't create the graphs.
jon1

SNMP || cannot list interfaces

Post by jon1 »

Hi

i am having the same problem , when i try to add new interfaces via
http://localhost/cacti/snmp.php?action=edit

i get the following messages:

.............
............

Warning: Invalid object identifier: .1.3.6.1.2.1.2.2.1.6.interfaces.ifTable.ifEntry.ifIndex.70 = 70 in /usr/local/cacti-0.6.7/include/snmp_functions.php on line 35

Warning: Cannot add header information - headers already sent by (output started at /usr/local/cacti-0.6.7/include/snmp_functions.php:35) in /usr/local/cacti-0.6.7/snmp.php on line 47


Maybe i dont have the MIB's installed, hence the warning of Invalid object identifier. Any help would be appreciated
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This could very well be a problem with your MIB's. They should be in:

Code: Select all

/usr/local/share/snmp/mibs/
For a default net-snmp installation. Also, since you are using the built-in snmp support, I would recommend to try turning it off to see if that helps.

Open up 'include/config.php' in a text editor, and change line 59 from:

Code: Select all

$config["php_snmp_support"] = function_exists("snmpget");
to:

Code: Select all

$config["php_snmp_support"] = false;
See if that helps.

-Ian
sachar
Posts: 14
Joined: Sun Apr 21, 2002 9:52 pm

Post by sachar »

did what u suggested,, and it does gather all the interfaces, but it looks that it doesn't gather any data to show for in the graphs. Ran cmd.php manual and it doesn't return any errors. I've created a new datasource to test if getting any snmp data, and when creating a graph with OID .1.3.6.1.2.1.2.2.1.10.2 it does display the amount of octets.
gwynnebaer
Posts: 35
Joined: Sat Apr 13, 2002 5:16 pm
Location: Santa Barbara, CA

Post by gwynnebaer »

I might suggest, raX, that you change the method for grabbing SNMP to use only numeric OID's rather than symbolic OID's if you are using symbolic entries. This makes the need to have the MIB's less (un?)necessary. I do everything by numeric OID's and never have problems. I only use the symbolic information to track down the OID's I want to trap.

-gwynnebaer
jon1

Post by jon1 »

Hello,

i am having trouble running cmd.php, whilst the rrd files are being updated ie i can draw it via RRGrapher.cgi, they dont show up in cacti, when running cmd.php manually i get the following errors......
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifOutOctets.36

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifInOctets.35

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifOutOctets.35

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifInOctets.34

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifOutOctets.34

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifInOctets.33

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifOutOctets.33

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifInOctets.32

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifOutOctets.32

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: interfaces.ifTable.ifEntry.ifInOctets.31

ERROR: opening '/usr/local/apache/htdocs/cacti/rra/traf__0_out.rrd': No such file or directory

MIBS are at their default location usr/local/share/snmp/mibs.




I have already changed the
Code:

$config["php_snmp_support"] = function_exists("snmpget");



to:

Code:

$config["php_snmp_support"] = false;

Any help will be appreciated, Thanx in advance
Guest

Post by Guest »

What my Spirit Guide makes of all this:

I think there's conflicts between the Net-SNMP and PHP supplied MIBS. The MIBS locations for both packages by default are the same directory. I think PHP tries to load the RFC-1213 mib that was tested/tweaked under Net-SNMP and kathud!
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

If that is the case, shouldn't disabling the built-in SNMP support work? I say this because when you disable built-in SNMP support, it reverts back to good old net-snmp. You'll want to make sure cacti knows the correct paths to your snmpwalk and snmpget binaries if you do disable the built-in SNMP support though.

-Ian
sachar
Posts: 14
Joined: Sun Apr 21, 2002 9:52 pm

Post by sachar »

yes disabling build in snmp-support helped a bit since cacti does list the correct interfaces now. I only think the snmpget function doesn't work correct, although the path to the binary's is correct and also the mibs are in the right place. And when when building a manual snmp data source using the OID for the InPackets it does work.


when running cmd.php on the command line:


ERROR: expected 1 data source readings (got 0) from 0:...
ERROR: expected 1 data source readings (got 0) from 0:...
X-Powered-By: PHP/4.1.2
Content-type: text/html
sachar
Posts: 14
Joined: Sun Apr 21, 2002 9:52 pm

Post by sachar »

hmmmm for some strange reason it's working now.

After I created the graphs I went back to SNMP Interfaces and refreshed all the interfaces once more, and after that cacti was gathering data.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests