Forum Discussion
There is also another option which may be preferable (and is certainly easier to adapt existing ConfigSources to), and that is to have the Groovy checkpoint itself call the template file and do the line-by-line comparison to the collected config.
The advantage to this approach is that adding this compare-to-template ability to an existing ConfigSource, which itself may have a very complex collection script, is much easier than with the above POC_v1 script. The collection script itself can remain entirely untouched, with all the additional logic self-contained within a check script. This makes it very clean and easy to keep config collection distinct from logic that does the comparison to a template.
The downside is that the config stored within LogicMonitor will contain no indication as to any discrepancies from the template - you'll get an alert stating that the collected config doesn't match the template, but no visual indication as to why not. This might not be a concern, of course, depending on the actions you plan to take in this situation - if you'll just put a template back on to the device regardless, it's not a problem; if you want a quick way to see the differences (and maybe indicate that it's your template that's out of date), this option is not so good.
As above, this is really just another proof of concept showing what can be done - it's up to you how you use those abilities!
Compare_Config_To_Template_POC_option2, v1.0.0: YX6XND
Related Content
- 2 months ago
- 6 months agoAnonymous