how to: debug snmp

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

Moderators: Developers, Moderators

Post Reply
nemesis
Posts: 6
Joined: Thu Mar 10, 2005 7:59 pm

how to: debug snmp

Post by nemesis »

Hello,

I'm only using Cacti graphing using scrpt input, and would like to
try snmp. From unix command line, snmp works:

snmpwalk -v 2c -c mycommunity myserver .1.3.6.1.2.1.2.2.1.1

IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2

But in the Devices section, when I choose "Generic SNMP-enabled Host"
as Host Template, and "SNMP - Interface Statistics", and tried to query,
I get:

+ 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

Is there some command I can try against the xml file, interface.xml
to debug where the set-up problem is?

Thank you,

PS: In "Cacti setting", SNMP version is "NET-SNMP 5.x"
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Does PHP have built-in snmp support? What version of PHP? Have you applied the 0.8.6c patches (some very recent)? Have you checked "Settings->Paths" and verified both the snmpwalk and snmpget paths are valid?

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?
nemesis
Posts: 6
Joined: Thu Mar 10, 2005 7:59 pm

Post by nemesis »

Thank you, that solved the problem. SNMP is much nicer and easier than
scripts -- you can get so much data for a bit of work.

The solution is to verify "Settings --> Path", as suggested by the Witness:

$ type snmpwalk
snmpwalk is hashed (/usr/bin/snmpwalk)

$type snmpget
snmpget is /usr/bin/snmpget

Recommend this one to be put in the FAQ.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest