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

SLA values extraction using EEM tcl

Siddharth Tyagi
Level 1
Level 1

I am trying to extract the numerical value from the followng using Embedded event manager(TCL Scripting)

i also have SLA probes running between 2 connected routers

 

sho ip sla statistics | sec SD Jitter

 

So i write the the following

 

conf ter

event manager applet STAT

event none  sync yes

action 1 cli command "enable"

action 2  cli command "sho ip sla stat | sec SD Jitter"

action 3 regexp  " [0-9]+ " $_cli_result result

action 4 puts "$result"

 

However it produces result

*Mar 27 16:42:08.806: %HA_EM-3-FMPD_UNKNOWN_ENV: fh_parse_var: could not find environment variable: result

*Mar 27 16:42:08.806: %HA_EM-3-FMPD_ERROR: Error executing applet STAT statement 4

 

pls clarify

1 Accepted Solution

Accepted Solutions

Dragan Ilic
Level 4
Level 4

Could you try with this combination:

action 2  cli command "sho ip sla stat | sec SD Jitter"

action 3 regexp  "[0-9]+" "$_cli_result" result

action 4 puts $result

 

HTH,

Dragan

HTH,
Dragan

View solution in original post

1 Reply 1

Dragan Ilic
Level 4
Level 4

Could you try with this combination:

action 2  cli command "sho ip sla stat | sec SD Jitter"

action 3 regexp  "[0-9]+" "$_cli_result" result

action 4 puts $result

 

HTH,

Dragan

HTH,
Dragan
Review Cisco Networking products for a $25 gift card