Result from SNMP not valid. Partial Result 0.8.7d

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

Moderators: Developers, Moderators

Post Reply
hangas
Posts: 9
Joined: Thu Nov 27, 2008 9:16 pm

Result from SNMP not valid. Partial Result 0.8.7d

Post by hangas »

Hi,

I upgraded to 0.8.7d and some graphs are not plotted anymore.
I read some posts here on this forum, and it looks like that there is already a reported bug on the matter. Something related with "bad" formated STRING values

ex
SNMPv2-SMI::enterprises.2.3.51.2.2.10.5.1.3.0 = STRING: "1637.760000 BTU/hour"


06/05/2009 03:30:31 AM - CMDPHP: Poller[0] Host[21] DS[715] WARNING: Result from SNMP not valid. Partial Result: 1634.348000 BTU

I didn't find any fix to this, is there any work around?

Regards
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You are using cmd.php right?

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?
hangas
Posts: 9
Joined: Thu Nov 27, 2008 9:16 pm

Post by hangas »

right!

Is spine immune to this issue?
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Odd, the function strip quotes should have handled this. Very interesting. You say this is 0.8.7d. It's hard to believe. Try spine. This may be an issue with ASCII and PHP. Wierd. What is your Local == Country?

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
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok, here is the problem. lib/functions.php includes a function strip_quotes(), you will have to replace with the following:

Code: Select all

function strip_quotes($result) {
  	/* first strip all single and double quotes from the string */
	$result = strtr($result,"'"," ");
	$result = strtr($result,'"',' ');

	/* clean off ugly non-numeric data */
	if ((!is_numeric($result)) && ($result != "U")) {
		$len = strlen($result);
		for($a=$len-1; $a>0; $a--){
			$p = ord($result[$a]);
			if (($p > 47) && ($p < 58)) {
				$result = substr($result,0,$a+1);
				break;
			}
		}
	}

	return(trim($result));
}
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?
hangas
Posts: 9
Joined: Thu Nov 27, 2008 9:16 pm

Post by hangas »

Hi,

Yes, that did it!
I see, It was that 'U' (85) in BTU..

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests