3 Replies Latest reply on Jul 27, 2015 2:18 AM by Jan Pelousek

    Unable to add multiple down nodes in SDK

    allistair

      Good Morning,

      I would like to do is use the SDK to add multiple down nodes to NPM and keep them in monitoring until they come back up but I have having an issue adding multiple IP address. How can i ammend my script to add multiple IP addresses? Can you confirm if I need to add any more pollers so when they come up the would function as normal.

      $swis = Connect-Swis

      $newNodeProps = @{ EntityType="Orion.Nodes";

      IPAddress="10.132.100.1", "10.123.0.2","10.345.2.6"

      IPAddressGUID="";

      Caption="";

      DynamicIP=$False;

      EngineID=1;

      Status=2;

      UnManaged=$False;

      Allow64BitCounters=$False;

      SysObjectID="";

      MachineType="";

      VendorIcon="";

      ObjectSubType="SNMP";

      SNMPVersion=2;

      Community="public"}


      POLLERS

      I.StatisticsTraffic.SNMP.Universal

      N.IPAddress.SNMP.Generic

      N.Status.SNMP.Native"

      N.ResponseTime.SNMP.Native

      N.Memory.SNMP.CiscoGen3

      N.Cpu.SNMP.CiscoGen3

      N.Uptime.SNMP.Generic

        • Re: Unable to add multiple down nodes in SDK
          Jan Pelousek

          IPAddress can't be array of strings. You need to for example create an array of addresses and then iterate through the array. e.g like.

           

          $Addresses = @("10.132.100.1", "10.123.0.2","10.345.2.6")

           

          $Addresses | Foreach-Object {

          $newNodeProps = @{ EntityType="Orion.Nodes";

          IPAddress=$_;

          .......

          }

           

          Ad pollers:

          - I.StatisticsTraffic.SNMP.Universal it's interface poller - can't be added for node, but for interface (e.g. after creation)

          - rest looks good. I believe you will need also "N.Details.SNMP.Generic". Then is up to you if you preffer SNMP or ICMP for status polling (if ICMP, than assign N.Status.ICMP.Native and N.ResponseTime.ICMP.Native)


          I hope it helps.

          Honza

            • Re: Unable to add multiple down nodes in SDK
              allistair

              Thanks very much. It worked like a charm but a small issue. I'm using NPM 11.5 and when i add he nodes using the SDK script and  when i highlight the node, instead of showing me the node/interface information i get the follwoing message: "Sorry, the content could not be loaded." That only happens when i add the nodes via the script. When i add it manually, and i highlight the node i get the info(polling ip, machine type, etc). Is there something i'm missing?

                • Re: Unable to add multiple down nodes in SDK
                  Jan Pelousek

                  I can imagine, that some properties are still initialized as NULL, however I believe, that when the correct pollers are assigned, that those should be initialized to current value the latest after first rediscovery (by default 30 minutes or can be forced by click on "Rediscover"). Is that still problem after rediscovery? Or can you check in DB which properties remain NULL in comparison to the normally created nodes? Those properties then can be added to the property bag with expected value.

                  H.