We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is Why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 637 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

 

364 New Members signed up the last 30 days!

satisfaction-guaranteed

100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags: ,


Forum Replies

  1. thanks for this useful article ,
    I tried to configure in GNS3 here is my steps :
    1- I connected R1 to internet and it can access to smtp server
    2- here is my configuration :

    event manager applet TEST22 
     event syslog pattern "Interface Ethernet0/1, changed state to down"
     action 1.0 mail server "smtp_server.ccnp.iq" to "XXX@YYY.iq" from "R2@YYY.iq" subject "Interface IS DOWN" body "Please try to fix it ASAP"
    !
    

    3- I got this error "

    *Mar  1 01:11:23.571: fh_policy_send_mail(): smtp connect attempt: 5
    R1#
    *Mar  1 01:11:28.575: smtp_connect connect fail: 260
    *M
    ... Continue reading in our forum

  2. Hi Thomas,

    Glad to hear you like it :slight_smile: Let’s take a closer look at this config:

    event manager applet SHOW_RUN_NO_INTERFACES
    event cli pattern “show run” sync yes
    action 1.0 cli command “enable”
    action 2.0 cli command “show run | exclude interface”
    action 3.0 puts “$_cli_result”
    action 4.0 set $_exit_status “0”

    Let’s take a look at it line-by-line:

    event cli pattern “show run” sync yes

    We want to match the “show run” command so that’s out pattern. The “sync yes” part means that EEM will run before this command is executed.

    action 1.0 cli command “enable”
    action 2

    ... Continue reading in our forum

  3. Hi Rene,

    Is there any way to configure on layer 3 switches an script to shut down ports and enable ports on a schedule basis.

  4. Hello Alfredo

    Yes, it is possible to shutdown and enable specific ports based on time. The following example may shed some light on this:

    When using EEM, you must create two applet timer policies, one to “shutdown” and the other to “no shutdown”. In the following example, the port will be shutdown every day at midnight, and brought back up every day at 8 am.

    event manager applet shutdown_port
    event timer cron cron-entry "0 0 * * *"
    action 1.0 cli command "enable"
    action 2.0 cli command "config t"
    action 3.0 cli command "interface FastEthernet1/0/1"
    action 4.0 
    ... Continue reading in our forum

  5. Hi Lagapides,
    I follow the steps you provided but it doesn’t work. See what I collect.

    show clock: 16:19:24.374 PDT Fri Mar 17 2017
    Version 12.2(53)SE2
    
    TEST#sh event manager policy registered
    No.  Class     Type    Event Type          Trap  Time Registered           Secu  Name
    1    applet    user    timer cron          Off   Fri Mar 17 16:17:07 2017  none  shutdown_port
     cron entry {18 16 * * *}
     maxrun 20.000
     action 1.0 cli command "enable"
     action 2.0 cli command "config t"
     action 3.0 cli command "interface gigabitEthernet 0/3"
     action 4.0 cli command "shu
    ... Continue reading in our forum

17 more replies! Ask a question or join the discussion by visiting our Community Forum