4 Replies Latest reply: Mar 29, 2012 3:12 AM by tom.rybka RSS

    Add node to NPM 10.2.1 using Orion SDK 1.4 works, but interface pollers don't get added

    mkomeara

      I've successfully added a node with an interface using SDK, but the interface pollers don't appear in the database so the displays aren't correct;

       

      Here is the PowerShell code used to add the interface and pollers to the node;

      The interface shows up in the Interfaces table.  Here is my Powershell code for adding the interface and pollers;

      # add interface and pollers for Ethernet0
      $nodeId = "2395"
      $newIfaceProps = @{
      NodeID=$nodeId;
      InterfaceName="Ethernet0";
      InterfaceIndex=1;
      ObjectSubType="SNMP";
      Status=1;
      }
      $newIfaceUri = New-SwisObject $swis –EntityType "Orion.NPM.Interfaces" –Properties $newIfaceProps
      $ifaceProps = Get-SwisObject $swis -Uri $newIfaceUri
      # register specific pollers for Ethernet0
      #
      # Interface Traffic Statistics
      $poller = @{
      PollerType="I.StatisticsTraffic.SNMP.Universal";
      NetObject="I:"+$ifaceProps["InterfaceID"]
      }
      $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller
      #
      # Interface Errors
      $poller = @{
      PollerType="I.StatisticsErrors32.SNMP.IfTable";
      NetObject="I:"+$ifaceProps["InterfaceID"]
      }
      $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller
      #
      # Interface Status
      $poller = @{
      PollerType="I.Status.SNMP.IfTable";
      NetObject="I:"+$ifaceProps["InterfaceID"]
      }
      $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller
      #
      # Interface Rediscovery
      $poller = @{
      PollerType="I.Rediscovery.SNMP.IfTable";
      NetObject="I:"+$ifaceProps["InterfaceID"]
      }
      $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller
      #