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

eem scripting for IP SLA

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

2 Replies 2

Lisa Latour
Level 6
Level 6

hello - I have just moved your post to the Topic forums - you had posted your question in an obscure, non-visible, promotional community.  Hopefully our community users will see your question now

Dan Frey
Cisco Employee
Cisco Employee

Does the "show ip sla stat | sec SD Jitter" show any output with numbers?   If not, then the result variable will not be populated.   Try adding line 2 below into your applet so if there is not a match it will not produce an error.

 

event manager applet STAT

event none  sync yes

action 1 cli command "enable"

action 2 set result "No match"

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

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

action 5 puts "$result"

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: