If condition in EEM Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2016 09:23 AM
Hi All,
I am wondering how to write an if condition in an EEM script. This is my requirement:
If txload > 15
Send an email "HIGH TX LOAD"
If rxload > 15
Send an email "HIGH RX LOAD"
Any help would be appreciated!
CF
- Labels:
-
EEM Scripting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2016 05:12 AM
Some thing like this, for example:
action 010 if $txload gt 15
action 011 mail from ...
action 012 end
action 013 if $rxload gt 15
action 014 mail from ...
action 015 end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2016 09:24 AM
Hi Joe,
I got one more question.
I assume that $txload is a variable. How do I send the value of interface txload to the variable txload.
CF

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 02:57 PM
I don't know enough about your intended EEM use case. If you're using an interface event, then there is a built-in variable. If you're doing something else, you could parse the output of "show interface" and get the txload and rxload values from there using the regexp action.
