SNMP and OIDs

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

SNMP and OIDs

Post by spoonman »

Guys.......Here is an issue I can't seem to fix... from my cacti server ( linux ) i can snmpwalk a device and get a valid return. But when I try to graph that same OID i get error...U in debug for result???

snmpwalk -v 1 -c ***** 172.*.*.* .1.3.6.1.4.1.674.10893.2.100.3.1.1.23
SNMPv2-SMI::enterprises.674.10893.2.100.3.1.1.23.1 = INTEGER: 3


Here is my Debug from cacti.log....

04/25/2006 01:06:14 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (1222,'door_state','2006-04-25 13:05:03','U')
04/25/2006 01:06:14 PM - CACTID: Poller[0] Host[92] DS[1222] SNMP: v1: 172.*.*.*, dsname: door_state, oid: .1.3.6.1.4.1.674.10893.2.100.3.1.1.23, value: U

Does Cacti use snmpwalk or snmpget??? if i use snmpget i dont get the same result??

Thanks.
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

This WORKS......

snmpgetnext -v 1 -c ***** 172.*.*.* .1.3.6.1.4.1.674.10893.2.100.3.1.1.23
SNMPv2-SMI::enterprises.674.10893.2.100.3.1.1.23.1 = INTEGER: 3


snmpwalk -v 1 -c ***** 172.*.*.* .1.3.6.1.4.1.674.10893.2.100.3.1.1.23
SNMPv2-SMI::enterprises.674.10893.2.100.3.1.1.23.1 = INTEGER: 3




This doesn't......

snmpget -v 1 -c ***** 172.*.*.* .1.3.6.1.4.1.674.10893.2.100.3.1.1.23
SNMPv2-SMI::enterprises.674.10893.2.100.3.1.1.23.1 = INTEGER: 3
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.674.10893.2.100.3.1.1.23
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

YOu should change .1.3.6.1.4.1.674.10893.2.100.3.1.1.23 to .1.3.6.1.4.1.674.10893.2.100.3.1.1.23.1as the snmpwalk returns data only for the latter.
Reinhard
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Reinhard..........Thanks for that insite...that worked perfectly....I now have a graph with data on it.
Why do you suppose if i manually from snmpwalk from my cacti server cli it reports the correct info.....but when cact runs it .....no go. Wonder why adding the 1 to the end makes it work??

Thanks again.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

See you own post, but with more care:
spoonman wrote:snmpwalk -v 1 -c ***** 172.*.*.* .1.3.6.1.4.1.674.10893.2.100.3.1.1.23nothing appended
SNMPv2-SMI::enterprises.674.10893.2.100.3.1.1.23.1 = INTEGER: 3
So no magic here
Reinhard
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

I'll be!!!! Thanks for pointing that out!!!! Guess i just assumed it was the same since i didnt have the 1 at the end at cli ///

Thanks again.
User avatar
Grogman
Cacti User
Posts: 54
Joined: Tue Feb 21, 2006 11:45 am
Location: Spain

Similar Problem

Post by Grogman »

Hi, I think I have a similar problem:

snmpget -v1 -c ******** 192.******** enterprises.3224.16.1.2.0
SNMPv2-SMI::enterprises.3224.16.1.2.0 = INTEGER: 2

Cactid output:

CACTID: Host[3] DS[271] SNMP: v1: 192.*****, dsname: snmp_oid, oid: enterprises.3224.16.1.2.0, value: U

It's funny, because I have a similar device in the network, and it's retrieving the data and graphing it prefectly:

CACTID: Host[4] DS[276] SNMP: v1: 192.*****, dsname: snmp_oid, oid: enterprises.3224.16.1.2.0, value: 2

Thanks!
Who is more foolish? The fool or the fool that
follows it?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Easiest way: Just copy out the snmpget statement and run it via command line, one time for the device without problems and once for the other. This should help
Reinhard
User avatar
Grogman
Cacti User
Posts: 54
Joined: Tue Feb 21, 2006 11:45 am
Location: Spain

