Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Adding an SNMP node with SDK, but SNMP details never populate

$
0
0

Hi all,

We're using the SDK and a powershell script to create a SNMP node. When I use SWQL Studio to compare the node added via the script to one added via the admin GUI, the details look pretty much identical, except that the SNMP fields like NodeDescription, SysName, Vendor, SysObjectID and so on, never get populated on the node we add via the script. Here's our code snippit (we're passing in nodename, IPaddress as command line args to the script):

 $newNodeProps = @{
  EntityType="Orion.Nodes";
  IPAddress=$args[1];
  Caption=$args[0];
  DynamicIP=$False;
  EngineID=1;
  Status=1;
  UnManaged=$False;
  Allow64BitCounters=$False;
  ObjectSubType="SNMP";
  SysObjectID="";
  MachineType="";
  VendorIcon="";
  SNMPVersion=2;
  Community="public";
  PollInterval=120;
  StatCollection=10;
  RediscoveryInterval=30;
 }

 $newNodeUri = New-SwisObject $swis -EntityType "Orion.Nodes" -Properties $newNodeProps
 $nodeProps = Get-SwisObject $swis -Uri $newNodeUri

 # Windows/UNIX
 $poller = @{
  PollerType="Poller_HT";
  NetObject="N:"+$nodeProps["NodeID"]
 }
 $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller

 

So even when we've added a node via this method and tried to manually issue a "rediscover" in the Node Management context in the GUI, the fields still don't populate (yet it claims the rediscover completes). Am I missing something here? Only thing i can see via SWQL that might be relevant is the "NextRediscovery" field on the script added node is "1/1/0001 12:00" but the same field in the GUI added node is up to date.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>