I would like to have an event trip on the log entry ".*Crypto.tunnel.is.*" where the value I'm looking for immediately following is UP or DOWN. I see that I can set an environment variable for _syslog_pattern, but I'm unsure with EEM how do utilize the information. Basically, I want to run commands 1-5 when the log message "Crypto Tunnel is UP" occurs and commands 6-10 when the log message "Crypto Tunnel is DOWN" occurs.
Currently, I have a TCL script called by kron every minute that compares current/previous state and runs the cli commands appropriately, but it is not a clean solution and I think I have a memory leak.
If you want to take different actions on UP and DOWN events, you will either need to create two applet policies, or use a TCL policy. With the TCL policy, you can do conditionals so you can take alternate code paths. Applets, however, do not currently support conditionals.
Thanks for the doc. I am confused, however, with what is required to be in the CLI configuration and what needs to be in the TCL script. Preferably, the syslog pattern "Crypto tunnel is" will kick off my script, which will do x cmds if tunnel is UP and y cmds if tunnel is DOWN. How is this setup? And once setup, how do I read that line in the script? I see from the doc you pointed out the event_register_syslog, but I am unsure how to apply that. Thanks. If not obvious by now, I'm not a programmer.
This is actually a pretty cool feature, i didn't even know it existed until I was looking for a solution to advertise a subnet (prefix in BGP talk), only if a certain condition existed. This is exactly what conditional advertisements does
j ai une question j ai achete un routeur cisco 887VA-k9 , je le configuré avec la configuration ci- dessous
si je le lier avec mon pc portable sur l un de ses ports directement ça marche toute est bien ( la connexion internet + m...
Attached policy provides CLI access to the Cisco 4G router over text messaging. Two files are in the attached .tar file:
2. PDF with instructions on how to load and use the .tcl file.