04-14-2020 02:31 PM
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
04-14-2020 05:26 PM
Take a look at this EEM: https://community.cisco.com/t5/networking-documents/cli-value-2-snmp-expr-mib/ta-p/3123728
04-15-2020 09:55 AM
@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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide