6 Replies Latest reply on Dec 3, 2012 4:33 PM by tdanner

    SDK - Add node, missing details section

    bfrost

      I'm working on a large scale integration for adding devices for monitoring. One scenario is to add a device for ICMP monitoring only. I'm testing with Perl and Powershell with the same results. The issue is when I add a device for ICMP monitoring only through the GUI the node details page will display information in the "Node Details" section including the buttons for poll now and edit node. When added via the SDK, that box stays empty and I also get a "Current Cisco Buffer Misses" section with an error due to no snmp poller.

      I have tested adding the following pollers:
      N.IPAddress.ICMP.Generic
      N.Uptime.SNMP.Generic
      N.Details.SNMP.Generic

      I have compared the nodes in the node table and can't see any differences. I'm also assigning the ObjectSubType as ICMP.

      I then tested adding it as SNMP and included the N.Cpu.SNMP.CiscoGen3 and N.Memory.SNMP.CiscoGen3 and still can't get the Node details to show up.

      I don't know if there's a simple field I'm not setting or if I'm missing the right poller.

      Here's an example node I'm adding:
      $newNodeProps = @{
      EntityType="Orion.Nodes";
      IPAddress="10.10.10.10";
      IPAddressGUID="0100000a-0000-0000-0000-000000012000";
      Caption="Test-Orion";
      DynamicIP=$False;
      EngineID=1;
      Status=1;
      UnManaged=$False;
      Allow64BitCounters=$True;
      SysObjectID="";
      MachineType="Unknown";
      VendorIcon="";
      # SNMP v2 specific
      ObjectSubType="SNMP";
      SNMPVersion=2;
      Community="public";
      # polling timing (optional)
      RediscoveryInterval=5; # minutes (5..525600=1 year)
      PollInterval=120; # seconds (1..1200)
      StatCollection=10; # minutes (1..600)
      }
      Thanks

        • Re: SDK - Add node, missing details section
          bfrost

          The interesting part is if I add a node via the SDK, I confirm the Node Details is not displaying anything, I then edit the node and simply update a custom attribute at this point the Node Details are now working properly.

            • Re: SDK - Add node, missing details section
              Halef

              The Node details piece will crash if there is a null value in some column. The OrionWeb.log file should tell you which one (the file is located in the logging directory, somewhere in %APPDATA%\SolarWinds.

               

              Updating a node through Edit node will update all values to correct defaults, so that would be why it starts working even when single value was changed.

              • Re: SDK - Add node, missing details section
                tom.rybka

                I've noticed that the IPAddressGUID field value does not match the IPAddress value. There is an encoding scheme described in thread Re: Using sample.pl to create simple nodes for reference.

                 

                Anyway, which NPM version are you using? Can you please send us also script fragments adding pollers for new nodes?

                 

                You may also be interested in the thread forum Orion SDK focusing on API topics, you may find some more useful information e.g. in its thread Add node to SAM with PS -> node display problem on web console.

                  • Re: SDK - Add node, missing details section
                    bfrost

                    Here's the current code I'm using in NPM 10.4. I was also exploring adding the node via a discovery profile with SNMP disabled. My challenge there is it is also added to NCM. So I'm exploring how to remove a node (via a script) in parallel.

                     

                    # add a node

                    $newNodeProps = @{

                      EntityType="Orion.Nodes";

                      IPAddress="4.2.2.4";

                      IPAddressGUID="04020204-0000-0000-0000-000000000000";

                      Caption="Test-4";

                      DynamicIP=$False;

                      EngineID=1;

                      Status=1;

                      UnManaged=$False;

                      Allow64BitCounters=$True;

                      SysObjectID="";

                      MachineType="Unknown";

                      VendorIcon="";

                      External=$False;

                      SNMPV3PrivMethod="None";

                      SNMPV3AuthMethod="None";

                      RWSNMPV3PrivMethod="None";

                      RWSNMPV3AuthMethod="None"; 

                      SysName="1";

                      #Description="1";

                      Location="1";

                      Contact="1";

                      IOSImage="1";

                      IOSVersion="1"; 

                      Vendor="Unknown";

                      SystemUpTime="0";

                      #VendorIcon="Unknown.gif";

                      TotalMemory="0";

                      PercentMemoryUsed="-2";

                      # SNMP v2 specific

                      ObjectSubType="ICMP";

                      #SNMPVersion=2;

                      #Community="H1ghSp33d";

                      Community="";

                      RWSNMPV3AuthKeyIsPwd="0";

                      RWSNMPV3PrivKeyIsPwd="0";

                      SNMPV2Only="0";

                      SNMPV3AuthKeyIsPwd="0";

                      SNMPV3PrivKeyIsPwd="0";

                      SNMPV3Username="";

                      BufferNoMemThisHour="-2";

                      BufferNoMemToday="-2";

                      BufferSmMissThisHour="-2";

                      BufferSmMissToday="-2";

                      BufferMdMissThisHour="-2";

                      BufferMdMissToday="-2";

                      BufferBgMissThisHour="-2";

                      BufferBgMissToday="-2";

                      BufferLgMissThisHour="-2";

                      BufferLgMissToday="-2";

                      BufferHgMissThisHour="-2";

                      BufferHgMissToday="-2";

                      # polling timing (optional)

                      RediscoveryInterval=30; # minutes (5..525600=1 year)

                      PollInterval=120; # seconds (1..1200)

                      StatCollection=10; # minutes (1..600)

                    }

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

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

                      • Re: SDK - Add node, missing details section
                        bfrost

                        Got it working. All the fields displayed need to have a value vs null. The Description (aka NodeDescription) was the last item I was missing.

                         

                        Here's what the code should look like:

                        $newNodeProps = @{

                          EntityType="Orion.Nodes";

                          IPAddress="4.2.2.4";

                          IPAddressGUID="04020204-0000-0000-0000-000000000000";

                          Caption="Test-4";

                          DynamicIP=$False;

                          EngineID=1;

                          Status=1;

                          UnManaged=$False;

                          Allow64BitCounters=$True;

                          SysObjectID="";

                          MachineType="Unknown";

                          External=$False;

                          SysName="";

                          NodeDescription="";

                          Location="";

                          Contact="";

                          IOSImage="";

                          IOSVersion=""; 

                          Vendor="Unknown";

                          VendorIcon="Unknown.gif";

                          PercentMemoryUsed="-2";

                          # SNMP v2 specific

                          ObjectSubType="ICMP";

                          Community="";

                          BufferNoMemThisHour="-2";

                          BufferNoMemToday="-2";

                          BufferSmMissThisHour="-2";

                          BufferSmMissToday="-2";

                          BufferMdMissThisHour="-2";

                          BufferMdMissToday="-2";

                          BufferBgMissThisHour="-2";

                          BufferBgMissToday="-2";

                          BufferLgMissThisHour="-2";

                          BufferLgMissToday="-2";

                          BufferHgMissThisHour="-2";

                          BufferHgMissToday="-2";

                          # polling timing (optional) - pull from standards table

                          RediscoveryInterval=30; # minutes (5..525600=1 year)

                          PollInterval=120; # seconds (1..1200)

                          StatCollection=10; # minutes (1..600)

                        }

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

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

                        • Re: SDK - Add node, missing details section
                          tdanner

                          It looks like you are missing NodeDescription. Add something like this to $nodeProps and the Node Details resource should be happy:

                           

                            NodeDescription="my description";

                          1 of 1 people found this helpful