N5K EEM script to shutdown interface if CDP neighbor drops

Hi
Total n00b on EEM here. Background - we have an inline transparent L2 firewall sitting between our Nexus core switch and our UCS. If the physical interfaces on one of the firewalls go down, our UCS virtual hosts can detect that and will automatically fail over to their other NIC and network connectivity is restored. However if theres a software or process problem on the firewall we can lose connectivity to half of the UCS because all the links are physically staying up but the server traffic is getting blackholed.
If the L2 firewall stops passing traffic we will lose the CDP neighbor entry for the UCS on the N5K. If that happens I want to shut down the port channel interface that connects the Nexus to the firewall, triggering the virtual hosts to fail over to their second NIC.
Basically
1)     Check for presence of CDP neighbor on e1/17
2)     If there is an entry there do nothing
3)     If there is no entry there then issue the following cli commands "conf t, interface port-channel 17, shutdown"
I would like the switch to execute the script once per minute all day every day.
NEXUS-SW1# sh cdp ne int e1/17
Capability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater,
                  V - VoIP-Phone, D - Remotely-Managed-Device,
                  s - Supports-STP-Dispute
Device-ID             Local Intrfce Hldtme Capability  Platform      Port ID
UCS-FABRIC-A(SSI171402MC)
                    Eth1/17        173    S I s     UCS-FI-6248UP Eth1/17
NEXUS-SW1#
Could anyone give me a hand on a script to do this please? Looks like there is EEM neighbor discovery stuff in IOS but not NX-OS on the 5K, so I think this script will have to use the CLI to detect failure. Thanks

I'm running the latest 6.0(2)N2(1) NX-OS on the 5548 with the Layer 3 daughtercard and LAN Enterprise Services license. There is some EEM stuff in the CLI but it appears basic compared to what is in IOS.
NEXUS-SW1(config-applet)# event ?
  cli             Create a cli event specification
  counter         Create a counter event
  fanabsent       Create fanabsent event specification
  fanbad          Create fanbad event specification
  oir             Create Online-Insertion-Removal event specification
  policy-default  Use the event in the system policy being overridden
  snmp            Create a 'snmp' event specification.
  storm-control   Create a storm control event specification
  syslog          Create a syslog event specification
  sysmgr          System manager related events
  temperature     Create temperature event specification
  track           Create a 'track' event specification
NEXUXS-SW1(config-applet)# event cli ?
  match  Enter cli regex to be used for matching
  tag    Event tag identifier
I was hoping I could use the "event cli match" or something like that to detect the loss of the cdp neighbor. And then shut down the interface if it is not there.

Similar Messages

  • EEM Script to set interface passive

    Hello All,
    I am running OSPF in my domain. I want to put an interface in the passive state after a flap or multiple flaps. For example, if I get a log that states:
    2012 Sep  1 00:08:47 %ETHPORT-5-IF_DOWN_LINK_FAILURE: Interface Ethernet1/44 is down (Link failure)
    to be able to perform:
    enable
    conf t
    interface Ethernet1/44
    ip ospf passive-interface
    end wr
    FYI this concerns a Nexus 3K running NX-OS 5.0(3)U3(2).
    Thanks for your help.

    I haven't used EEM on the 3K yet.  However, I think it has similar support to the 7K, so this should work:
    event manager applet ethport override __ethpm_link_flap
       event policy-default count 2 time 1000
       action 1 cli conf t
       action 2 cli int $interface
       action 3 cli ip ospf passive-interface
       action 4 cli end
    You can't use syslog here since you can't parse the message to get the interface.  While you could using Python or Tcl to do this, executing scripts out of EEM applets is not officially supported.  So this applet should set an interface that flaps twice within 1000 seconds to be an OSPF passive interface.

  • EEM Scripts on a Catalyst 3750G

    Does anyone know if I can run EEM scripts on a Catalyst 3750G switch? If so, what version of IOS do I need to make it work?
    Thanks!    

    Joseph,
    I want to create a simple EEM script on a Catalyst 3750G running ipservices IOS on it. All I want to do is monitor interfaces GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4. If either of these interfaces go down, I wan the EEM script to shutdown interface GigabitEthernet 1/0/26. Here is what I put together so far. I haven't tried it yet, but do you think this will work?
    Thanks!
    event manager session cli username "root"
    event manager applet Stop_Announcing_BGP
    event syslog pattern "Interface GigabitEthernet1/0/3, changed state to down"
    event syslog pattern "Interface GigabitEthernet1/0/4, changed state to down"
    action 1.0 cli command "enable"
    action 1.1 cli command "configure terminal"
    action 1.2 cli command "interface gig1/0/26"
    action 1.3 cli command "shut"

  • EEM scripting assistance: Switch, router and AP CDP

    We would like to create an EEM script which will let the switch populate the interface description based on the CDP neighbour, however, we want the script to only populate the interface if (and only if) the CDP is a Cisco wireless access point (AP), a Cisco Catalyst switch and a Cisco router.   We DO NOT want the interface description to be edited if the CDP neighbour is a Cisco phone or a Cisco DMP (for example). 
    This is our EEM script: 
    event manager applet update-port
    event none
    event neighbor-discovery interface regexp GigabitEthernet.* cdp add
    action 100 if $_nd_cdp_capabilities_string eq "Router" goto 200
    action 110 elseif $_nd_cdp_capabilities_string eq "Switch" goto 200
    action 120 if $_nd_cdp_capabilities_string eq "Switch" goto 200
    action 200 cli command "enable"
    action 210 cli command "config t"
    action 220 cli command "interface $_nd_local_intf_name"
    action 230 cli command "description $_nd_cdp_entry_name"
    action 400 else
    action 500 end
    And this is a sample of our “sh cdp neighbor” output:
    Switch#sh cdp n d
    Device ID: Wireless
    Entry address(es):
      IP address: <REMOVED>
    Platform: cisco AIR-CAP3602I-N-K9   ,  Capabilities: Router Trans-Bridge
    Interface: GigabitEthernet0/8,  Port ID (outgoing port): GigabitEthernet0.1
    Holdtime : 146 sec
    Version :
    Cisco IOS Software, C3600 Software (AP3G2-K9W8-M), Version 15.2(2)JB, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2012 by Cisco Systems, Inc.
    Compiled Mon 10-Dec-12 23:52 by prod_rel_team
    advertisement version: 2
    Duplex: full
    Power drawn: 15.400 Watts
    Power request id: 19701, Power management id: 2
    Power request levels are:15400 0 0 0 0
    Power Available TLV:
        Power request id: 0, Power management id: 0, Power available: 0, Power management level: 0
    Management address(es):
    Device ID: 00:0f:44:02:c5:29
    Entry address(es):
      IP address: <REMOVED>
    Platform: Cisco DMP 4310G,  Capabilities: Host
    Interface: GigabitEthernet0/3,  Port ID (outgoing port): eth0
    Holdtime : 157 sec
    Version :
    5.4
    advertisement version: 2
    Duplex: full
    Power Available TLV:
        Power request id: 0, Power management id: 0, Power available: 0, Power management level: 0
    Management address(es):
    Device ID: CALM040.mgmt.educ
    Entry address(es):
      IP address: <REMOVED>
    Platform: cisco WS-C3750E-24PD,  Capabilities: Switch IGMP
    Interface: GigabitEthernet0/10,  Port ID (outgoing port): GigabitEthernet1/0/22
    Holdtime : 126 sec
    Version :
    Cisco IOS Software, C3750E Software (C3750E-UNIVERSALK9-M), Version 15.0(2)SE, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2012 by Cisco Systems, Inc.
    Compiled Fri 27-Jul-12 23:26 by prod_rel_team
    advertisement version: 2
    Protocol Hello:  OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010221FF0000000000000023AC075300FF0000
    VTP Management Domain: 'ACTEducation'
    Native VLAN: 99
    Duplex: full
    Power Available TLV:
        Power request id: 0, Power management id: 1, Power available: 0, Power management level: -1
    Management address(es):
      IP address: <REMOVED>
    Device ID: 00:0f:44:02:b6:31
    Entry address(es):
      IP address: <REMOVED>
    Platform: Cisco DMP 4310G,  Capabilities: Host
    Interface: GigabitEthernet0/2,  Port ID (outgoing port): eth0
    Holdtime : 169 sec
    Version :
    5.4
    advertisement version: 2
    Duplex: full
    Power Available TLV:
        Power request id: 0, Power management id: 0, Power available: 0, Power management level: 0
    Management address(es):
    Best Regards/Leo

    action 221 regexp "^([^\.])\." $_nd_cdp_entry_name match hostaction 230 cli command "description $host"
    Hi Joe,
    So the EEM is going to look like this: 
    event manager applet update-port
    event neighbor-discovery interface regexp GigabitEthernet.* cdp add
    action 100 regexp "(Switch|Router)" $_nd_cdp_capabilities_string
    action 110 if $_regexp_result eq 1
    action 200 cli command "enable"
    action 210 cli command "config t"
    action 220 cli command "interface $_nd_local_intf_name"
    action 230 regexp "^([^\.])\." $_nd_cdp_entry_name match host
    action 240 cli command "description $host"
    action 500 end
    Is this correct?

  • Cisco 1841/871 crash EEM scripting 15.1(1)T

    We have been testing 15.1.1T on a couple of lab Cisco 1841 and Cisco 871 devices.
    On the devices we are using EEM to automate the failover/failback process for a cellular modem attached to f3 on the 871 or f0/1 on the 1841. One of the EEM applets we use fires from a cron timer event that occurs every 10 minutes on the router.
    IOS revision 12.4(22)T we had no problems with using the cron-timer triggered applet (every 10 minutes between 7am to 10pm), except for the fact that every command issued by EEM required AAA authentication. The EEM applet is causing our routers to saturate our Cisco ACS servers (we use 700+ routers in the field, all exectuing this EEM script) with single-connect requests. We will refer to the cron-timer executed applet as 'Maintenance' from here on out.
    As of 15.1(1)T the addition to bypass the AAA authentication process became available. This was a huge speed increase to our EEM applets, specifically the Maintenance applet. I will include the applet for clairity.
    event manager applet Maintenance authorization bypass
    event timer cron name 10min cron-entry "*/10 7-21 * * *" maxrun 30
    action 001 cli command "en"
    action 002 cli command "show ip route | section B\*[ ]+0\.0\.0\.0"
    action 003 regexp "^B\*.([ ]+)(0\.)+0" "$_cli_result"
    action 004 set bgpstate "$_regexp_result"
    action 005 cli command "show ip route | section S[ ]+208\.38\.154\.8"
    action 006 regexp "^S([ ]+)208\.38\.154\.8" "$_cli_result"
    action 007 set wireless "$_regexp_result"
    action 008 track read 1
    action 009 set track1 "$_track_state"
    action 010 if $wireless eq 0
    action 011       if $bgpstate eq 0
    action 012             cli command "conf t"
    action 013             cli command "int fa0/1"
    action 014             cli command "no shut"
    action 015             cli command "int tun201"
    action 016             cli command "no shut"
    action 017             cli command "int lo201"
    action 018             cli command "no shut"
    action 019             if $track1 eq up
    action 020                   exit
    action 021                   else
    action 022                   cli command "conf t"
    action 023                   cli command "int s0/0/0"
    action 024                   cli command "no shut"
    action 025             end
    action 026             cli command "end"
    action 027             cli command "exit"
    action 028       else
    action 029             exit
    action 030            end
    action 031 else
    action 032       if $bgpstate eq 1
    action 033             cli command "conf t"
    action 034             cli command "int fa0/1"
    action 035             cli command "shut"
    action 036             cli command "int tun201"
    action 037             cli command "shut"
    action 038             cli command "int lo201"
    action 039             cli command "shut"
    action 040             cli command "end"
    action 041             cli command "exit"
    action 042      else
    action 043             if $track1 eq up
    action 044                   exit
    action 045             else
    action 046                   cli command "conf t"
    action 047                   cli command "int s0/0/0"
    action 048                   cli command "no shut"
    action 049             end
    action 050             cli command "end"
    action 051             cli command "exit"
    action 052             exit
    action 053       end
    action 054 end
    This script is designed to look for a couple of routes in the IP routing table, and populate two variables (bgpstate and wireless) with the regular expression matching result of the show ip route commands. It uses track 1 to determine the up/down status of Serial0/0/0 which is the primary T1 interface for WAN services on the router. The wireless is "up/1" if the static route to 208.38.154.8 is present in the show ip route output (only when f0/1 is up in this case). The T1 is "up/1" if the default route passed to the IP routing table is present in the show ip route output.
    Before the upgrade to 15.1(1)T these scripts ran without issue, and we had no errors. Now after the upgrade, anytime this script fires and the show ip route match for the wireless variable is 1 instead of zero, it begins to run through the else condition starting at action 031, and during the second execution of the script every 10 minutes (I still have not figured out how to force the cron-timer to fire only ONCE per minute, instead of at the beginning and end of the minute), the router will generate spurious memory errors, and sometimes crash or reboot.
    This all began with 15.1(1)T, and I have not seen any caveats or other entries that could possibly point to the cause of this problem. Any ideas?
    I am also attaching a crash file from one of the routers like this one so you can see what I mean.
    All of these devices are running the advipservices k9 version of this IOS.
    Thanks for your time.

    The problem with cron events running twice in the same minute is bug CSCsz12460 which will be fixed in EEM 3.2 in 15.1(3)T.
    The crash you're seeing doesn't appear to be related to EEM at all.  It looks like a problem with single-connection TACACS+.  The bug appears to be CSCtg40901 which has not yet been fixed in 15.1T.
    A workaround was suggested to use multiple-connection TACACS+.

  • Simple EEM script that references SLA but is inconsistent?

    Hi,
         Just a little confused here.....  I can do the exact commands in the EEM script directly and it does what I need it to do.  However, the script, when triggered, with the "EXACT" same commands sometimes works / sometimes not.  Arrrgghhh!  So, here is the script:
    event manager applet Virtual-PPP1_Ping
     event syslog pattern "TRACKING-5-STATE: 1 ip sla 1 reachability Up->Down"
     action 010 cli command "enable"
     action 011 cli command "clear vpdn tunnel l2tp all" pattern "[confirm]"
     action 012 cli command "confirm"
     action 020 cli command "conf t"
     action 030 cli command "int Virtual-PPP1"
     action 040 cli command "shut"
     action 045 wait 3
     action 050 cli command "no shut"
     action 060 cli command "end"
    Basically what happens is that the Virtual-PPP1 interface sometimes loses it's ip address through IPCP.  So, the L2TP tunnel is still up, BUT, the Virtual-PPP1 interface loses it's assigned IP when I check the interface as it shows "unassigned".
    Ideas?
    Thanks for the help.
    Jason

    Try this instead:
    event manager applet Virtual-PPP1_Ping
     event syslog pattern "TRACKING-5-STATE: 1 ip sla 1 reachability Up->Down" maxrun 30
     action 010 cli command "enable"
     action 011 cli command "clear vpdn tunnel l2tp all" pattern "confirm"
     action 012 cli command "confirm"
     action 020 cli command "conf t"
     action 030 cli command "int Virtual-PPP1"
     action 040 cli command "shut"
     action 045 wait 3
     action 050 cli command "no shut"
     action 060 cli command "end"

  • First EEM script

                       Hi-  Please help out this newbie...
    I am looking for an example EEM script/applet that would cause my router to change a path selection, based on a triggered event.  I usually employ Policy Based Routing on my networks which makes next hop decisions based on the source IP.  I want to do something similar with EEM, but rather than a simple source address based decision, I want a next hop selection to be based on an event.  (for the example, it could be anything...bandwidth threshold, or at a certain time of day, or whatever).  First I want to know if this can be done, and second I would appreciate it if someone could share a simple example configuration with me.   -it's the best way I learn it.
    Also, in the example, how is the applet or script applied to the router?
    Thanks!     

    You can adjust routes or add class-maps based on EEM events.  However, you can't match on something that can be controlled by an EEM event (i.e., match within a route-map).  However, you can create a route-map on the fly when an event occurs.  That is, when your event occurs, you can define a route-map to match on the interesting traffic and adjust the IP next-hop.  Bottom line is if you can do something manually on the CLI, you can automate it with EEM.
    Without knowing more specifics, I'll provide an example that will allow you to run CLI at a specific time (at midnight).  You can adapt this to meet your specific needs.  This applet can be copy and pasted directly into config t mode:
    event manager applet timed-cli
    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 "route-map TEST"
    action 4.0 cli command "match interface gi0/0"
    action 5.0 cli command "set ip next-hop 10.1.1.1"
    action 6.0 cli command "end"

  • Can EEM script schedule

    Hi All,
    I would like to run a EEM script  that would ping a server every 5 minutes when the serial interface is up . Is there any scheduling mechanism other than IPSLA that could help?
    track 1 interface serial0/0 line-protocol
    event manager applet LOSS
    event track 1 state up
    action 10 cli command "ping ip 192.168.1.1 so 2.2.2.2"
    action 20 cli command "end"
    Regards,
    Sathvik K V

    event manager applet LOSS
    event timer cron cron-entry "5 * * * *"
    Sent from Cisco Technical Support iPad App

  • Cdp neighbor IP address & Vlan interfaces

    Hi,
    No problem here, but I got curious after noticing an unexpected IP address in cdp neighborhood output.
    We use Vlan999 for management vlan. Usually I see a Vlan999 ip address in cdp neighbors. Today, instead, I see a Vlan2 ip address for one of our 4506's. (cdp neighbor command executed on a 3550. connection between 3550 and 4506 is trunk.)
    I look around some more, discover that most switches only have Vlan999 configured. The unusual switch has many vlans configured, starting with Vlan2 (Vlan1 is shutdown).
    (And that makes sense. We have 5 sites. This 4506, with native IOS, is site core at a small site - all other site cores are 6509 with CatOS/IOS.)
    So, it appears to me that CDP sees the IP address of the lowest interface it finds at the other end of a trunk.
    Is that correct?

    If it's straight L2 device, then this is true since there is no other interface but the "management interface". but on platforms like 3550 or any other platfrom that is L3 capable and where it has multiple interface vlans, it will send the interface vlan with the lowest interface vlan number in the CDP information. After, all the interfaces are in effect the "management interface", you cannot expect it to send all those information on all of those interfaces, it has to chose one. If the lowest interface vlan is shut down it will send the next lowest interface vlan. so, this is normal for a trunk port. Now, if it's an access port the ip address showing for the neighbor will be the ip address of the interface vlan for that vlan.

  • EEM script to monitor OSPF neighbor not working

    I'm trying to monitor a OSPF neighbor syslog notification event to trigger actions to remove a network statement.  I shut down the interface to the monitored neighbor and it removes the network statement which is good.  I am also trying to monitor the neighbor to come back up and then re add the removed network statement which is not working.  This may be a two part problem but I am receiving warnings that not enough vty lines are available.  I am not seeing that the network addition is working at all.  Here is my configuration.
    event manager applet ospf-watch-down
    event syslog pattern "OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.2 on FastEthernet1/0 from FULL to DOWN"
    action 1.0 cli command "enable"
    action 2.0 cli command "config t"
    action 3.0 cli command "router ospf 100"
    action 4.0 cli command "no network 2.2.2.0 0.0.0.255 area 0"
    action 5.0 cli command "end"
    action 6.0 cli command "exit"
    event manager applet ospf-watch-up
    event syslog pattern "OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.1 on FastEthernet1/0 from LOADING to FULL"
    action 1.0 cli command "enable"
    action 2.0 cli command "config t"
    action 3.0 cli command "router ospf 100"
    action 4.0 cli command "network 2.2.2.0 0.0.0.255 area 0"
    action 5.0 cli command "end"
    action 6.0 cli command "exit"
    Here is the EM syslog error message " %HA_EM-3-FMPD_ERROR: Error executing applet ospf-watch-down statement 3.0"  I am having the EM end and exit so I'm not sure why it's running out of CLI sessions.  I'm also getting this one too " %HA_EM-3-FMPD_CLI_CONNECT: Unable to establish CLI session: no tty lines available, minimum of 2 required by EEM"
    I've tested the ospf-watch-up and ospf-watch-down on its own after clearing all of the sessions and they each work on their own.  I think this is a bug where eem won't release the session.
    R1#show users
        Line       User       Host(s)              Idle       Location
    *  0 con 0                idle                 00:00:00
     130 vty 0                idle                 00:02:13 EEM:ospf-watch-up
     131 vty 1                idle                 00:00:10 EEM:ospf-watch-up
     132 vty 2                idle                 00:00:28 EEM:ospf-watch-down
      Interface    User               Mode         Idle     Peer Address
    R1#

    I know this is a old post. I was able to use the solution below, but I am having one problem.
    Using the below config I am able to receive a email anytime my voice port is in any other state than ON HOOK. The problem I have is the script runs every 30 seconds and I receive an email every 30 seconds the line is in any other state than "ON-HOOK". 
    Is there a way to have only one email generated ONLY when the state changes from the previous state? 
    example : the line is on-hook, changes to off-hook or park or whatever- a email would be generated.  ( only One email). not one every 30 seconds...
                   The line goes from Off-Hook back to IDLE.  - A email would be generated to advise the line has been restored to a IDLE state. 
    scheduler allocate 20000 1000
    event manager environment _email_from [email protected]
    event manager environment _email_to email [email protected]
    event manager environment _email_server smtp-server.isp.net
    event manager applet check_1/0/0_if_NOT_ONHOOK
     event timer watchdog time 30
     action 001 cli command "enable"
     action 002 cli command "show voice port summ | include 1/0/0"
     action 003 foreach line "$_cli_result" "\n"
     action 004  regexp "on-hook" "$line"
     action 005  if $_regexp_result eq "1"
     action 006   exit 0
     action 007  end
     action 008 end
     action 009 syslog msg "PORT_1_is_in_any_other_state_then_on-HooK!"
     action 1.0 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "$_event_pub_time:Test EEM port 1/0/0 is SHORTED ie IN ALARM" body "TEST Body"
    end
    Any ideas?

  • L3 Switch script to shutdown a port based IP reachability

    Hello all,
    I would like to know if using EEM I can shutdown a Gigabit interface based on IP reachability of the remote neighbor via ping?
    And no shutdown when the IP reachability is reestablished? I'm Using IOS-XE
    I ask this because I've a L2 connection which is not directly end-to-end but it have some network component (DWDM) in the middle for signal regeneration.
    The provider of the DWDM circuit confirm that the signal is NOT end-to-end so in case there is a failure ine the circuit the interfaces of the L3 switches won't go down and the traffic is still routed on this path since on the Routing table he routes are still present also if the remote neighbor is not reachable
    should I Use the track with the event manager applet IOS commands???
    Many Thanks
    Saluti

    I would recommend looking at feature based capabilities before implementing things with EEM... This way it would be easier to support etc...
    The functionality you are asking for should be available on your platform (I assume you are on ASR1K as you are mentioning IOS-XE). You should look at BFD...
    Here are a few references:
    http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_bfd/configuration/xe-3s/irb-bi-fwd-det.html
    You mentioned static routes, so maybe this is also relevant:
    http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_bfd/configuration/xe-3s/irb-xe-3s-book_chapter_01000.html
    Arie

  • Objects show up even when nothing plugged into port - EEM Script

    After a reboot my cisco shows the objects it tracks as up even when nothing is plugged into the interface used to track the objects. I have an EEM script that reboots the router 1 time when it finds that 4 dial numbers it round robins thru are unavialable and this works. The problem is after the reboot it see's the objects as available and re-inserts the reboot script and when they finally show down as they should be the reboot hapens over and over. Any Ideas on how to get the router to not show the tracked objects up after a reboot if the interface is down?

    As I said in the other thread, I suspect the "delay down" is causing the behavior you are seeing.

  • Two problems with EEM script

    I have an EEM script (below) and I have two problems.
    1) Line action 4.5 gets a "%Error opening bootdisk:blackhole (File or Directory already in use)"
    2) Line 5.0 - 5.5 get "Line has invalid autocommand "sh mls cef hardware module 4 | append sup-bootdisk:blackhole"
    Any ideas to get me on my way?
    thanks!
    jim

    I'm guessing you'd get the same errors if you ran these commands manually in this order one after other (i.e., you pasted them into the CLI).  This might just be a limitation of the file system.  What you might do is conver this to Tcl so you don't need to use the CLI to store the output (or at least open the file once).
    You can use the tool at http://www.marcuscom.com/convert_applet/ to convert your applet to Tcl.  A simple modification would then be to remove the append bits, and store the $_cli_result into an accumulator buffer.  At the end, do the email of that buffer.

  • Monitoring dual core (Supervisor Engine 7-E) through EEM Script.

    Hi,
    I have a Cisco Catalyst 4500E Supervisor Engine 7-E and configured an EEM Script to monitor the dual core CPU Utilization through PRTG Network Monitor.
    event manager applet dualcore authorization bypass
    event timer cron cron-entry "* * * * 0-6"
    action 100 cli command "en"
    action 120 cli command "show process cpu | include five"
    action 220 regexp "Core 0: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c0cpu5sec c0cpu1min c0cpu5min
    action 240 if $_regexp_result eq 1
    action 260 end
    action 320 regexp "Core 1: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c1cpu5sec c1cpu1min c1cpu5min
    action 340 if $_regexp_result eq 1
    action 360 end
    action 440 cli command "config t"
    action 441 cli command "snmp mib expression owner cisco name c0cpu5sec"
    action 442 cli command "expression $c0cpu5sec"
    action 443 cli command "snmp mib expression owner cisco name c0cpu1min"
    action 444 cli command "expression $c0cpu1min"
    action 445 cli command "snmp mib expression owner cisco name c0cpu5min"
    action 446 cli command "expression $c0cpu5min"
    action 550 cli command "config t"
    action 551 cli command "snmp mib expression owner cisco name c1cpu5sec"
    action 552 cli command "expression $c1cpu5sec"
    action 553 cli command "snmp mib expression owner cisco name c1cpu1min"
    action 554 cli command "expression $c1cpu1min"
    action 555 cli command "snmp mib expression owner cisco name c1cpu5min"
    action 556 cli command "expression $c1cpu5min"
    action 600 cli command "end"
    end
    It works fine but on the logging buffer there are a lot of %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:moncores) messages   -one per minute-   here an example:
    Oct 29 17:54:01: %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:dualcore)
    Oct 29 17:55:01: %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:dualcore)
    Oct 29 17:56:01: %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:dualcore)
    Oct 29 17:57:01: %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:dualcore)
    I considered to use the logging suppress duplicates command to prevent the consecutive logging of more than one copy of the same system logging (syslog) message but it is only available to the Cisco IOS XR.
    Someone could help me to determine if it is possible to avoid this messages through Embedded Syslog Manager, I tried to do that but
    I was not successful.
    Regards,
    ~Sergio

    Hi,
    I did transitioned CLI actions to the EXPRESSION-MIB SNMP but I could not receive anything information about the dualcore utilization on the PRTG Network Monitor and received a lot of  %HA_EM-7-FMFD_SNMP_ERRCODE: fh_fd_snmp_errcode: Error status: 6 NO_ACCESS_ERROR: 1. messages on the WS-C4507.
    Considering the initial EEM script, could ypu help me to avoid the  %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:moncores)
    messages using Embedded Syslog Manager.
    Here some snmpwalk to validate that I could not get the OIDs to monitor both cores.
    STEP 1     Only one value is given because there is only one physical cpu.
    cpmCPUTotalPhysicalIndex
    1.3.6.1.4.1.9.9.109.1.1.1.1.2
    C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.4.1.9.9.109.1.1.1.1.2
    SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.4000 = INTEGER: 4000
    STEP 2
    entPhysicalName
    1.3.6.1.2.1.47.1.1.1.1.7
    C:\usr>
    C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.2.1.47.1.1.1.1.7.4000
    SNMPv2-SMI::mib-2.47.1.1.1.1.7.4000 = STRING: "Linecard(slot 4)"
    #sh mod
    Chassis Type : WS-C4507R+E
    Power consumed by backplane : 40 Watts
    Mod Ports Card Type                              Model              Serial No.
    ---+-----+--------------------------------------+------------------+-----------
    1    18  10GE (X2), 1000BaseX (SFP)             WS-X4606-X2-E      JAE151904JC
    2    24  1000BaseX (SFP)                        WS-X4624-SFP-E     JAE152001AE
    4     4  Sup 7-E 10GE (SFP+), 1000BaseX (SFP)   WS-X45-SUP7-E      CAT1522L0G1
    5    48  10/100/1000BaseT (RJ45)V, Cisco/IEEE   WS-X4548-GB-RJ45V  JAE12067N8K
    M MAC addresses                    Hw  Fw           Sw               Status
    --+--------------------------------+---+------------+----------------+---------
    1 e8b7.4880.e5db to e8b7.4880.e5ec 1.2                               Ok      
    2 e8b7.48cc.6167 to e8b7.48cc.617e 1.2                               Ok      
    4 4055.39d7.76c4 to 4055.39d7.76c7 1.0 15.0(1r)SG2  03.01.01.SG      Ok      
    5 001e.f7da.d290 to 001e.f7da.d2bf 4.1                               Ok      
    Mod  Redundancy role     Operating mode      Redundancy status
    ----+-------------------+-------------------+----------------------------------
    4   Active Supervisor   SSO                 Active                           
    STEP 3
    cpmCPUTotal1minRev
    1.3.6.1.4.1.9.9.109.1.1.1.1.7
    C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.4.1.9.9.109.1.1.1.1.7
    SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.7.4000 = Gauge32: 9
    C:\usr>
    ADDITIONAL INFORMATION
    C:\usr>
    C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.2.1.90
    SNMPv2-SMI::mib-2.90.1.1.1.0 = INTEGER: 1
    SNMPv2-SMI::mib-2.90.1.1.2.0 = Gauge32: 0
    SNMPv2-SMI::mib-2.90.1.1.3.0 = Gauge32: 0
    SNMPv2-SMI::mib-2.90.1.1.4.0 = Gauge32: 0
    SNMPv2-SMI::mib-2.90.1.1.5.0 = Counter32: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = STRING: "9"
    SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = STRING: "11"
    SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = STRING: "8"
    SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = STRING: "13"
    SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = STRING: "13"
    SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = STRING: "11"
    SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = INTEGER: 1
    SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = INTEGER: 1
    SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = INTEGER: 1
    SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = INTEGER: 1
    SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = INTEGER: 1
    SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = INTEGER: 1
    SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = ""
    SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = ""
    SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = ""
    SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = ""
    SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = ""
    SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = ""
    SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = INTEGER: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = INTEGER: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = INTEGER: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = INTEGER: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = INTEGER: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = INTEGER: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = OID: SNMPv2-SMI::zeroDotZero
    SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = OID: SNMPv2-SMI::zeroDotZero
    SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = OID: SNMPv2-SMI::zeroDotZero
    SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = OID: SNMPv2-SMI::zeroDotZero
    SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = OID: SNMPv2-SMI::zeroDotZero
    SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = OID: SNMPv2-SMI::zeroDotZero
    SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = Counter32: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = Counter32: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = Counter32: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = Counter32: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = Counter32: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = Counter32: 0
    SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = INTEGER: 2
    SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = INTEGER: 2
    SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = INTEGER: 2
    SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = INTEGER: 2
    SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = INTEGER: 2
    SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = INTEGER: 2
    C:\usr>
    C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.2.1.47.1.1.1.1.2
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.1 = STRING: "Cisco Systems, Inc. WS-C4507R+E 7 sl
    ot switch "
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2 = STRING: "WS-C4507R+E 7 slot switch chassis sl
    ot"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.3 = STRING: "WS-C4507R+E 7 slot switch chassis sl
    ot"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.4 = STRING: "WS-C4507R+E 7 slot switch chassis sl
    ot"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5 = STRING: "WS-C4507R+E 7 slot switch chassis sl
    ot"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.6 = STRING: "WS-C4507R+E 7 slot switch chassis sl
    ot"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.7 = STRING: "WS-C4507R+E 7 slot switch chassis sl
    ot"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.8 = STRING: "WS-C4507R+E 7 slot switch chassis sl
    ot"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.9 = STRING: " WS-C4507R+E 7 slot switch backplane
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.10 = STRING: "Container of Fan Tray"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.11 = STRING: "FanTray"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.12 = STRING: "Container of Container of Power Sup
    ply"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.13 = STRING: "Container of Power Supply"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.14 = STRING: "Power Supply ( AC 2800W )"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.15 = STRING: "Power Supply Fan Sensor"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.16 = STRING: "Container of Power Supply"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.19 = STRING: "Clock Module"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.20 = STRING: "Mux Buffers for Redundancy Logic"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.21 = STRING: "Mux Buffers for Redundancy Logic"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.22 = STRING: "Mux Buffers for Redundancy Logic"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.23 = STRING: "Mux Buffers for Redundancy Logic"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.24 = STRING: "Mux Buffers for Redundancy Logic"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.1000 = STRING: "10GE (X2), 1000BaseX (SFP) with 6
    10GE X2 ports"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.1001 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.1002 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.1003 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.1004 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.1005 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.1006 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2000 = STRING: "1000BaseX (SFP) with 24 SFP Ports
    Jumbo Frame Support"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2001 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2002 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2003 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2004 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2005 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2006 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2007 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2008 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2009 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2010 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2011 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2012 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2013 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2014 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2015 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2016 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2017 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2018 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2019 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2020 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2021 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2022 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2023 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2024 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2047 = STRING: "1000BaseSX"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.2048 = STRING: "1000BaseSX"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.4000 = STRING: "Sup 7-E 10GE (SFP+), 1000BaseX (S
    FP) with 4 SFP+ Ports"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.4001 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.4002 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.4003 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.4004 = STRING: "Port Container"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5000 = STRING: "10/100/1000BaseT (RJ45)V with 48
    10/100/1000 baseT voice power ports (Cisco/IEEE)"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5001 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5002 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5003 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5004 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5005 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5006 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5007 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5008 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5009 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5010 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5011 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5012 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5013 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5014 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5015 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5016 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5017 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5018 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5019 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5020 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5021 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5022 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5023 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5024 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5025 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5026 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5027 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5028 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5029 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5030 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5031 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5032 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5033 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5034 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5035 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5036 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5037 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5038 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5039 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5040 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5041 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5042 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5043 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5044 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5045 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5046 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5047 = STRING: "Gigabit Ethernet Port"
    SNMPv2-SMI::mib-2.47.1.1.1.1.2.5048 = STRING: "Gigabit Ethernet Port"
    C:\usr>

  • Auto Email on event - EEM script for NxOS

    I generated EEM script for Duplicate IP address detection, but i do not know how to trigger email in NxOS.
    event manager environment emailto "[email protected]"
    event manager applet Duplicate_IP
      description "Detect Duplicate IP and Send Trap"
      event syslog pattern "%ARP-2-DUP_SRC_IP"
      action 1.0 snmp-trap strdata "Duplicate IP Detected on Host $hostname"
      action 2.0 cli sh logg last 100
      action 3.0 event-default
    Somebody know how to trigger email. There is no good document on EEM email triggering mechanism.

    Not sure if this would work in NxOS but I think it would go something like this;
    Specify the action of sending a short e-mail when the EEM applet is triggered via the event syslog pattern you already have defined:
         Router(config-applet)#  action label mail server server-address to to-address from from-address subject subject body body-text
    Remember to define the EEM environment variables first when setting up the applet as follows:
       event manager environment  _email_server
       event manager environment  _email_to
       event manager environment  _email_from

Maybe you are looking for