EEM in 3750G

Answered Question
May 19th, 2010
User Badges:

Hi,

Having been reading about EEM, i would like to try to use it in applet form, to track objects in IOS.


When i try to config it, i dont see the cli option event track .....


I have 12.2(50) IP services with EEM 2.40


Am i missing something?


TIA

Alan

Correct Answer by Joe Clarke about 6 years 11 months ago

While this will work, you may find the syslog solution a little better as it will not add the extra SNMP polling overhead.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Reza Sharifi Wed, 05/19/2010 - 10:26
User Badges:
  • Super Bronze, 10000 points or more
  • Cisco Designated VIP,

    2017 LAN

Hi  Alan,


Do you see this command:


Switch-A(config)#event manager applet test ?
  authorization  Specify an authorization type for the applet
  class          Specify a class for the applet
  trap           Generate an SNMP trap when applet is triggered.
 

Switch-A(config)#event manager applet test


The above ouput is from a 3750-E


Reza

alanwright1 Wed, 05/19/2010 - 10:43
User Badges:

Hi Reza,

I see this at the event menu



INBOUND-STACK(config-applet)#event ?

  application        Application specific event

  cli                CLI event

  config             Configuration policy event

  counter            Counter event

  env                Environmental event

  gold               GOLD event

  interface          Interface event

  ioswdsysmon        IOS WDSysMon event

  none               Manually run policy event

  oir                OIR event

  snmp               SNMP event

  snmp-notification  SNMP Notification Event

  syslog             Syslog event

  tag                event tag identifier

  timer              Timer event

In applet conf i see this
INBOUND-STACK(config)#event manager applet test ?
  trap  Generate an SNMP trap when applet is triggered.
 
alanwright1 Wed, 05/19/2010 - 11:01
User Badges:

Hi Reza,

I've looked at the guide, but its not clear at all how to link an event to the tracked object.


Cheers

Alan

Joe Clarke Sun, 05/30/2010 - 10:48
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Object tracking support for EEM does not exist in the Cat3K line.  However, you should be able to use the syslog ED to match on TRACKING-5-STATE messages.  When your tracked object changes state, do you see those syslog messages?  If so, just build an EEM applet to watch for them.  For example:


event manager applet track-down

event syslog pattern "TRACKING-5-STATE: 1 .*Up->Down"

...

alanwright1 Tue, 06/01/2010 - 04:12
User Badges:

Hi Joe, thanks for the reply, i've not yet tried that, but certainly sounds plausible


I did manage to find another way though, which i have provided for the benefit of others



event manager applet SLADOWN

event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.10 get-type exact entry-op eq entry-val "1" exit-op eq exit-val "2" poll-interval 2

action 0.5 cli command "enable"

action 1.0 cli command "conf t"

action 2.0 cli command "int g1/0/18"

action 3.0 cli command "shut"

event manager applet SLAUP

event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.10 get-type exact entry-op eq entry-val "2" exit-op eq exit-val "1" poll-interval 2

action 0.5 cli command "enable"

action 1.0 cli command "conf t"

action 2.0 cli command "int g1/0/18"

action 3.0 cli command "no shut"

Correct Answer
Joe Clarke Tue, 06/01/2010 - 08:19
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

While this will work, you may find the syslog solution a little better as it will not add the extra SNMP polling overhead.

alanwright1 Tue, 06/01/2010 - 08:31
User Badges:

Joe,

You're right, it will, but i will check the merits of both and see what one fits best. AT least i have more than one alternative


Cheers

Alan

Actions

This Discussion