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
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
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
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide