XML Query hexadecimal to decimal

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

Moderators: Developers, Moderators

Post Reply
li0n
Posts: 10
Joined: Tue Oct 18, 2005 4:38 pm

XML Query hexadecimal to decimal

Post by li0n »

Hello,

I'm trying to find a way to transform a snmp query returning IP in hexadecimal to a decimal value:

xx.118.105.112.45.112.97.116.101.115 = Hex-STRING: 50 7D D7 A4
xx.118.105.112.45.99.114.101.45.114.55 = Hex-STRING: 50 7D D6 65
xx.118.105.112.45.119.101.98.99.97.114.101 = Hex-STRING: 52 DD B7 A5
xx.118.105.112.45.120.109.115.45.103.119.49 = Hex-STRING: 52 AD C6 7F

<vsIPAddress>
<name>VS IP Address</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.3375.2.2.10.1.2.1.3</oid>
</vsIPAddress>

i tried with <source> regex with no sucess

Is it possible ?

Thanks

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

Post by gandalf »

AFAIK, this is not possible. Cacti XML, even if armed with REGEXP, won't allow for conversion of hex-to-decimal.
This would require a Script Data Query, which, in general, works very much like a SNMP Data Query apart from the fact, that a script is called from the XML file which performs all data retrieval. This script may do hex-to-decimal conversion for you.
Reinhard
prasadpkulkarni
Posts: 12
Joined: Fri May 29, 2009 4:27 am

conversion of hex-to-decimal for IP of VS on Load Balancer.

Post by prasadpkulkarni »

Anybody got any solution on this ?? my Pool member graphs shows HEX value of IP address.

I am using cacti 0.8.7c with spine.

Thanks in advance

Prasad.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests