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

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

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

Post by BorisL »

toe_cutter wrote:But what i meant was that on the 1225 bug there is like 7 patches, further down links to 4 more bugs, at least 2 of them have more patches and more links to other bugs and so forth, its hard keeping track of what i need :)

The first patch i tried from 1225 also failed on the dry-run :/
I think I can produce cumulative patch for that ('old' will be 087e+PA). Anybody interested?
toe_cutter
Cacti User
Posts: 168
Joined: Fri Sep 12, 2008 2:41 am
Location: Sweden

Post by toe_cutter »

BorisL wrote:I think I can produce cumulative patch for that ('old' will be 087e+PA). Anybody interested?
I am!
Pure SNMP is always preferable! :)
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Post by BorisL »

toe_cutter wrote:
BorisL wrote:I think I can produce cumulative patch for that ('old' will be 087e+PA). Anybody interested?
I am!
Pure SNMP is always preferable! :)
Try this patch. It should cover all pathes in 1225 and related.
Attachments
issue1225.full.patch
issue1225 cummulative patch
(12.67 KiB) Downloaded 428 times
toe_cutter
Cacti User
Posts: 168
Joined: Fri Sep 12, 2008 2:41 am
Location: Sweden

Post by toe_cutter »

BorisL wrote:Try this patch. It should cover all pathes in 1225 and related.
Thanks a lot!

However a chunk of the data_query patch failed, attached is the reject. I did manage to patch it manually, im not sure what failed really...

Something i noted with the graph template, the |query_entSensorScale| variable-name is displayed in the graphs when there is no value to display. I suppose this is a feature for 0.8.8 tho.

Other than this, it works great, thanks :)
Attachments
data_query.php.rej.txt
(10.81 KiB) Downloaded 308 times
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

Post by BorisL »

toe_cutter wrote:However a chunk of the data_query patch failed, attached is the reject. I did manage to patch it manually, im not sure what failed really...
It seems you have patched 087e, around

Code: Select all

-                                       /* correct bogus index value */
-                                       /* found in some devices such as an EMC Cellera */
-                                       if ($snmp_index == 0) {
-                                               $snmp_index = 1;
-                                       }
toe_cutter wrote:Something i noted with the graph template, the |query_entSensorScale| variable-name is displayed in the graphs when there is no value to display. I suppose this is a feature for 0.8.8 tho.
Nope, that is not a feature of 088. Can you show situation when entSensorScale is not set? It seems it should be for every sensor.
toe_cutter
Cacti User
Posts: 168
Joined: Fri Sep 12, 2008 2:41 am
Location: Sweden

Post by toe_cutter »

BorisL wrote:
toe_cutter wrote:However a chunk of the data_query patch failed, attached is the reject. I did manage to patch it manually, im not sure what failed really...
It seems you have patched 087e, around

Code: Select all

-                                       /* correct bogus index value */
-                                       /* found in some devices such as an EMC Cellera */
-                                       if ($snmp_index == 0) {
-                                               $snmp_index = 1;
-                                       }
Afaik i only have the latest 087e patches, and pia2.5.
But cacti seems fully functional anyway, so...
BorisL wrote:
toe_cutter wrote:Something i noted with the graph template, the |query_entSensorScale| variable-name is displayed in the graphs when there is no value to display. I suppose this is a feature for 0.8.8 tho.
Nope, that is not a feature of 088. Can you show situation when entSensorScale is not set? It seems it should be for every sensor.
Nvm about this, i had a broken line in your cisco-sensors.xml after copy-paste, right at the 9th exponent unit, removed the linebreak and added the missing space between the quotation marks. Its working now.
Thanks again for the patch and snmp-templates :)
FirstLast
Posts: 7
Joined: Wed Feb 24, 2010 10:32 am

Post by FirstLast »

BorisL wrote:
FirstLast wrote:Hi Boris,

do you know which firmware versions are affected with it ?

I run : s72033-adventerprisek9_wan-mz.122-33.SXI2.bin
which is one of very recent versions.
This version is affected for sure, I have a couple of them :(
Hi BorisL,

I was unable to recreate this problem the way you described it meaning that I can read DOM using sub-slot syntax after re-insert or reboot.

Regarding SNMP reading, Cisco told me it is expected behavior and suggested to search for Power Sensor :

The ES+ line cards use the ‘show interface trans’ command while the SIP cards use the ‘show hw-module subslot’ command.

The example I have is the following search power outputs:

Router#sh hw-module sub 8/0 transc 0 s
The Transceiver in slot 8 subslot 0 port 0 is enabled.
Module temperature = +40.148 C
Transceiver Tx supply voltage = 3252.3 uVolts
Transceiver Tx bias current = 14152 uAmps
Transceiver Tx power = -11 dBm <-------
Transceiver Rx optical power = -14 dBm <-------
Router#

!search for Power sensor

bash-2.05b$ snmpwalk -v2c -c public 1.88.13.3 47.1.1.1.1.2 | grep 'subslot 8/0' | grep Power
47.1.1.1.1.2.3097 = "subslot 8/0 transceiver 0 Tx Power Sensor"
47.1.1.1.1.2.3098 = "subslot 8/0 transceiver 0 Rx Power Sensor"

!retrieve value

bash-2.05b$ snmpwalk -v2c -c public 1.88.13.3 enterprises.9.9.91.1.1.1.1.4 | grep 3097
enterprises.9.9.91.1.1.1.1.4.3097 = -11
bash-2.05b$ snmpwalk -v2c -c public 1.88.13.3 enterprises.9.9.91.1.1.1.1.4 | grep 3098
enterprises.9.9.91.1.1.1.1.4.3098 = -14

Would anybody know how to modify that SNMP Walk which is parsing and expects to return 14 if dBm found to also parse sub-slots and look for Power Sensor, then get their values as described above ?

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

Post by BorisL »

FirstLast wrote:Would anybody know how to modify that SNMP Walk which is parsing and expects to return 14 if dBm found to also parse sub-slots and look for Power Sensor, then get their values as described above ?
My SNMP query grabs every sensor available and only then tries to lookup for it's name in inventory MIB. So it should be usable for you.
resparis
Posts: 23
Joined: Sat Mar 06, 2010 8:22 pm

Patch in windows

Post by resparis »

Hi

How can I do to patch in windows__
Regards,
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

Hi BorisL,

nice work !
I have a problem though.
After applying the issue1225.full.patch successfully I still receive :

Code: Select all

+ Running data query [22].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/resource/snmp_queries/cisco_sensors.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.91.1.1.1.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/html/resource/snmp_queries/cisco_sensors.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/cisco_sensors.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/cisco_sensors.xml'
Any thoughts ?
Cacti user
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

I figured it out - SNMP Timeout has to be increased about 6000-10000 ms.
In spite of that I have another problem:
When I graph a sensor, there is no graph showing at all (No such file or directory) and after investigation I found in data sources :

Code: Select all

Index Type	Data query data sources must be created through New Graphs.
Index Value	
Output Type ID	Data query data sources must be created through New Graphs.
Do you have any ideas ?
Cacti user
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

...Anyone ideas ?
Cacti user
ahouston
Posts: 6
Joined: Wed Jul 12, 2006 5:41 am

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

Post by ahouston »

I've modified the script to allow graphing of interfaces other than the TenGigabitEthernet ports on the Supervisor cards.

I have a number of interfaces Ten and GigEthernet on SPAs which were showing up as "subslot", so I applied the following changes to get this working:
  • Changed for example 'subslot 3/0 transceiver 8 Rx Power Sensor' to be '3/0/8'
  • Checked that an interface called either TenGigabitEthernet3/0/8 or GigabitEthernet3/0/8 exists in Cacti host_snmp_cache and select
  • Replaced colons ":" in the ifAlias because the script server explodes these as returned variables
  • Introduced a "divisor" to work around the Cisco oddness of returning the dBM for the SUP card's interface e.g. Ten7/1 in 1/10ths and the values for say Gig2/0/1 as a rounded-to-a-whole number.

This is what it looks like when you add the graphs in Cacti:
Screenshot of adding graphs
Screenshot of adding graphs
SFP 65xx.png (40.71 KiB) Viewed 5882 times
Here are the files:
65xx_sfp.zip
ss_65xx_sfp.php => <cacti_dir>/site/scripts
cisco_sfp.xml => <cacti_dir>/resource/script_server
cacti_data_query_cisco_-_65xx_-_sfp_statistics.xml => Import via Cacti interface
(6.21 KiB) Downloaded 377 times
sodium
Cacti User
Posts: 115
Joined: Wed Feb 01, 2006 10:29 am

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

Post by sodium »

ahouston wrote:I've modified the script to allow graphing of interfaces other than the TenGigabitEthernet ports on the Supervisor cards.
...
Thanks for you help :D (and also thank you for sharing)
All the problems of the world could be settled if people were only willing to think...
toe_cutter
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

Post by toe_cutter »

ahouston wrote:I've modified the script to allow graphing of interfaces other than the TenGigabitEthernet ports on the Supervisor cards.

I have a number of interfaces Ten and GigEthernet on SPAs which were showing up as "subslot", so I applied the following changes to get this working:
Awesome! We got a ton of interfaces that show as "subslot" aswell, but i hadnt gotten around to editing the script (not sure how i would apply it either)

Thanks for sharing!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest