Forum Discussion

dpad's avatar
3 years ago

Feature to Push/Execute commands on a Network gear from LM Config

Hello Team,

Is there a feature that will allow a user to push config changes/ run a config scrip or command to a Network device? or is it part of the roadmap for LM config? 

Like any other Network shop we have many Network gear and running simple show commands on a dozen device is quite a task and having the ability to run it from the LM console and have the results generated as well would be helpful. 

 

Thanks! 

10 Replies

  • Anonymous's avatar
    Anonymous

    Technically, you can create a LogicModule that uses SSH to connect to the device and execute any commands you want. For DataSources, you'd just need to return some number that you can track, maybe a status of the execution of the command.

    There's nothing out of the box that allows you to just push configs back to a device. Can't speak to roadmap though.

  • Hello Stuart,

    Thanks for the feedback. I'll check your recommendation. 

    Cheers! 

  • Anonymous's avatar
    Anonymous

    The better way to do this would be to build an integration between LM and Ansible Tower. For that matter, even a scripted DataSource could call an ansible playbook if you wanted, as long as ansible was installed on the Collector. 

  • I've done this before by writing a config source that logs into the device via ssh, executes the command or an array of commands, then captures the command outputs and alerts on certain keywords. We've done this to make large scale changes on hundreds of devices relatively all at once. I highly recommend you test on a test device first, but it is possible! 

  • What I've always wanted is a user bindable action button on a resource, like the Poll Now button, but configurable so that the datasource bound to the button is based on some applies to logic, configured in settings.

  • Anonymous's avatar
    Anonymous

    Like have another script configured in the datasource that runs whenever you click that button?  So for configs, "push config". For the ping DS, you could have a "trace route now" option. For CPU, a "show top processes right now" button. Like that?

  • On 10/19/2021 at 6:22 PM, Stuart Weenig said:

    Like have another script configured in the datasource that runs whenever you click that button?  So for configs, "push config". For the ping DS, you could have a "trace route now" option. For CPU, a "show top processes right now" button. Like that?


    Yep exactly.  But I'm think more a button that can be bound to a Data Source or a Config Source that uses embedded scripting for discovery/collection.  So, for example, today there is on a Data Source definition a button for Test Script.  Now imagine if there was a checkbox option on the Data/Config Source to make that button available on a resource where an Applies To expression evaluates  to true.  And, an option to choose the label for the button. Basically it's the same structure as a data source, but is only invoked by a user via the data source's button on the resource.  

    Not sure if that all made sense, so here's a mockup ?

  • 6 minutes ago, Mosh said:


    Yep exactly.  But I'm think more a button that can be bound to a Data Source or a Config Source that uses embedded scripting for discovery/collection.  So, for example, today there is on a Data Source definition a button for Test Script.  Now imagine if there was a checkbox option on the Data/Config Source to make that button available on a resource where an Applies To expression evaluates  to true.  And, an option to choose the label for the button. Basically it's the same structure as a data source, but is only invoked by a user via the data source's button on the resource.  

    Not sure if that all made sense, so here's a mockup ?

     

    Button could appear next to the existing cluster of Refresh, Poll Now and Debug buttons:
     

     

  • Anonymous's avatar
    Anonymous

    I think we're describing the same thing, although your pictures make it clearer. Your pictures are pretty much exactly what i saw in my head.

  • On 10/19/2021 at 10:23 AM, asims@cspire.com said:

    I've done this before by writing a config source that logs into the device via ssh, executes the command or an array of commands, then captures the command outputs and alerts on certain keywords. We've done this to make large scale changes on hundreds of devices relatively all at once. I highly recommend you test on a test device first, but it is possible! 

    mind sharing an example?