I was recently troubleshooting one issue and i ran some debugs on Cisco Voice Gateway and wrote the config by issuing the command “write memory”. Since the router received high call volume, the CPU spiked and the router was reloaded. Upon router reload, the debugs were turned off automatically.
Upon investigation, i realized that this is the expected behavior and to overcome such scenario there is a way by configuring EEM (Embedded Event Manager). EEM scripts can be configured in Cisco IOS, XR, and NX-OS. EEM scripts can be configured in such a way that when an event is triggered, you can run some certain set of commands which are defined in EEM Script.
To achieve the required scenario, i configured the following in the router:
Router(config)# event manager applet EnableDebuggingAfterReload
Router(config-applet)# event syslog occurs 1 pattern “%SYS-5-RESTART”
Router(config-applet)# action 1.0 cli command “enable”
Router(config-applet)# action 2.0 cli command “debug ccsip error”
Router(config-applet)# action 3.0 cli command “debug ccsip non-call”
Router(config-applet)# action 4.0 cli command “debug ccsip messages”
Router(config)# write memory
To test the EEM script, i reloaded the router by issuing the command “reload” and also by powering the router down and bringing it back again. In both
I used two different testing scenarios to verify if the EEM script is working as expected.
- By issuing the command “reload” to restart the router.
- By hard powering down the router and start the router manually.
Note: It is always recommended to run such debugs during a maintenance window and off business hours as running such debugs can bring the network down.
- Modifying License Mac on CUCM/CUC/UCCX/ - June 26, 2018
- CUCM, Cisco Unity Connection, UCCX Root Access - June 25, 2018
- Bypass CUCM or Cisco Unity Connection hardware check - June 21, 2018
- Differentiate between Restricted CUCM and Unrestricted CUCM - March 12, 2018
- Re-enable debugs on router reload – EEM Script - March 12, 2018
- Configure Cisco CUBE SIP Options Ping - January 30, 2018
- Unified Messaging with Cisco Unity Connection & Office 365 - January 4, 2018
- Transfer/Hold/Conf Buttons Not Working – Cisco 78XX IP Phone - November 20, 2017
- Track Media Resource (Transcoder) Utilization via RTMT - November 15, 2017
- Installation & Configuration of Expressway C & E – MRA - September 17, 2017