Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4b
Moderators: Developers, Moderators
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
Hi all,
sorry about delay.
I am having hard time importing newest XML, get "Error: XML: Hash version does not exist."
when trying to import latest "cacti_graph_template_cisco_-_sfp_statistics_dbm.xml"
I didn't mention running an older Cacti version 0.8.7e.
In any case, I don't think this would work for me because of the fact that query used to determine which interfaces have sensors ( .1.3.6.1.4.1.9.9.91.1.1.1.1.1 ) simply does not return = 14 for any of my int Gi8/0/? or Gi9/0/? which are 7600-SIP-600 / SPA-5X1GE-V2 ports, so it doesn't see them as DOM capable to begin with.
Using command line, I can get readings using sub-slot syntax, i.e. show hw-module subslot 8/0 tr 0 status, but even when I run full query on 6509 chassis and grep for terms of interest, only results I get are some "transceiver containers" and I was not able to drill any further using their IDs. Example :
iso.3.6.1.2.1.47.1.1.1.1.2.6091 = STRING: "subslot 8/0 transceiver container 0"
iso.3.6.1.2.1.47.1.1.1.1.2.6103 = STRING: "subslot 8/0 transceiver container 1"
iso.3.6.1.2.1.47.1.1.1.1.2.6104 = STRING: "GE T"
iso.3.6.1.2.1.47.1.1.1.1.2.6105 = STRING: "GigEther SPA"
iso.3.6.1.2.1.47.1.1.1.1.2.6115 = STRING: "subslot 8/0 transceiver container 2"
iso.3.6.1.2.1.47.1.1.1.1.2.6127 = STRING: "subslot 8/0 transceiver container 3"
iso.3.6.1.2.1.47.1.1.1.1.2.6139 = STRING: "subslot 8/0 transceiver container 4"
Below are exact cards I have and IOS I run. All SFPs I want to read are in either 8 or 9
R#sho mod all
Mod Ports Card Type Model
--- ----- -------------------------------------- --------------
....
5 5 Supervisor Engine 720 10GE (Active) VS-S720-10G
6 5 Supervisor Engine 720 10GE (Hot) VS-S720-10G
....
8 5 1-subslot SPA Interface Processor-600 7600-SIP-600
9 1 1-subslot SPA Interface Processor-600 7600-SIP-600
8 0024.97dc.c2c0 to 0024.97dc.c2ff 1.3 12.2(18r)SX4 12.2(33)SXI2
9 0016.9d92.abbc to 0016.9d92.abfb 1.2 12.2(18r)SX4 12.2(33)SXI2
Mod Sub-Module Model Serial Hw Status
---- --------------------------- ------------------ ----------- ------- -------
8 SIP Distributed Forwarding 7600-SIP-600-DC JAE13031AX4 1.1 Ok
8/0 5xGE SPA SPA-5X1GE-V2 JAB1042060A 1.1 Ok
Regards
sorry about delay.
I am having hard time importing newest XML, get "Error: XML: Hash version does not exist."
when trying to import latest "cacti_graph_template_cisco_-_sfp_statistics_dbm.xml"
I didn't mention running an older Cacti version 0.8.7e.
In any case, I don't think this would work for me because of the fact that query used to determine which interfaces have sensors ( .1.3.6.1.4.1.9.9.91.1.1.1.1.1 ) simply does not return = 14 for any of my int Gi8/0/? or Gi9/0/? which are 7600-SIP-600 / SPA-5X1GE-V2 ports, so it doesn't see them as DOM capable to begin with.
Using command line, I can get readings using sub-slot syntax, i.e. show hw-module subslot 8/0 tr 0 status, but even when I run full query on 6509 chassis and grep for terms of interest, only results I get are some "transceiver containers" and I was not able to drill any further using their IDs. Example :
iso.3.6.1.2.1.47.1.1.1.1.2.6091 = STRING: "subslot 8/0 transceiver container 0"
iso.3.6.1.2.1.47.1.1.1.1.2.6103 = STRING: "subslot 8/0 transceiver container 1"
iso.3.6.1.2.1.47.1.1.1.1.2.6104 = STRING: "GE T"
iso.3.6.1.2.1.47.1.1.1.1.2.6105 = STRING: "GigEther SPA"
iso.3.6.1.2.1.47.1.1.1.1.2.6115 = STRING: "subslot 8/0 transceiver container 2"
iso.3.6.1.2.1.47.1.1.1.1.2.6127 = STRING: "subslot 8/0 transceiver container 3"
iso.3.6.1.2.1.47.1.1.1.1.2.6139 = STRING: "subslot 8/0 transceiver container 4"
Below are exact cards I have and IOS I run. All SFPs I want to read are in either 8 or 9
R#sho mod all
Mod Ports Card Type Model
--- ----- -------------------------------------- --------------
....
5 5 Supervisor Engine 720 10GE (Active) VS-S720-10G
6 5 Supervisor Engine 720 10GE (Hot) VS-S720-10G
....
8 5 1-subslot SPA Interface Processor-600 7600-SIP-600
9 1 1-subslot SPA Interface Processor-600 7600-SIP-600
8 0024.97dc.c2c0 to 0024.97dc.c2ff 1.3 12.2(18r)SX4 12.2(33)SXI2
9 0016.9d92.abbc to 0016.9d92.abfb 1.2 12.2(18r)SX4 12.2(33)SXI2
Mod Sub-Module Model Serial Hw Status
---- --------------------------- ------------------ ----------- ------- -------
8 SIP Distributed Forwarding 7600-SIP-600-DC JAE13031AX4 1.1 Ok
8/0 5xGE SPA SPA-5X1GE-V2 JAB1042060A 1.1 Ok
Regards
-
- Cacti User
- Posts: 168
- Joined: Fri Sep 12, 2008 2:41 am
- Location: Sweden
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
Cacti implements a version check on templates, so that they are compatible with whatever functions are used for that specific version of Cacti, if i used something thats available in 087f, it might not be available in 087e. I suggest that you upgrade your Cacti to a newer version, be sure to back the old one up!
There is also a way to change the hash in the template to an older version, youll have to search the forum, but again, stuff might not work.
Regarding SPA-ports, sodium was going to look into that.
Edit: Actually, i think we are using the SPA-2X1GE-V2 in our ASR1002s and the SPA-5X1GE-V2 in our ASR1006. My test graphs for the script where only tested on the ASR1002. Since its an ASR we are using some IOS XE version. Maybe there is a difference from IOS XE and the regular ones?
At this point, i have no idea why its not working for your SPA-devices, sorry
There is also a way to change the hash in the template to an older version, youll have to search the forum, but again, stuff might not work.
Regarding SPA-ports, sodium was going to look into that.
Edit: Actually, i think we are using the SPA-2X1GE-V2 in our ASR1002s and the SPA-5X1GE-V2 in our ASR1006. My test graphs for the script where only tested on the ASR1002. Since its an ASR we are using some IOS XE version. Maybe there is a difference from IOS XE and the regular ones?
At this point, i have no idea why its not working for your SPA-devices, sorry
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
I also got this error:
need to be readable by the web server user (or everybody, chmod +r).
after fixing that, everything works with sodium's 2.4
by looking at the web server error log /var/log/apache2/error.log, it turned out to be a trivial file permission problem: both cisco_sfp.xml and ss_65xx_sfp.php+ Error parsing XML file into an array.
need to be readable by the web server user (or everybody, chmod +r).
after fixing that, everything works with sodium's 2.4
Modified plugin
Hello everybody
Firstly thanks sodium for the plugin.
Unfortunately the script assumes that the indexes of Tx and Rx sensor are sequential. This is not true for at least Cisco 4900M switch which I have to monitor. So I rewrote this plugin to better cope with various Cisco models. The assumption in my version of the script is that the sensor names are built so:
<interface name> [Receive |Transmit] Power Sensor
For data source index I'm returning the indexes of both Tx and Rx sensors. So if you want to update to my script you will have to reindex DOM data query on all devices.
Firstly thanks sodium for the plugin.
Unfortunately the script assumes that the indexes of Tx and Rx sensor are sequential. This is not true for at least Cisco 4900M switch which I have to monitor. So I rewrote this plugin to better cope with various Cisco models. The assumption in my version of the script is that the sensor names are built so:
<interface name> [Receive |Transmit] Power Sensor
For data source index I'm returning the indexes of both Tx and Rx sensors. So if you want to update to my script you will have to reindex DOM data query on all devices.
- Attachments
-
- ss_cisco_sfp_dom-0.3.0.zip
- (13.76 KiB) Downloaded 752 times
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
Reworked matej's edition to support IOS XR power sensors. Definitely works on ASR9k(4.2.x) and 7600(12.2SR-15.2S), but should work on 4500's too (i don't have it to test).
- Attachments
-
- ss_cisco_sfp_dom-0.4.0.zip
- (13.62 KiB) Downloaded 1123 times
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
Thanks a million.. I get an unmet dependency though on importing :rps64 wrote:Reworked matej's edition to support IOS XR power sensors. Definitely works on ASR9k(4.2.x) and 7600(12.2SR-15.2S), but should work on 4500's too (i don't have it to test).
Data Template
[success] Cisco - Optical Power (DOM) [update]
+ Found Dependency: (Data Input Method) Get Script Server Data (Indexed)
+ Unmet Dependency: (Data Input Field)
+ Found Dependency: (Data Input Field) Index Type
+ Found Dependency: (Data Input Field) Index Value
+ Found Dependency: (Data Input Field) Output Type ID
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
I've changed php script only and didn't touched any other files including import xml's. So i have no idea what's wrong with your config, sorry.rbressers wrote: Thanks a million.. I get an unmet dependency though on importing :
My system is: 0.8.8a from freebsd ports, php 5.4.4, imported matej_v's variant (0.3.0) without problems.
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
Thanks for the reply. I got it working, but it doesn't seem to pull the right values out of the optics.rps64 wrote:I've changed php script only and didn't touched any other files including import xml's. So i have no idea what's wrong with your config, sorry.rbressers wrote: Thanks a million.. I get an unmet dependency though on importing :
My system is: 0.8.8a from freebsd ports, php 5.4.4, imported matej_v's variant (0.3.0) without problems.
I got an optic in TenGigE0/0/2/1 which does give DOM output with "show controllers tenGigE 0/0/2/1 phy".
Code: Select all
Temperature: 40.941
Voltage: 3.231 Volt
Tx Bias: 21.312 mAmps
Tx Power: 0.673 mW (-1.72 dBm)
Rx Power: 0.830 mW (-0.81 dBm)
Code: Select all
+ Running data query [28].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at '/usr/share/cacti/resource/script_server/cisco_sfp_dom.xml'
+ XML file parsed ok.
+ Executing script for num of indexes '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php ams-er1-sara xxxxx 2 num_indexes'
+ Found number of indexes: 98
+ Executing script for list of indexes '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php ams-er1-sara xxxxx 2 index' Index Count: 5
+ Found index: 7524422.24300447
+ Found index: 63015154.12682251
+ Found index: 13707426.30483451
+ Found index: 29234194.46010283
+ Found index: 65113653.48336040
+ Executing script query '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php ams-er1-sara xxxxx 2 query index'
+ Found item [index='7524422.24300447'] index: 7524422.24300447
+ Found item [index='63015154.12682251'] index: 63015154.12682251
+ Found item [index='13707426.30483451'] index: 13707426.30483451
+ Found item [index='29234194.46010283'] index: 29234194.46010283
+ Found item [index='65113653.48336040'] index: 65113653.48336040
+ Executing script query '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php ams-er1-sara xxxxx 2 query interface'
+ Found item [ifDescr='GigabitEthernet0/0/0/4'] index: 7524422.24300447
+ Found item [ifDescr='GigabitEthernet0/0/0/5'] index: 63015154.12682251
+ Found item [ifDescr='GigabitEthernet0/0/0/0'] index: 13707426.30483451
+ Found item [ifDescr='TenGigE0/0/2/1'] index: 29234194.46010283
+ Found item [ifDescr='TenGigE0/0/2/0'] index: 65113653.48336040
+ Executing script query '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php ams-er1-sara xxxxx 2 query if_name'
+ Found item [ifName='GigabitEthernet0/0/0/4'] index: 7524422.24300447
+ Found item [ifName='GigabitEthernet0/0/0/5'] index: 63015154.12682251
+ Found item [ifName='GigabitEthernet0/0/0/0'] index: 13707426.30483451
+ Found item [ifName='TenGigE0/0/2/1'] index: 29234194.46010283
+ Found item [ifName='TenGigE0/0/2/0'] index: 65113653.48336040
+ Executing script query '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php ams-er1-sara xxxxx 2 query status'
+ Found item [status='Tx and Rx Failure'] index: 7524422.24300447
+ Found item [status='Tx and Rx Failure'] index: 63015154.12682251
+ Found item [status='Tx and Rx Failure'] index: 13707426.30483451
+ Found item [status='Tx and Rx Failure'] index: 29234194.46010283
+ Found item [status='Tx and Rx Failure'] index: 65113653.48336040
+ Executing script query '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php ams-er1-sara xxxxx 2 query descr'
+ Found item [ifAlias=''] index: 7524422.24300447
+ Found item [ifAlias=''] index: 63015154.12682251
+ Found item [ifAlias=''] index: 13707426.30483451
+ Found item [ifAlias=''] index: 29234194.46010283
+ Found item [ifAlias=''] index: 65113653.48336040
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
What do you mean by "right values"? Did you create DOM graphics in "Create Graphs for this Host" at upper right of the device info screen? If so, what is the difference in values?rbressers wrote: Thanks for the reply. I got it working, but it doesn't seem to pull the right values out of the optics.
Debug output looks right.rbressers wrote:I got an optic in TenGigE0/0/2/1 which does give DOM output with "show controllers tenGigE 0/0/2/1 phy".
IOS XR version?
Try to exec:
php -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php host snmp-community 2 get rx 29234194.46010283
php -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php host snmp-community 2 get tx 29234194.46010283
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
I have applied this to c65xx in my network, works beautiful....however 4506-E gave me some errors (see attachment). Any ideas?rps64 wrote:Reworked matej's edition to support IOS XR power sensors. Definitely works on ASR9k(4.2.x) and 7600(12.2SR-15.2S), but should work on 4500's too (i don't have it to test).
- Attachments
-
- c4500 DOM verbose.txt
- (13.66 KiB) Downloaded 620 times
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
While i don't have true 4500 in my hands, but only 4948, which is merely compatible and i have no knowledge about DOM-enabled transceivers other than 10G, this is simple patch.
Also note, that for 4500 with ancient version of IOS DOM is unsupported.
Also note, that for 4500 with ancient version of IOS DOM is unsupported.
- Attachments
-
- ss_cisco_sfp_dom.php.c4k.patch
- (550 Bytes) Downloaded 653 times
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
I did create the graphs, but i only get -40 values out of above script output.rps64 wrote:What do you mean by "right values"? Did you create DOM graphics in "Create Graphs for this Host" at upper right of the device info screen? If so, what is the difference in values?rbressers wrote: Thanks for the reply. I got it working, but it doesn't seem to pull the right values out of the optics.
Debug output looks right.rbressers wrote:I got an optic in TenGigE0/0/2/1 which does give DOM output with "show controllers tenGigE 0/0/2/1 phy".
IOS XR version?
Try to exec:
php -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php host snmp-community 2 get rx 29234194.46010283
php -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php host snmp-community 2 get tx 29234194.46010283
I am running XR version 4.3 on the box and DOM seems to work pretty fine on the box itself. Can you help me debug this more low-level?
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
Has anyone been able to graph standby interfaces with IOS XE and VSS?
We have 2x 4500-X switches configured in VSS and the data query for Cisco - Optical Power (DOM) only detects interfaces for the active switch.
This is working just fine with 2x 6509 (SUP720) in VSS...
We have 2x 4500-X switches configured in VSS and the data query for Cisco - Optical Power (DOM) only detects interfaces for the active switch.
This is working just fine with 2x 6509 (SUP720) in VSS...
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
I have much the same problem. I'm using version 0.4.0 - I had to hack the hash to get it to import into Cacti 0.8.7e; it imported fine except for the missing dependency (see screenshot attached).rbressers wrote:I did create the graphs, but i only get -40 values out of above script output.rps64 wrote:What do you mean by "right values"? Did you create DOM graphics in "Create Graphs for this Host" at upper right of the device info screen? If so, what is the difference in values?rbressers wrote: Thanks for the reply. I got it working, but it doesn't seem to pull the right values out of the optics.
Debug output looks right.rbressers wrote:I got an optic in TenGigE0/0/2/1 which does give DOM output with "show controllers tenGigE 0/0/2/1 phy".
IOS XR version?
Try to exec:
php -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php host snmp-community 2 get rx 29234194.46010283
php -q /usr/share/cacti/scripts/ss_cisco_sfp_dom.php host snmp-community 2 get tx 29234194.46010283
I am running XR version 4.3 on the box and DOM seems to work pretty fine on the box itself. Can you help me debug this more low-level?
The data query executes fine and finds the right OIDs etc. But the graphs are just plotting -40 for Tx and Rx regardless.
I edited cisco_sfp_dom.xml and changed the <direction> tags for TX Power and RX power to "input" and re-ran the data query to see what Cacti's seeing. The values returned fine (see attached) - the middle SFP is offline so the -40 values there are correct.
Any ideas why the script seems OK, but -40 is being plotted on the graphs?
- Attachments
-
- ss_cisco_sfp_dom-0.4.0_input.jpg (90.34 KiB) Viewed 22261 times
-
- ss_cisco_sfp_dom-0.4.0_error.jpg (226.96 KiB) Viewed 22261 times
-
- Posts: 24
- Joined: Mon Mar 07, 2011 2:02 am
- Location: Viet Nam
- Contact:
Re: Cisco SFP (with DOM) Optical value plugin v0.2.3 + 0.2.4
HI.
I have some errors. Can you help me?
And when i run Scripts:
Huy Bac
=================================================
Bắc, Nguyễn Huy
Email: huybac.nguyen@gmail.com
I have some errors. Can you help me?
Code: Select all
Data Query [Cisco - 65xx - SFP statistics]
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
Code: Select all
+ Running data query [11].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/cisco_sfp.xml'
+ XML file parsed ok.
+ <arg_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting arg_index entries
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/cacti/scripts/ss_65xx_sfp.php ..host.. community.. 2 index' Index Count: 0
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_65xx_sfp.php ..host.. community.. 2 query index'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_65xx_sfp.php ..host.. community.. 2 query status'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_65xx_sfp.php ..host.. community.. 2 query descr'
Code: Select all
[root@localhost scripts]# /usr/bin/php -q ./ss_65xx_sfp.php ..host.. community.. 2 index
[i]PHP Fatal error: Call to undefined function read_config_option() in /var/www/html/cacti/scripts/ss_65xx_sfp.php on line 53[/i]
=================================================
Bắc, Nguyễn Huy
Email: huybac.nguyen@gmail.com
Who is online
Users browsing this forum: No registered users and 1 guest