Backslash in OID

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

Moderators: Developers, Moderators

Post Reply
redlocomoto
Posts: 1
Joined: Wed Apr 13, 2005 2:19 pm
Location: Denver, CO

Backslash in OID

Post by redlocomoto »

Hello,

It seems that backslashes are stripped from the OID. I have a OID that I want to reference via a variable. Command line out put is as follows:
bash-2.05$ snmpwalk -v2c -cAdmin 10.1.1.18 rbnSubsCntxtCount.\"internet\"
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsCntxtCount."internet" = Gauge32: 16

But when I put this into the OID field of a data template, the backslashes get stripped somewhere along the way to the poller.

This is causing the snmpget to fail. Log entry is as follows:
04/13/2005 11:00:01 AM - CMDPHP: Poller[0] Host[20] WARNING: Result from SNMP no
t valid. Partial Result:
04/13/2005 11:00:01 AM - CMDPHP: Poller[0] Host[20] SNMP: v2: 10.1.1.18, dsname:
subs_internet, oid: rbnSubsCntxtCount."internet", output: U

Does anyone no of a way to keep the backslashes from being stripped? I assumed Cacti was using the backslash as an escape character so I tried double backslashes but that did not change the result.

I can always use the numeric OID, but using a text var is very convenient when adding new gets (i.e. I dont have to walk the mib to find out the oid).

Thanks,
Patrick.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Either make then double backslashes (might work) or write a script to perform the same. Also, please check the snmp_cache and the poller_cache to the existance of the back slashes.

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?
Post Reply

Who is online

Users browsing this forum: cigamit and 0 guests