cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1627
Views
0
Helpful
3
Replies

event manager

Buenas a todos,

Quisiera saber por que a al tratar de registrar un tcl me sale este error:

"EEM configuration: error: tag statement required when using multiple events: policy sendmail.tcl"

Ejemplo:

event manager environment _email_server 192.168.35.5

event manager environment _email_from cisco2951core@elcomercio.com.py

event manager environment _email_to fredycaceres@elcomercio.com.py

event manager directory user policy "flash:/"

event manager applet test

event tag sendmail.tcl config

Ro-Core-matriz(config)#event manager policy sendmail.tcl

EEM configuration: error: tag statement required when using multiple events: policy sendmail.tcl

Ro-Core-matriz(config)#

Ro-Core-matriz(config)#do sh flash

-#- --length-- -----date/time------ path

1     56854788 Aug 28 2010 18:29:14 c2951-universalk9-mz.SPA.151-1.T1.bin

13        5272 Dec 27 2010 19:30:58 sendmail.tcl

197828608 bytes available (62345216 bytes used)

3 Replies 3

cwildes
Level 1
Level 1

Fredy,

Please send the first 20 or so lines in the sendmail.tcl file contents so that we can see the Tcl policy. The error message is complaining about the way that the event statements have been constructed within the sendmail.tcl file.

Thanks,

Clyde

adjunto el archivo, lo puedes ver?

Fredy,

Only one of the following event statements can be enabled:

# Useful event registration tcl command extensions

# None

::cisco::eem::event_register_none queue_priority low nice 1 maxrun 600

# Watchdog Timer

#::cisco::eem::event_register_timer watchdog name errimt time $errim_period queue_priority low nice 1

# Syslog

::cisco::eem::event_register_syslog occurs 1  pattern .*%SSH-5-SSH2_SESSION:.* maxrun 90 queue_priority low nice 1

# Object Tracking

#::cisco::eem::event_register_track 1 state up queue_priority low nice 1

# Interface

#::cisco::eem::event_register_interface name $intf parameter txload entry_op ge entry_val 192 entry_val_is_increment FALSE queue_priority low nice 1

# Cron Job

#::cisco::eem::event_register_timer cron name test cron_entry "0 * * * *" queue_priority low nice 1 maxrun 20

What David Lin (dalin@cisco.com) has provided is a template to show how you can send an e-mail using EEM and a variety of different triggers. You can see this by adding a # at the beginning of the second event statement (so that only one event trigger is active) and registering the policy again:

# Useful event registration tcl command extensions

# None

::cisco::eem::event_register_none queue_priority low nice 1 maxrun 600

# Watchdog Timer

#::cisco::eem::event_register_timer watchdog name errimt time $errim_period queue_priority low nice 1

# Syslog

#::cisco::eem::event_register_syslog occurs 1  pattern .*%SSH-5-SSH2_SESSION:.* maxrun 90 queue_priority low nice 1

# Object Tracking

#::cisco::eem::event_register_track 1 state up queue_priority low nice 1

# Interface

#::cisco::eem::event_register_interface name $intf parameter txload entry_op ge entry_val 192 entry_val_is_increment FALSE queue_priority low nice 1

# Cron Job

#::cisco::eem::event_register_timer cron name test cron_entry "0 * * * *" queue_priority low nice 1 maxrun 20

Then register and run the policy using:

enable

config t

event manager environment _email_server

event manager envrionment _email_from

event manager environment _email_to

event manager policy sendmail.tcl

exit

event manager run sendmail.tcl

Thanks,
Clyde

Review Cisco Networking for a $25 gift card