cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1436
Views
0
Helpful
1
Replies

use EEM to match a portion of output

ciscoworlds
Level 4
Level 4

Hi. I need to use EEM to run a command (actually "show isdn status" command) and inspect the output for the term "MULTIPLE_FRAME_ESTABLISHED" which indicates the L2 status of the E1 line. is there any way to do this with EEM?

and this is sample of the output for this command:

 

maui-soho-02#show isdn status

Global ISDN Switchtype = basic-ni
ISDN BRI0 interface
dsl 0, interface ISDN Switchtype = basic-ni

Layer 1 Status:
ACTIVE
Layer 2 Status:
TEI = 73, Ces = 2, SAPI = 0, State = TEI_ASSIGNED
TEI = 104, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED

Spid Status:
TEI 104, ces = 1, state = 6(not initialized)
1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

Sure.  Here is some applet code you can use.  This assumes you have preceded the lines with "action X"

 

cli command "show isdn status"

regexp "MULTIPLE_FRAME_ESTABLISHED" $_cli_result

if $_regexp_result eq 1

 syslog msg "Found Multi frame established"

else

 syslog msg "Did not find multi frame established"

end