{"id":1812,"date":"2013-09-07T09:54:40","date_gmt":"2013-09-07T08:54:40","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=1812"},"modified":"2013-09-07T09:55:28","modified_gmt":"2013-09-07T08:55:28","slug":"cisco-eem-applet-to-prevent-and-alert-upon-interfaces-being-shut-down","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=1812","title":{"rendered":"Cisco EEM Applet &#8211; Prevent and alert upon interfaces being shutdown"},"content":{"rendered":"<p>SYSLOG EVENT DETECTOR:<br \/>\nWhen an interface has been shutdown, the EEM applet re-enables interface and sends an email alert with logged in users information.<!--more--><\/p>\n<p>event manager applet interface_Shutdown<br \/>\nevent syslog pattern &#8220;Interface GigabitEthernet1\/0, changed state to administratively down&#8221;<br \/>\naction 1.0 cli command &#8220;enable&#8221;<br \/>\naction 1.5 cli command &#8220;config t&#8221;<br \/>\naction 2.0 cli command &#8220;interface g1\/0&#8221;<br \/>\naction 2.5 cli command &#8220;no shutdown&#8221;<br \/>\naction 3.0 cli command &#8220;end&#8221;<br \/>\naction 3.5 cli command &#8220;who&#8221;<br \/>\naction 4.0 mail server &#8220;192.168.1.1&#8221; to &#8220;.mailto:person@domain.com.&#8221; from &#8220;.mailfrom:EEM@domain.com.&#8221; subject &#8220;.GIG_Interface_g1\/0_SHUT.&#8221; body &#8220;Current users are $_cli_result&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SYSLOG EVENT DETECTOR: When an interface has been shutdown, the EEM applet re-enables interface and sends an email alert with logged in users information.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83,67],"tags":[],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1812"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1812"}],"version-history":[{"count":4,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1812\/revisions"}],"predecessor-version":[{"id":1816,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1812\/revisions\/1816"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1812"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}