4 Replies Latest reply on Aug 25, 2014 9:25 AM by sskalny

    Help with SWIS/JSON node addition

    sskalny

      Hello,

       

      I have just started to dabble with the Orion SDK and am looking for a way to integrate Solarwinds with some Python scripts we have to automatically provision gear, etc.

       

      I followed the Python Client sample and have successfully added my nodes and assigned generic SNMP/Uptime/Interface pollers and changed custom properties.  My first problem is that these nodes never have any interfaces added.  I even tried running my nightly import job, and they didn't even show up on the scan.  Interestingly, the rediscovers look to be running, but I'm not sure why the poll is always stuck at when I added the node.  Subsequently, it never seems to discover the machine type, etc.  If I do a list resources from the GUI, I can manually add in all the interfaces.

       

      In the end, I'd also like to automatically add these nodes to NCM and, if possible, set it as a device to be scanned for Layer 3 networks in the IPAM module.  I haven't found a ton of documentation on this yet....  Any help would be greatly appreciated.

       

      -Scott

      Polling Details

      Polling IP Addressxxxxxx
      Polling Enginexxxxxx
      Polling MethodSNMP
      Polling Interval120 seconds
      Next Poll04:41 PM  (this is in the past)
      Statistics Collection10 minutes
      Enable 64 bit CountersYes
      Rediscovery Interval30 minutes
      Next Rediscovery05:59 PM
      Last Database UpdateFriday, August 22, 2014 5:50 PM
        • Re: Help with SWIS/JSON node addition
          madhavan

          Hi,

           

          I'm not sure whether you created the node by providing values for all mandatory or required properties. I've provided below the list of properties (sample) which I use to create a node and the polling happens. Try it and let us know if any issues. Also please check if the correct poller is assigned to the node.

           

               "EntityType":"Orion.Nodes",

              "IPAddress":"10.10.1.1", Sample

              "IPAddressGUID":"044648a4-0000-0000-0000-000000000000", Sample

              "Caption":"",

              "DynamicIP":"false",

              "EngineID":"1",

              "Status":"1",

              "UnManaged":"false",

              "Allow64BitCounters":"false",

              "SysObjectID":"",

              "MachineType":"",

              "VendorIcon":"",

              "ObjectSubType":"SNMP",

              "SNMPVersion":"2",

              "Community":"public",

              "RediscoveryInterval":"5",

              "PollInterval":"120",

              "StatCollection":"10",

              "BufferNoMemThisHour":"-2",

              "BufferNoMemToday":"-2",

              "BufferSmMissThisHour":"-2",

                "BufferSmMissToday":"-2",

                "BufferMdMissThisHour":"-2",

                "BufferMdMissToday":"-2",

                "BufferBgMissThisHour":"-2",

                "BufferBgMissToday":"-2",

                "BufferLgMissThisHour":"-2",

                "BufferLgMissToday":"-2",

                "BufferHgMissThisHour":"-2",

                "BufferHgMissToday":"-2"


          Also for adding created Nodes to NCM, there is a Verb "AddNodeToNCM" which accepts the NodeID as parameter. The sample script has example on how to invoke verbs. Try this and let us know.

            • Re: Help with SWIS/JSON node addition
              sskalny

              Thank you, I'm positive I set all of what I thought were "mandatory."  Let me go through your list and try setting everything you have set.   I'll let you know if it works out.   So, just to confirm, what is the behavior supposed to be when this node is added with node/interface pollers?  Does it add all interfaces (whether active/inactive) by default?

               

              Thanks,

              Scott

                • Re: Help with SWIS/JSON node addition
                  madhavan

                  Creating the node does not add interfaces automatically.

                   

                  You can invoke DiscoverInterfacesOnNode verb on Orion.NPM.Interfaces and get the information on discovered interfaces and invoke AddInterfacesOnNode to add them to a node.

                   

                  There is a powershell sample (NPM.DiscoverAndAddInterfacesOnNode.ps1) as part of SDK which does this operation. You can refer it.

                    • Re: Help with SWIS/JSON node addition
                      sskalny

                      Thanks again for the response.  I think that's the part I'm missing...how to add interfaces through Python/JSON - and I don't see an example for this in any of the documentation.  I do see the PS examples, but am hoping to accomplish through Python.  I apologize as I'm new to scripting and the SDK, so may be missing something very simple.