Problems with HEX Values from SAN Switch

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

Moderators: Developers, Moderators

darckos
Posts: 5
Joined: Mon Nov 02, 2009 9:04 am

Re: Problems with HEX Values from SAN Switch

Post by darckos »

I had the same problem on 0.8.8a with qlogic switch and I took a look to the is_hexadecimal function in lib/functions.php

for this function

Code: Select all

00 00 00 00 02 76 CE 64
is not an hex string

Code: Select all

00:00:00:00:02:76:CE:64
is an hex string

To quickly fix my problem here is what I did:

Code: Select all

function is_hexadecimal($hexstr) {
    $hexstr = trim($hexstr);
    $hexstr = str_replace(' ', ':', $hexstr);
    $hexstr = str_replace('-', ':', $hexstr);
    $i      = 0;
    $length = strlen($hexstr);
kbartoletta
Cacti User
Posts: 146
Joined: Tue Oct 04, 2005 4:20 pm
Location: suwanee, ga
Contact:

Re: Problems with HEX Values from SAN Switch

Post by kbartoletta »

Thanks for the assistance... I made this change but still getting the same result...
I am puzzled how the same device being polled by two different cacti servers... can produce such different results..

I am assuming that the device being polled is actually returning hex but for some reason the 0.8.7.i version (top) is not converting it correctly while the 0.8.7.g (bottom) does convert it correctly....

01/13/2013 10:05:01 PM - SPINE: Poller[0] Host[30] Description[| CCUR | LXTR4500-FC1 |] TH[1] DS[300] Graphs['| CCUR | LXTR4500-FC1 | FCSW Traffic: Port0'] SNMP: v2: x.x.x.x, dsname: BytesInput, oid: .1.3.6.1.3.94.4.5.1.7.16.0.0.192.221.25.129.133.0.0.0.0.0.0.0.0.1, value: 00 00 00 01 00 C4 34 24

01/13/2013 10:05:04 PM - SPINE: Poller[0] Host[127] Description[LXTR4500-FC1] TH[1] DS[3684] Graphs['LXTR4500-FC1 FCSW Traffic: Port0'] SNMP: v2: x.x.x.x, dsname: BytesInput, oid: .1.3.6.1.3.94.4.5.1.7.16.0.0.192.221.25.129.133.0.0.0.0.0.0.0.0.1, value: 4307821956
darckos
Posts: 5
Joined: Mon Nov 02, 2009 9:04 am

Re: Problems with HEX Values from SAN Switch

Post by darckos »

Set your Log Level to HIGH and you should see that spine see HEX values but decimal are passed to the poller/

Code: Select all

01/14/2013 01:13:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update 3732.rrd --template Class3RxFrames:Class3TxFrames 1358165583:0:0
01/14/2013 01:13:04 PM - SPINE: Poller[0] Host[11] TH[2] DS[4151] SNMP: v2: 10.0.0.10, dsname: Class3RxFrames, oid: 1.3.6.1.3.94.4.5.1.26.16.0.0.192.221.31.1.225.0.0.0.0.0.0.0.0.9, value: 00 00 00 00 00 00 00 00
kbartoletta
Cacti User
Posts: 146
Joined: Tue Oct 04, 2005 4:20 pm
Location: suwanee, ga
Contact:

Re: Problems with HEX Values from SAN Switch

Post by kbartoletta »

Thanks... so if the top log entry below an indication that the conversion to decimal IS working? Appears to be the case, but I am also seeing 2 "U" values as well... maybe i have something else going on....


01/14/2013 10:30:01 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/MHSM/rra/_ccur_lxtr4500-fc1__losssynchronization_300.rrd --template BytesInput:BytesOutput 1358177401:U:U <---------------------

01/14/2013 10:30:01 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (300, 'BytesInput', '2013-01-14 10:30:01', '00:00:00:01:01:57:AA:D4')"

01/14/2013 10:30:01 AM - CMDPHP: Poller[0] Host[30] Description[| CCUR | LXTR4500-FC1 |] DS[300] Graphs['| CCUR | LXTR4500-FC1 | FCSW Traffic: Port0'] SNMP: v2: x.x.x.x, dsname: BytesInput, oid: .1.3.6.1.3.94.4.5.1.7.16.0.0.192.221.25.129.133.0.0.0.0.0.0.0.0.1, output: 00:00:00:01:01:57:AA:D4

01/14/2013 10:30:01 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (300, 'BytesOutput', '2013-01-14 10:30:01', '00:00:00:00:14:AE:38:90')"

01/14/2013 10:30:01 AM - CMDPHP: Poller[0] Host[30] Description[| CCUR | LXTR4500-FC1 |] DS[300] Graphs['| CCUR | LXTR4500-FC1 | FCSW Traffic: Port0'] SNMP: v2: x.x.x.x, dsname: BytesOutput, oid: .1.3.6.1.3.94.4.5.1.6.16.0.0.192.221.25.129.133.0.0.0.0.0.0.0.0.1, output: 00:00:00:00:14:AE:38:90
kbartoletta
Cacti User
Posts: 146
Joined: Tue Oct 04, 2005 4:20 pm
Location: suwanee, ga
Contact:

Re: Problems with HEX Values from SAN Switch

Post by kbartoletta »

So in Spine a requirement in order to be able to convert these hex values to decimal???
kbartoletta
Cacti User
Posts: 146
Joined: Tue Oct 04, 2005 4:20 pm
Location: suwanee, ga
Contact:

Re: Problems with HEX Values from SAN Switch

Post by kbartoletta »

So does anyone know if "Spine" is a requirement to convert these Hex values to decimal
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests