06-28-2016 10:51 PM
I am trying to track a bug which causes certain CLIs to disappear from the running-config after we reload the router.
Those CLIs were saved in startup-config before reloading the router.
Is there a EEM to compare running-config with startup-config line-by-line after reloading the router and syslog the lines which are missing from the running-config ?
Solved! Go to Solution.
06-29-2016 07:53 AM
You could do something simple like:
event manager applet compare-config
event timer cron cron-entry "@reboot"
action 1.0 cli command "enable"
action 2.0 cli command "show archive config diff nvram:startup-config system:running-config"
action 3.0 mail to "user@company.com" from "user@company.com" server "10.1.1.1" subject "Config diffs" body "$_cli_result"
06-29-2016 07:53 AM
You could do something simple like:
event manager applet compare-config
event timer cron cron-entry "@reboot"
action 1.0 cli command "enable"
action 2.0 cli command "show archive config diff nvram:startup-config system:running-config"
action 3.0 mail to "user@company.com" from "user@company.com" server "10.1.1.1" subject "Config diffs" body "$_cli_result"
06-29-2016 08:57 AM
Thank you Joe.
What does this command do ?
event timer cron cron-entry "@reboot"
and how does it accomplish the task after reboot ?
06-29-2016 08:59 AM
This schedules the EEM policy to run after each reboot.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: