11 Replies Latest reply on Sep 15, 2017 12:46 PM by nick_scott

    Automation of adding nodes into Solarwinds


      Hi All


      We are looking at using Chef to automate server deployment and part of this work would be:


      1. Lookup in IPAM the next available address in a subnet, reserve it and add the hostname to the reservation

      2. Chef passes a name/IP and node creation (and possible node type or template name) request to Solarwinds for monitoring

      3. Solarwinds adds the above node and enables a predefined set of base monitors.


      The next parts are to do with Chef running scripts to talk to Solarwind

      1. 1.       Chef sends a script to disable monitoring of an existing node
      2. 2.       Chef sends a script to enable monitoring of an existing node
      3. 3.       Chef sends a script to delete an existing node


      If anyone has any automation style scripts they can share, or any pitfalls to avoid when doing this work I would appreciate any input







        • Re: Automation of adding nodes into Solarwinds

          Same workflow we are planning to build with Puppet. Using combination of machinetype and "system" custom prop as a template identifier not too un-similar to NCM device templates but with the ability to have different templates for the same machinetype.


          Using the example scripts provided in the SDK to add node, add custom props, and discover and filter out, based on template, interfaces.


          Areas we are concerned about include limited IPAM swis verbs and adding asset inventory by SDK.


          What language do you plan to write the scripts in that call the SWIS API?




          • Re: Automation of adding nodes into Solarwinds

            We're using Ayehu eyeShare to automate these kind of processes by simply creating a workflow that dynamically could add nodes or whatever. eyeShare has built in integration for solar winds for managing alerts, but you could simply integrate with SolarWinds API to perform these actions.




            • Re: Automation of adding nodes into Solarwinds

              Can anyone share Chef recipes to manage adding/modifying/deleting SolarWinds nodes?  We're interested in doing this and would love to see what you guys came up with.




              • Re: Automation of adding nodes into Solarwinds



                Please correct me if I am wrong here.


                Solarwinds has Auto Discovery Wizard which has options to add nodes and enable monitors.


                Why do we need Puppet/Chef to add node to Solarwinds if this option is available within Solarwinds itself.


                Trying to understand


                1) If there is any limitation in Solarwinds and that is why you are adding nodes through Puppet/Chef. If so can please share the scripts.


                Highly appreciate your help in advance.




                • Re: Automation of adding nodes into Solarwinds

                  We are automating our server builds both on-prem and in the cloud so we want the Chef system to automatically add the new nodes and give them the correct monitors

                  • Re: Automation of adding nodes into Solarwinds

                    Hi Simonp73,


                    This script in powershell add a node using OrionSDK, you can see this example in GitHub in the next link OrionSDK/Samples/PowerShell at master · solarwinds/OrionSDK · GitHub


                    # This sample script demonstrates how to add a new node using CRUD operations.


                    # Please update the hostname and credential setup to match your configuration, and

                    # information about the node you would like to add for monitoring.


                    # Connect to SWIS

                    $hostname = "localhost"

                    $username = "admin"

                    $password = New-Object System.Security.SecureString

                    $cred = New-Object -typename System.Management.Automation.PSCredential -argumentlist $username, $password

                    $swis = Connect-Swis -host $hostname -cred $cred


                    $ip = ""


                    # add a node

                    $newNodeProps = @{

                      IPAddress = $ip;

                      EngineID = 1;


                      # SNMP v2 specific

                      ObjectSubType = "SNMP";


                      SNMPVersion = 2;


                      # === default values ===


                      # EntityType = 'Orion.Nodes'

                      # Caption = ''

                      # DynamicIP = false

                      # PollInterval = 120

                      # RediscoveryInterval = 30

                      # StatCollection = 10 



                    $newNodeUri = New-SwisObject $swis -EntityType "Orion.Nodes" -Properties $newNodeProps

                    $nodeProps = Get-SwisObject $swis -Uri $newNodeUri


                    # register specific pollers for the node

                    $poller = @{






                    # Status


                    $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller


                    # Response time


                    $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller


                    # Details


                    $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller


                    # Uptime


                    $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller


                    # CPU


                    $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller


                    # Memory


                    $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller






                    On the other hand, you need connect with SWIS to IPAM.IPNode entity y search if the ip adores is int the system. This is a example for this;


                    Get-SwisData $swis 'SELECT TOP 1 I.DisplayName FROM IPAM.IPNode I WHERE Status=2 AND I.Subnet.DisplayName = '''''

                    Get-SwisObject -Uri (Get-SwisData $swis ('SELECT Uri from IPAM.IPNode where IPAddress = ''' + $ip + '''')) -SwisConnection $swis

                    • Re: Automation of adding nodes into Solarwinds

                      Yes that is what we adapted to our needs.


                      If you check it out my original post on this matter was 3 years ago.  A lot has changed and we now automate all of our linux builds ans script the addition of them to our various monitoring systems