Antony Hawkins

Running vs Startup Comparison ConfigSource (PoC)

Recommended Posts

This one's a little bit like my ConfigSource to compare a config to a static template file:

 

It uses similar methodology, to compare the already-gathered 'running' and 'startup' instances of any existing ConfigSource via the LogicMonitor API.

It doesn't gather any configs directly from the device.

Example: The Cisco_IOS ConfigSource already gathers a 'running-config' and a 'startup-config' from relevant devices. This ConfigSource calls the LM API to pull the most recent retrievals of each of these, and compares one to the other.

This ConfigSource can be extended to consider any ConfigSource that includes 'running' and 'startup' config instances, and/or could be cloned/edited to consider other instance pairs if the device type names them differently (e.g. 'default' vs 'running', 'original' vs 'custom', etc).

The two configs are compared line-by-line and where lines differ, these are marked and alerted on.

This ConfigSource demands the presence of the DataSources_List PropertySource, as it relies on a known list of LogicModules active on a device, as the AppliesTo is based on the presence of LogicModule names in the resultant auto.activedatasources device property:

https://communities.logicmonitor.com/topic/1581-datasources_list-propertysource/

As it uses the LM API, this ConfigSource also demands an API token ID and Key pair, but you'll need those for the above PropertySource anyway. That pair must have the ability to read LM Config data.

v1.2.0 is published with locator: GYNA3E

Share this post


Link to post
Share on other sites

@Antony Hawkins Thanks for the follow up. I've played with this configsource over the last few days and have some thoughts. The property names for the API key and id have changed but that is easy enough to update in the configsource script. What is limiting the value of this configsource is that IOS provides different output from show run and show start. Show starting-config includes certificate chains while show running-config does not. This of course results in a diff trigger.

IOS does have a show runing-config brief option that excludes certificate data. However that would obviously require a change to the IOS configsource pulling the configurations. If possible there would be value in excluding the certificate data from the diff in this configsource. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.