Compare Running configuration to written when captured on LM
In my instance of LM I have captured the written configuraiton and running configuration. Any suggestions to do a diff comparison and create an alert against it?
-=CB=-
The_Bhattman
6 comments
Antony Hawkins
Then my startup vs running custom ConfigSource, as linked above, may be of assistance.
The_Bhattman
OPMy goal is simply to know when the running configuration is not saved. Because I am dealing with support people that from time to time forget to save the configs.
mnagel
FWIW, we do use a Unsaved Config DS we wrote for IOS that compares the saved time and last config change time. It _mostly_ works, but there are some annoyances. One is uptime counter rollover, a general problem with timestamp comparisons. The other is that IOS reports config changed the second you enter config mode even if you change nothing.
The_Bhattman
OPHow about this article
/topic/2027-running-vs-startup-comparison-configsource-poc/mnagel
Not only that, but comparing in some cases is very painful. When we used to use Nagios, we had checks that worked very well for the ASA since they use a cryptochecksum (this was trivial since we just scanned all the files in one pass, compared and submitted passive check results for any problems -- LM needs something similar, probably via the API). For IOS there are a bunch of elements instantiated at startup that are not in the saved config, so while you could perhaps fashion a suitable filter, it would be brittle. Other platforms might be OK, just depends.
LM User
If they are separate instances no. You'd have to do that kind of work inside a groovy based config check, collecting both the configs within a single configsource, then using groovy to compare them.