cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1786
Views
0
Helpful
2
Replies

EEM to count PRI's and channels in use

Ryan Flud
Level 1
Level 1

I've been trying to get an EEM applet to count the number of PRI's present on a router and then collect the number of PRI channels in use.  With the SNMP OID's changing on current router models/NIM's I'm hoping to use EEM as sort of a one stop method of gathering this data and using the CISCO-EMBEDDED-EVENT-MGR-MIB to get the data over to our monitoring system.  The CLI I want to run from EEM to gather the data is shown below.  Two OID's should come from this - the first, contains the qty of lines that show MULTIPLE_FRAME_ESTABLISHED and the second is the value shown in ISDN CCBs = X.  

 

I've been working with EEM to get something to work but I'm not having any luck.  Any ideas would be appreciated.  Thanks

 

Router#sh isdn stat | i MULTI| ISDN CCB

TEI = 0, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
TEI = 0, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
TEI = 0, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
Total Allocated ISDN CCBs = 38

2 Replies 2

Dan Frey
Cisco Employee
Cisco Employee

Ryan Flud
Level 1
Level 1

@Dan Frey - thanks for the info.  That's looks pretty involved for my TCL skills at this point.  I decided to accomplish this in pieces so I can learn a bit more about EEM.  First step was to get the number of channels in use to display in a syslog message.  That would help me show that I can match the data from the CLI command.  All of this is being run manually at the moment.  This works.  Now I'm trying to match the number of times MULTI shows up and return that number.  Once I have everything working for syslog I'll turn my attention to getting SNMP working.  

 

event manager applet ISDNCCB
event none
action 1.0 cli command "enable"
action 2.0 cli command "sh isdn stat | i MULTI| ISDN CCB"
action 3.0 regexp "ISDN CCBs = [0-9]+" "$_cli_result" ISDN
action 4.0 if $_regexp_result eq "1"
action 5.0 syslog priority critical msg "PRI Channels in use are $ISDN "
action 6.0 else
action 7.0 syslog priority critical msg "Did not match"
action 8.0 end

Review Cisco Networking for a $25 gift card