Post by Grogman »

Hi,

From the command line everything works fine:

The problematic device:
#snmpget -v1 -c **** 192.****7 enterprises.3224.16.1.2.0
SNMPv2-SMI::enterprises.3224.16.1.2.0 = INTEGER: 2

The "good" device:
#snmpget -v1 -c **** 192.****8 enterprises.3224.16.1.2.0
SNMPv2-SMI::enterprises.3224.16.1.2.0 = INTEGER: 2

Also, I've tried to create two more datasources retrieving the same oid, and they start returning weird values:

From Cactid output:

CACTID: Host[3] DS[271] SNMP: v1: 192.****7, dsname: snmp_oid, oid: enterprises.3224.16.1.2.0, value: 158062464
CACTID: Host[3] DS[513] SNMP: v1: 192.****7, dsname: snmp_oid, oid: enterprises.3224.16.1.2.0, value: 69
CACTID: Host[3] DS[514] SNMP: v1: 192.****7, dsname: snmp_oid, oid: enterprises.3224.16.1.2.0, value: U
CACTID: Host[4] DS[276] SNMP: v1: 192.****8, dsname: snmp_oid, oid: enterprises.3224.16.1.2.0, value: 2

I've also tried to delete the datasources, and create them again from scratch, getting the same result...

All of this started when I migrated from cmd.php to cactid. Everything works fine except this single device.

Thanks for your help!
Who is more foolish? The fool or the fool that
follows it?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Hmm, some time ago I had a similar problem with cactid. This was solved by TheWitness at least in SVN. Is it possible for you to try the latest SVN code? See http://cacti.net/svn.php. Else, please pm TheWitness
Reinhard
User avatar
Grogman
Cacti User
Posts: 54
Joined: Tue Feb 21, 2006 11:45 am
Location: Spain

Post by Grogman »

Thanks!

I'll try the lastest SVN then, I hope today or next Monday :D

Thanks for your help!
Who is more foolish? The fool or the fool that
follows it?
User avatar
Grogman
Cacti User
Posts: 54
Joined: Tue Feb 21, 2006 11:45 am
Location: Spain

Post by Grogman »

Hi again,

I've tried to compile from the sources, and it seems to go well, but when I run cactid from the cli, after polling nearly all the oid's of the first host, I get a 'Segmentation Fault'. I've also noticed that if I install the last version available in rpm for FC3, I get the same error :o

Thanks!
Who is more foolish? The fool or the fool that
follows it?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So please report this via pm to TheWitness or post a bug at http://bugs.cacti.net
Reinhard
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please post your stackdump file. Also, do you get the same results if you poll with numeric OID's? Once you have posted the stackdump, I will provide additional instructions.

Thanks,

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?
User avatar
Grogman
Cacti User
Posts: 54
Joined: Tue Feb 21, 2006 11:45 am
Location: Spain

Post by Grogman »

Hi Witness,

I've tried the numeric OID's, getting the same result:


From the CLI:
# snmpget -v1 -c **** 192.***7 1.3.6.1.4.1.3224.16.1.2.0
SNMPv2-SMI::enterprises.3224.16.1.2.0 = INTEGER: 2
# snmpget -v1 -c **** 192.***8 1.3.6.1.4.1.3224.16.1.2.0
SNMPv2-SMI::enterprises.3224.16.1.2.0 = INTEGER: 1

From Cactid:

CACTID: Host[3] DS[516] SNMP: v1: 192.***7, dsname: snmp_oid, oid: 1.3.6.1.4.1.3224.16.1.2.0, value: U
CACTID: Host[4] DS[276] SNMP: v1: 192.***8, dsname: snmp_oid, oid: 1.3.6.1.4.1.3224.16.1.2.0, value: 1

Regarding the stackdump, can you tell me where to look for it? I've looked for it in the directory as the binary, but didn't found it :-?

Thanks!
Who is more foolish? The fool or the fool that
follows it?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests