Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4b

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
PayableOnDeath
Posts: 18
Joined: Mon Jul 13, 2009 4:11 pm

Post by PayableOnDeath »

hmm odd doesnt work

cacti in debug shows
11/18/2009 10:27:13 PM - SPINE: Poller[0] Host[2] DS[20] SS[0] SERVER: /usr/bin/php -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php ss_sfp 123.123.123.123 2 2:161:500:1:10:snmpcommunity:::MD5::DES: get tx TenGigabitEthernet1/1, output:
doesn't seem to show any output.

if I go to the graph and click to download the CSV file it shows.

"Title:","Device Name - SFP TenGigabitEther - |query_descr|"
"Vertical Label:","dBm"
<br />
<b>Notice</b>: Undefined index: start in <b>/usr/share/cacti/site/graph_xport.php</b> on line <b>101</b><br />
"Start Date:","1970-01-01 01:00:00"
<br />
<b>Notice</b>: Undefined index: end in <b>/usr/share/cacti/site/graph_xport.php</b> on line <b>102</b><br />
"End Date:","1970-01-01 01:00:00"
<br />
<b>Notice</b>: Undefined index: step in <b>/usr/share/cacti/site/graph_xport.php</b> on line <b>103</b><br />
"Step:",""
<br />
<b>Notice</b>: Undefined index: rows in <b>/usr/share/cacti/site/graph_xport.php</b> on line <b>104</b><br />
"Total Rows:",""
"Graph ID:","17"
"Host ID:","2"
""
<br />
<b>Notice</b>: Undefined index: columns in <b>/usr/share/cacti/site/graph_xport.php</b> on line <b>122</b><br />
"Date"
<br />
<b>Notice</b>: Undefined index: data in <b>/usr/share/cacti/site/graph_xport.php</b> on line <b>128</b><br />
toe_cutter
Cacti User
Posts: 168
Joined: Fri Sep 12, 2008 2:41 am
Location: Sweden

Post by toe_cutter »

Ive never tried CSV file actually :S
What if you got to Console -> Graph Management -> your graph -> Debug mode?
PayableOnDeath
Posts: 18
Joined: Mon Jul 13, 2009 4:11 pm

Post by PayableOnDeath »

its the first time I have tried that (the CSV thing) :)

Code: Select all

   	 RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="Device Name - SFP TenGigabitEther - |query_descr|" \
--base=1000 \
--height=120 \
--width=600 \
--alt-autoscale \
--vertical-label="dBm" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/swanzo_sfp_tx_21.rrd":sfp_tx:LAST \
DEF:b="/var/lib/cacti/rra/swanzo_sfp_tx_21.rrd":sfp_rx:LAST \
LINE1:a#002A97FF:"OpticalTxPower"  \
GPRINT:a:LAST:"Current\:%2.1lf"  \
GPRINT:a:AVERAGE:"Average\:%2.1lf"  \
GPRINT:a:MAX:"Maximum\:%2.1lf\n"  \
LINE1:b#00CF00FF:"OpticalRxPower"  \
GPRINT:b:LAST:"Current\:%2.1lf"  \
GPRINT:b:AVERAGE:"Average\:%2.1lf"  \
GPRINT:b:MAX:"Maximum\:%2.1lf\n" 

RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF
toe_cutter
Cacti User
Posts: 168
Joined: Fri Sep 12, 2008 2:41 am
Location: Sweden

Post by toe_cutter »

Ah yes, that stuff...

So, theres 2 ways of doing this:
1, my preferred, will make your rrd-files alittle bit bigger, but will contain more data (iirc)
2, will keep your rrd-file-size, but be boring graphs only showing average instead of showing the actual number reported.

Read up on RRAs here - http://docs.cacti.net/manual:087:8_rrdt ... n?s[]=last
Read it two or three times, took me almost 4 times of reading before i understood it all (the results part anyway).

So, 1:
Console -> Data sources -> RRAs
Go through all of them and add LAST to the selection. (I add them all for the sake of being able to choose CDEFs in a graph template)
Remove the rrd-file your graph was using
Fixed

2:
Go to my graph template
Change any row containing LAST to AVERAGE or whichever you like. Problem solved.
PayableOnDeath
Posts: 18
Joined: Mon Jul 13, 2009 4:11 pm

Post by PayableOnDeath »

I like the sound of option 1

I will give that try.

Thanks
PayableOnDeath
Posts: 18
Joined: Mon Jul 13, 2009 4:11 pm

Post by PayableOnDeath »

hmm, its showing the graph now but everything shows as 0

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="Device name - SFP TenGigabitEther - |query_descr|" \
--base=1000 \
--height=120 \
--width=600 \
--alt-autoscale \
--vertical-label="dBm" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/devicename_sfp_tx_21.rrd":sfp_tx:LAST \
DEF:b="/var/lib/cacti/rra/devicename_sfp_tx_21.rrd":sfp_rx:LAST \
LINE1:a#002A97FF:"OpticalTxPower"  \
GPRINT:a:LAST:"Current\:%2.1lf"  \
GPRINT:a:AVERAGE:"Average\:%2.1lf"  \
GPRINT:a:MAX:"Maximum\:%2.1lf\n"  \
LINE1:b#00CF00FF:"OpticalRxPower"  \
GPRINT:b:LAST:"Current\:%2.1lf"  \
GPRINT:b:AVERAGE:"Average\:%2.1lf"  \
GPRINT:b:MAX:"Maximum\:%2.1lf\n" 

RRDTool Says:

OK

CSV output shows the following if that helps.

Code: Select all

