Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
# snmpget -v 2c -c public 192.168.200.2 .1.3.6.1.2.1.2.2.1.10.5
IF-MIB::ifInOctets.5 = Wrong Type (should be Counter32): Counter64: 5600637353944
It appends "Wrong Type (should be Counter32): ", which I think is becoming a parse error in Cacti and it shows "U" during updates in logs.
Can You take this case into account in the future versions of Cacti?
PS. My version of Cacti is 0.8.6f (last at this moment), if this matters.
PPS. Switch have nothing at IF-MIB::ifHCInOctets.*, i.e. where really Counter64 should be, as I know.
Here is a patch, attached. As I understand, function strip_quotes only cut nonnumeric data at the end of the output. This adds cutting beginning stuff.
Hmm... things are more complex, that I thought. My patch brokes data inputs returning several values.
So, I can only suggest this workarond-like patch. I hope it will not brake something else.
When I looked at you initial patch, I thought to myself, "this is going to break other stuff". And it did, you beat me to posting..
Your second patch is a much better approach. And btw, I have this problem with some IBM agents, but I didn't think of parsing it out, I called IBM and told them to fix the MIB.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Ok, you said 5% to 10%, that is a problem, 1% to 2%, would not be such a problem.
Thanks,
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
function strip_quotes($result) {
/* first strip all single and double quotes from the string */
$result = strtr($result,"'","");
$result = strtr($result,'"','');
return($result);
}
Mmm? ... I've upgraded to the latest cacti/cactid yesterday... :/
CACTID 0.8.6f Copyright 2002-2005 by The Cacti Group
Cacti 0.8.6g + all the patches from cacti.net
===
cacti.log(i have a "generic oid template" data source what tries to fetch the value using single oid, .1.3.6.1.2.1.2.2.1.10.26):
... 11/17/2005 01:19:10 PM - CACTID: Poller[0] Host[52] DS[830] WARNING: Result from SNMP not valid. Partial Result: Wrong Type (should b...
..
... and the output of "snmpwalk -v 2c -c xxx qqq.www.www.eee .1.3.6.1.2.1.2.2.1.10.26": IF-MIB::ifInOctets.26 = Wrong Type (should be Counter32): Counter64: 1067884768808