cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1329
Views
5
Helpful
2
Replies

EEM PING

ronsametcohen
Level 1
Level 1

Hello ,

 

I'm using this to check ping connection .

But it check the result 100 precent .

How can I check the all results like 20,50,80,100 ? 

 

Thank

 

			          action 3.7 cli command "do ping 192.168.83.2"
                      action 3.8 regexp "100 percent" "$_cli_result"
					  		 action 3.9 if $_regexp_result eq "0"
2 Replies 2

balaji.bandi
Hall of Fame
Hall of Fame

we need to have full script to understand and quick one

 

why you using do ?

ping 192.168.83.2

 

100 means all success all time, you do not get any results of 20 50 or 80 ?

you get results of 100% success or not success ?

 

what are you expecting ?

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Dan Frey
Cisco Employee
Cisco Employee

To match on specific values use regex "or" :  regexp "20|40|60|80|100 percent". 

 

Another way to approach is to change 100% to 0% on line 3.8.   If it fails to match on 0% it must be some other value.   

 

Review Cisco Networking for a $25 gift card