Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

EEM optical transceiver power warnings

i am wanting a script that will generate a syslog message for both tx/rx transciever power warnings and alarms.  I would like to use the command "show inter transceiver" which generates output similiar to the output below (also see the attached output  file)

switch6504#show inter transceiver

port          temp          volts          current          optical tx power          optical rx power

Te3/7        34.1          0.00          41.8 --            -2.0 - -                          -5.1 -

Note: A single hyphen after number is a warning and a double hyphen is an alarm

I am wanting the EEM script to generate a syslog message for both the warning or alarm of tx/rx power.  Two different syslog messages:

1) syslog  = "$interface has an optical tx/rx power alarm"

2) syslog = "$interface  has an optical tx/rx power warning"

I am only concerned about tx/rx power.  I would like for the script to run every 30 minutes. If there is a warning/alarm on an interface to send a syslog once every 24hours while conditions are still met.

I have started the script (see attachment) and would appreciate any assistance.

thanks!!

Everyone's tags (5)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: EEM optical transceiver power warnings

Give this one a try.

8 REPLIES
Cisco Employee

Re: EEM optical transceiver power warnings

Give this one a try.

New Member

EEM optical transceiver power warnings

Joe,

thanks for your help!  question:  is this only looking at the last two columns of data in the show output command (only tx optical power and rx optical power)? 

thanks again!

Cisco Employee

EEM optical transceiver power warnings

No, it looks at the last three really.  It needs to in order to determine if we have a '-' or "--" for either tx or rx power.  It's probably not the prettiest, but I think it will work.

New Member

EEM optical transceiver power warnings

Joe,

i am reading the "tcl scripting for cisco ios"  book and using it to fully understand this script that you wrote.  Could please explain the catch commands like the one below:

if [catch {cli_open} result] {

   error $result $errorInfo

} else {

    array set cli1 $result

}

thanks!!

Cisco Employee

EEM optical transceiver power warnings

This opens the CLI session so that commands can be run on the device.  It essentially allocates a VTY for EEM to use.

New Member

EEM optical transceiver power warnings

Joe,

thanks for all your efforts.   its amazing the power of tcl script.

New Member

Hi Joseph   If I need to get 

Hi Joseph

   If I need to get  transceiver Tx and Rx power , and transfer into a SNMP MIB , Then let SNMP base NMS to query value , How to do that ?

Cisco Employee

Please start a new thread on

Please start a new thread on the community for this question.

1542
Views
0
Helpful
8
Replies