[c-nsp] EEM question: event timer and syslog

Johannes Resch jr at xor.at
Mon Oct 16 11:57:02 EDT 2006


hi,

I thought I could give EEM a try to achieve a workaround for some
PPP related strangeness.

basically, what I need to do is to monitor syslog for a certain string, 
wait a couple of seconds and then execute a CLI command.

for me, the "obvious" way to achieve this would be (watch out, 
pseudo-syntax!)

x) define applet foo1
    -event syslog pattern <string>
    -action sleep <time>
    -action cli "command"

given the lack of a "sleep" command, the next best approach would be

x) define applet foo1
    -event syslog pattern <string>
    -action set timer <timer> countdown <time>

x) define applet foo2
    -event timer <timer> expired
    -action cli <command>


but it seems impossible to set a timer as an action.
is there something else in EEM that could be used for this purpose?

any input appreciated,

regards,
-jr



More information about the cisco-nsp mailing list