0 Replies Latest reply on Oct 16, 2015 5:17 PM by RichardLetts

    SDK example for CreateNode needs fixing for NPM 11.5.2

    RichardLetts

      Adding a Node for Monitoring
      To add a new node to Orion and enable monitoring of the node, create a new Orion.Nodes entity and
      register it for polling the relevant set of information.
      First, review the PowerShell script example for adding a node.
      # initialize SWIS connection
      $swis = Connect-Swis
      # add a node
      $newNodeProps = @{
      EntityType="Orion.Nodes";
      IPAddress="10.0.0.1";
      IPAddressGUID="0100000a-0000-0000-0000-000000000000";
      Caption="";
      DynamicIP=$False;
      EngineID=1;
      Status=1;
      UnManaged=$False;
      Allow64BitCounters=$False;
      SysObjectID="";
      MachineType="";
      VendorIcon="";
      ObjectSubType="SNMP";
      SNMPVersion=2;
      Community="public";
      }


      This is insufficient for NPM 11.5.2 -- it leaves the SNMPv3 credentials as NULL, and the Trap manager will not be able to handle traps from the node.

      the error report in the logfile looks like this:

       

      2015-10-13 12:32:00,730 [34] ERROR SolarWinds.Orion.Common.ManagedNodeState - Error occured during the getting node with IP [xxx.xxx.xxx.xxx] from Nodes table!

      System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.

      at System.Data.SqlClient.SqlBuffer.get_String()

      at System.Data.SqlClient.SqlDataReader.GetString(Int32 i)

      at SolarWinds.Orion.Common.ManagedNodeState.AddNewNode(String ip, Boolean getSnmpCred)


      'editing' a node properties and submitting without changing them updates the NULL values in the SNMPv3 credentials.