I have a question concerning the syslog detector for an EEM script using TCL. Sorry if this is already covered somewhere else I could not find relevent info with a search. I have a TCL script which kicks off if a T1 flaps because of LOS (syslog message = controller t1 0/0*LOS) and then issue a shut/no shut. The problem is that this can create a loop if the LOS is still remaining after bouncing the T1. Multiple instances of the script can end up being run on top of one another until I disable the EEM and re-register.
I am wondering if there is an easy way to disable the syslog detector while the script is running so it will ignore any LOS syslogs until the script is finished. I have a work around where I remove the "event manager policy" command before flapping the interface and then re-registering the policy at the end. However, it seems like a poor work around to de-register the entire policy. I also tried using a global variable and set it from 0 to 1 when the script was in progress. However, the subsequent script instances did not seem to grab the new global variable value until the first instance was complete and the variable was set back to 0. So that did not work.
Thanks for the suggestion. I tried using that mutex method of checking for 2 instances of a policy running. It appears that while the 2nd syslog gets triggered by the first instance is running the 2nd instance doesn't start until the first is completed. So basically the script continuted to loop. I will stick to unregistering the policy while I flap the interface to avoid the loop.
You would need to modify the mutex to call "exit 0" if you find another instance running. You will also need to increase your Tcl thread count to at least 2 using "event manager scheduler script thread class default number 2". But the unregister/register might be an easier way to go if you can accept the config churn.
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.