I'm very new to EEM and have created an applet that will send a email when port secuirty has been tripped and is logged in the syslog.
I'm trying to figure out how to have the applet only send one email and not continuesly send as the messages log. Also I have seen that there are variables that can be put in to the email like ports or the actual syslog message but haven't been able to to figure them out yet. Any help would be greatly appericated.
You can use the syslog event detector parameters like occurs and period to limit the number of times the applet triggers based on the frequency of the messages. You can also parse the syslog to pull out certain values. I am not familiar with the full contents of this message, but something like:
action 1.0 regexp "(GigabitEthernet[0-9/]+)" $_syslog_msg match intf
action 2.0 mail server "$email_server" to "$email_to" from "$email_from" subject "Port Security Has been tripped on $intf"