- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 05:34 AM
Hi
I am trying to write an EEM script for a failed sip condition so for example when the command show sip-us statistics | i ReqTimeout is run if the values increase I am then going to stop a traffic export and write to flash. The latter works fine.
When you run the command manually you get the following output
ReqTimeout 0/1, Conflict 0/0, Gone 0/0
I am trying to match on the 1 on the 0/1 of the request timeout but cannot get the regexp to match on the 1 it always match the 0, so any advice on the writing the regular expression would be great as I cant seem to figure out how to get the digit after the /.
Solved! Go to Solution.
- Labels:
-
EEM Scripting
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 07:08 AM
regexp {ReqTimeout \d+/(\d+)} $output match num
puts $num
Or in applets:
regexp "ReqTimeout [0-9]+/([0-9]+)" $_cli_result match num
puts $num

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 07:08 AM
regexp {ReqTimeout \d+/(\d+)} $output match num
puts $num
Or in applets:
regexp "ReqTimeout [0-9]+/([0-9]+)" $_cli_result match num
puts $num
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 07:27 AM
Thanks Joseph, I take it it matches with the () in the appelet
