Forum Discussion

pgordon's avatar
pgordon
Icon for Expert rankExpert
16 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!

4 Replies

  • 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.

    • pgordon's avatar
      pgordon
      Icon for Expert rankExpert

      Well that's unfortunate. Is there a particular reason why LM Config doesn't support batchscript? I've had to disable collecting configs on so many resources because of all the logs it generates so it's at the point where it's not adding value for us.

      • Mike_Rodrigues's avatar
        Mike_Rodrigues
        Icon for Product Manager rankProduct Manager

        Turns out I was wrong and we have added Batchscript support for ConfigSources pgordon.

        More info here: https://www.logicmonitor.com/support/configsource-configuration

  • We have a similar problem that the frequent logins are causing some older switches to have problems and even lock up that can only be reset by a reboot.  The switch is still working, but no one can login as that function is now broken.