"Title:","Device Name - SFP TenGigabitEther - |query_descr|"
"Vertical Label:","dBm"
"Start Date:","2009-11-18 19:24:00"
"End Date:","2009-11-19 19:24:00"
"Step:","360"
"Total Rows:","241"
"Graph ID:","17"
"Host ID:","2"
""
"Date","OpticalTxPower","OpticalRxPower"
"2009-11-18 19:24:00","NaN","NaN"
"2009-11-18 19:30:00","NaN","NaN"
"2009-11-18 19:36:00","NaN","NaN"
"2009-11-18 19:42:00","NaN","NaN"
"2009-11-18 19:48:00","NaN","NaN"
"2009-11-18 19:54:00","NaN","NaN"
"2009-11-18 20:00:00","NaN","NaN"
"2009-11-18 20:06:00","NaN","NaN"
"2009-11-18 20:12:00","NaN","NaN"
"2009-11-18 20:18:00","NaN","NaN"
"2009-11-18 20:24:00","NaN","NaN"
"2009-11-18 20:30:00","NaN","NaN"
"2009-11-18 20:36:00","NaN","NaN"
"2009-11-18 20:42:00","NaN","NaN"
"2009-11-18 20:48:00","NaN","NaN"
"2009-11-18 20:54:00","NaN","NaN"
"2009-11-18 21:00:00","NaN","NaN"
"2009-11-18 21:06:00","NaN","NaN"
"2009-11-18 21:12:00","NaN","NaN"
"2009-11-18 21:18:00","NaN","NaN"
"2009-11-18 21:24:00","NaN","NaN"
"2009-11-18 21:30:00","NaN","NaN"
"2009-11-18 21:36:00","NaN","NaN"
"2009-11-18 21:42:00","NaN","NaN"
"2009-11-18 21:48:00","NaN","NaN"
"2009-11-18 21:54:00","NaN","NaN"
"2009-11-18 22:00:00","NaN","NaN"
"2009-11-18 22:06:00","NaN","NaN"
"2009-11-18 22:12:00","NaN","NaN"
"2009-11-18 22:18:00","NaN","NaN"
"2009-11-18 22:24:00","NaN","NaN"
"2009-11-18 22:30:00","NaN","NaN"
"2009-11-18 22:36:00","NaN","NaN"
"2009-11-18 22:42:00","NaN","NaN"
"2009-11-18 22:48:00","NaN","NaN"
"2009-11-18 22:54:00","NaN","NaN"
"2009-11-18 23:00:00","NaN","NaN"
"2009-11-18 23:06:00","NaN","NaN"
"2009-11-18 23:12:00","NaN","NaN"
"2009-11-18 23:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-18 23:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-18 23:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-18 23:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-18 23:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-18 23:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-18 23:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 00:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 01:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 02:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 03:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 04:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 05:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 06:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:48:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 07:54:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:00:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:06:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:12:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:18:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:24:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:30:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:36:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:42:00","0.0000000000e+00","0.0000000000e+00"
"2009-11-19 08:48:00","0.0000000000e+00","0.0000000000e+00"
PayableOnDeath
Posts: 18
Joined: Mon Jul 13, 2009 4:11 pm

Post by PayableOnDeath »

got it working now, on the last cisco_sfp.xml you posted up, you need to change

<script_function>ss_65xx_sfp</script_function>


to

<script_function>ss_sfp</script_function>

otherwise you get a function error the debug log



now just need to work out why its not showing description in the graph title

Code: Select all

 |query_descr| 
toe_cutter
Cacti User
Posts: 168
Joined: Fri Sep 12, 2008 2:41 am
Location: Sweden

Post by toe_cutter »

ooh, alright, thanks! Ill do that tomorrow morning!
PayableOnDeath
Posts: 18
Joined: Mon Jul 13, 2009 4:11 pm

Post by PayableOnDeath »

Posted Text removed

Edit, forget that, seems to be some truncating going on on the graph labels
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Post by BorisL »

Here it is pure SNMP version of CISCO-ENTITY-SENSOR-MIB processing.
It uses advantages of patches from Issue #1225.
A lot of other sensors for interfaces are available besides Output/Input power level.

It does not provide graphing both input and output power level on same graph though.
Attachments
sample graph
sample graph
DOM-sample.PNG (26.75 KiB) Viewed 7466 times
cacti_data_query_cisco_-_various_sensors.xml
XML data query import
(17.03 KiB) Downloaded 497 times
cisco-sensors.xml
to be placed into resources/snmp_queries
(2.38 KiB) Downloaded 562 times
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Post by timi »

BorisL wrote:Here it is pure SNMP version of CISCO-ENTITY-SENSOR-MIB processing.
It uses advantages of patches from Issue #1225.
A lot of other sensors for interfaces are available besides Output/Input power level.

It does not provide graphing both input and output power level on same graph though.
on cacti 0.8.7d can't import it ;(
Last edited by timi on Wed Feb 10, 2010 9:51 am, edited 1 time in total.
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Post by timi »

0.2.4b of this template is not working for me :( try to use it on 7600 10G interface
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Post by BorisL »

timi wrote:on cacti 0.8.7d can't import it ;(
Are there any error messages while importing or something more informative?
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Post by timi »

BorisL wrote:
timi wrote:on cacti 0.8.7d can't import it ;(
Are there any error messages while importing or something more informative?
sorry, forgot to atach error:

Code: Select all

Error: XML: Hash version does not exist.
I got this when try to import the xml file saved from the link above

10x
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Post by BorisL »

timi wrote:

Code: Select all

Error: XML: Hash version does not exist.
I got this when try to import the xml file saved from the link above
There are two XML in my post, are you trying to import cisco-sensors.xml instead of cacti_data_query_cisco_-_various_sensors.xml?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests