|
|
| Author |
Message |
dalaro
Joined: 18 Jun 2008 Posts: 3
|
Posted: Fri Jun 20, 2008 5:48 pm Post subject: Hex to decimal conversion |
|
|
Hi,
I've got some devices that use the Fibre Alliance MIB. This MIB encodes 64-bit interface counters as hex strings. Cacti considers these hex-strings non-numeric and sends unknown values to the associated RRDs. There a quite a few devices that use this MIB; for example, QLogic SANBoxes and Cisco MDS devices.
People have worked around this problem by creating a separate script query for the device (e.g. this bit of advice or this cisco mds template). The query is essentially identical to normal cacti SNMP functionality, except it does hex to decimal conversion on the returned value. This is a valid approach, but it duplicates code and increases the administration overhead on those devices. It's not as tightly-integrated and easy to use, imho, as an SNMP query.
I modified Cacti to convert pure hex output values into decimal, treating them as numbers. Informational or "input" data (in the SNMP query XML sense) are not modified. Only data bound for RRDs get the conversion. I think this isreasonable because RRDs store numbers. If the user configures Cacti to send hex values into RRDs, it seems sensible to treat them as such (instead of unknown).
Now I'm using plain SNMP queries to read my hex-string counters, and things are comparatively tidier in my configuration.
I'd appreciate your thoughts on this. If it sounds like a good idea, I've got diffs.
Thanks
Dan
|
|
| Back to top |
|
 |
dalaro
Joined: 18 Jun 2008 Posts: 3
|
Posted: Tue Jun 24, 2008 12:17 pm Post subject: |
|
|
Here are patches with the functionality I want. I'm running these on my install and polling some QLogic SANBoxes with it.
One patch is for cacti proper, the other is for spine. So far, I've only added hex-to-dec conversion under spine; haven't changed cmd.php because there hasn't been a need. If this gets integrated, though, I can supply a tested patch for cmd.php too.
Any feedback is appreciated
| Description: |
|
 Download |
| Filename: |
hexdec_conv_spine.patch.gz |
| Filesize: |
1.26 KB |
| Downloaded: |
63 Time(s) |
| Description: |
|
 Download |
| Filename: |
hexdec_conv_cacti.patch.gz |
| Filesize: |
645 Bytes |
| Downloaded: |
57 Time(s) |
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 6662 Location: WA, USA
|
Posted: Tue Jun 24, 2008 1:28 pm Post subject: |
|
|
| Please create a feature bug, with the details/attachment of these posts. also post a link to this post in the bug. http://www.cacti.net/bugs.php
|
|
| Back to top |
|
 |
dalaro
Joined: 18 Jun 2008 Posts: 3
|
|
| Back to top |
|
 |
zivley
Joined: 13 Nov 2007 Posts: 41
|
Posted: Thu Jul 31, 2008 7:01 am Post subject: |
|
|
Great to see someone has the same problem than me and have already found the workaround!
Will someone be kind and tell me how to apply those patches??
Thanks in advance
Ziv
|
|
| Back to top |
|
 |
|