SNMP error - problem with snmpget

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

Moderators: Developers, Moderators

Post Reply
marcus
Posts: 11
Joined: Mon Sep 13, 2004 1:59 am

SNMP error - problem with snmpget

Post by marcus »

Hi,

started with cacti v0.8.5a (Debian) and after some starting problems got it running with monitoring some Cisco Switches and about 3 W2K machines.

But during this starting phase i´ve tried more switches and 3 more W2K machines and i got "SNMP error".

Here´s what i´ve done:
- Created a new device (one test with W2K template and other tests without)
- Opened the device and got the littele red error message in the upper left corner "SNMP error". Locating the errormessage in the source host.php

Code: Select all

$snmp_system = cacti_snmp_get($host["hostname"], $host["snmp_community"], ".1.3.6.1.2.1.1.1.0", $host["snmp_version"], $host["snmp_username"], $host["snmp_password"], $host["snmp_port"], $host["snmp_timeout"]);
if ($snmp_system == "") {
 print "<span style='color: #ff0000; font-weight: bold;'>SNMP error</span>\n";
i had a look at the W2K machine with snmpget in a shell with the oid i found in the host.php source:

Code: Select all

snmpget -O vt -c public -v 1 -t 500 ip_of_machine:161 .1.3.6.1.2.1.1.1.0
snmpget result:

Code: Select all

STRING: Hardware: x86 Family 15 Model 2 Stepping 9 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Multiprocessor Free)
So i´m wondering why the command in shell returns a result and cacti is not able to get this result and so displayes the error message.

Any help is appreciated
tia,
Marcus
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Marcus,

Please insure that your paths are correct. In addition, since you are using SNMP v1, you can use the php_snmp that is available for *nix. My recommendaton is that you run PHP 4.3.6++. So make sure you upgrade first.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
marcus
Posts: 11
Joined: Mon Sep 13, 2004 1:59 am

Post by marcus »

Hello,

thanks for your fast reply.

I performed a check on the paths - they are all OK, but I don´t understand why this check would explain the strange behaviour. Perhaps there´s a misunderstanding of my problem: at the moment cacti is running and collecting data on 3 W2K machines. I´ve defined 3 more machines as devices, but when i open one of these I get the mentioned "SNMP error". So i try to get data of these three machiens with snmpget in a shell and everything works fine. That means cacti is running very well for three machines but is not able to collect data for three more - but snmpget is able to collect the needed data for these three machines.

Is there a way to log in detail what cacti is doing and if cacti is sending the snmpget command? I really appreciate to get cacti running on the other hosts.

Thank you,
Marcus
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Markus,

We made a change in CVS last night. Could you please check the latest pre-release of 0.8.6a and retest.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
marcus
Posts: 11
Joined: Mon Sep 13, 2004 1:59 am

Post by marcus »

Hejho,
one more time thanks for the fast answer.
Downloaded and installed the version from
http://www.cacti.net/downloads/beta/uni ... 920.tar.gz
tried to create a new device with one of the W2K machines making problems -> no change "SNMP error"

Code: Select all

snmpget -O vt -c public -v 1 -t 500 149.236.30.5:161 .1.3.6.1.2.1.1.1.0
still returns the result

Anything i can try or test here?

Thank you,
Marcus
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Are you using SNMP V1 or V2? Also, please run the command "php -m" and tell me if PHP includes the SNMP module.
Thannks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
marcus
Posts: 11
Joined: Mon Sep 13, 2004 1:59 am

Post by marcus »

Hello,

the devices are configured to use SNMP V1.
Version of snmpget:

Code: Select all

snmpget -V
NET-SNMP version: 5.1.2
Result of php -m

Code: Select all

php -m
[PHP Modules]
...
snmp
...
So php includes the snmp module, right?

php version

Code: Select all

php -v
PHP 4.3.8-12 (cli) (built: Sep  6 2004 05:46:13)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Is there a way to get some output (debug messages) of host.php or better snmp.php? I like to know what cacti exactly is executing in snmp.php and what´s the difference between the machines with a snmp result and the others.

Thank you,
Marcus
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Marcus,

We need to schedule a conference using either AIM or MSM. I work in Detroit and get off about 4:30 EDT and have some shopping to do with my son. 8:00 PM EDT would work for me. GDT -4 hours.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
marcus
Posts: 11
Joined: Mon Sep 13, 2004 1:59 am

Post by marcus »

Hejho,

many thanks for your help.
Got the problem solved: missconfiguration of the network :oops:
Cacti is up and running and producing really nice graphs of the W2K machines.

Sunny greetings,
marcus
guest

SNMP error

Post by guest »

Hello Marcus,
I also have the same type of eror while adding new devices in Cacti. I am running Cacti on WIndows XP, PHP4.3.9, Net-snmp 5.1.2, cacti 0.8.6. Apache 2.x. When I try to get CPU usage for local host I get SNMP error when I try to add the device. By "Network misconfiguration" what do you mean? Can you help me troublshoot? I am able to add other SNMP enabled agents and view graphs for them. Problem arises only when I try to graph CPU usage on my own machine.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Cacti 0.8.6b has a fix for adding devices.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
marcus
Posts: 11
Joined: Mon Sep 13, 2004 1:59 am

Re: SNMP error

Post by marcus »

Hello,
guest wrote:Hello Marcus,
I also have the same type of eror while adding new devices in Cacti. I am running Cacti on WIndows XP, PHP4.3.9, Net-snmp 5.1.2, cacti 0.8.6. Apache 2.x. When I try to get CPU usage for local host I get SNMP error when I try to add the device. By "Network misconfiguration" what do you mean? Can you help me troublshoot?
please try to run the snmp query that cacti would execute from command line. In my case it was

Code: Select all

snmpget -O vt -c public -v 1 -t 500 ip_of_machine:161 .1.3.6.1.2.1.1.1.0
(the first snmpget for the device info on the top left of the devices page). I don´t know the exact syntax for your environment, so perhaps you have to adapt. What´s your result?
I am able to add other SNMP enabled agents and view graphs for them. Problem arises only when I try to graph CPU usage on my own machine.
btw: you are running on Win XP - I was not able to get the CPU usage of the Windows machines via SNMP in my environment and decided to use Net Saint for these. Another idea: I had to enable and respectiively install SNMP on the Windows boxes in my environment. As far as I know SNMP is not running by default. So have a look at the settings.

Greetings,
Marcus
Guest

Post by Guest »

I installed SNMP in my machine but it is not responding anyhow. But Cacti does not object when another machine (SNMP enabled) running Windows XP is added. It is weird!!! :-?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests