Forum Discussion

pgordon's avatar
pgordon
Icon for Expert rankExpert
3 days ago

Custom Config Collection

Has anyone created custom modules to collect configs without having to log in and out of a switch/router as much? Right now, when I have configs getting collected from a switch via SSH, it logs in and out twice for each type of thing I'm collecting. We have it collecting configs and a few other commands the NOC folks asked if it could grab, so there are eight entries every time a collection is done. We also have these devices set up to log all sign ins and outs, so this fills the logs quite a bit every time it is run and makes it difficult to read other activity being logged.
The active discovery and collection scripts on these config sources (for example SSH_Interactive_Dynamic) seem very similar so I don't understand why there is a need to have both. Ideally, one script would login, collect the four things I want it to collect, and sign out.
I'm looking through the developer documentation a bit now, it's been a long time since I've written any code at this level though so any help would be appreciated

Thank you!

1 Reply

  • LM Config doesn't support batchscript style collection where all instances are gathered at once, so it runs once for each instance in separate execution contexts. The only way I could think of to do this, would be to use an SSH ControlMaster and modify the collection and AD scripts to use an existing ControlMaster socket, such that subsequent connections within a short period of time don't have to re-authenticate.