Created
October 7, 2010 19:58
-
-
Save justincampbell/615780 to your computer and use it in GitHub Desktop.
EEM apps for Cisco 4500
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
event manager environment MailRecipient user | |
event manager environment MailDomain domain.com | |
event manager environment MailServer 1.2.3.4 | |
event manager applet mail_on_module3_down | |
event syslog occurs 1 pattern "LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3.*to down" period 1 | |
action 1.0 info type routername | |
action 1.1 cli command "show interface desc" | |
action 2.0 mail server "$MailServer" to "$MailRecipient" from "$_info_routername@$MailDomain" subject "Interface down module3" body "$_info_routername $_syslog_msg $_cli_result" | |
action 3.0 syslog msg "sent" | |
event manager applet mail_on_module3_up | |
event syslog occurs 1 pattern "LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3.*to up" period 1 | |
action 1.0 info type routername | |
action 1.1 cli command "show interface desc" | |
action 2.0 mail server "$MailServer" to "$MailRecipient" from "$_info_routername@$MailDomain" subject "Interface up module3" body "$_info_routername $_syslog_msg $_cli_result" | |
action 3.0 syslog msg "sent" | |
event manager applet mail_on_module4_down | |
event syslog occurs 1 pattern "LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet4.*to down" period 1 | |
action 1.0 info type routername | |
action 1.1 cli command "show interface desc" | |
action 2.0 mail server "$MailServer" to "$MailRecipient" from "$_info_routername@$MailDomain" subject "Interface down module4" body "$_info_routername $_syslog_msg $_cli_result" | |
action 3.0 syslog msg "sent" | |
event manager applet mail_on_module4_up | |
event syslog occurs 1 pattern "LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet4.*to up" period 1 | |
action 1.0 info type routername | |
action 1.1 cli command "show interface desc" | |
action 2.0 mail server "$MailServer" to "$MailRecipient" from "$_info_routername@$MailDomain" subject "Interface up module4" body "$_info_routername $_syslog_msg $_cli_result" | |
action 3.0 syslog msg "sent" | |
event manager applet mail_on_powersupply | |
event syslog occurs 1 pattern "POWERSUPPLY" period 1 | |
action 1.0 info type routername | |
action 1.1 cli command "show power" | |
action 2.0 mail server "$MailServer" to "$MailRecipient" from "$_info_routername@$MailDomain" subject "Power Supply State Change" body "$_info_routername $_syslog_msg $_cli_result" | |
action 3.0 syslog msg "sent" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment