Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Node creation sample #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Node creation sample #14

wants to merge 1 commit into from

Conversation

AmbicaY
Copy link

@AmbicaY AmbicaY commented Jun 23, 2020

#13 Node creation sample. Please review if it is good for a merge.

@mrxinu
Copy link
Owner

mrxinu commented Jul 18, 2020

Hey @AmbicaY! Thanks so much for the PR. The first part looks good where it creates the node but then you have to add all the pollers which is where things can get confusing. If you're adding a Windows machine it's easy enough to get a distinct list of pollers that have been set to enabled in Orion.Pollers with this query:

SELECT DISTINCT PollerType
FROM Orion.Nodes AS Nodes
INNER JOIN Orion.Pollers AS Pollers ON Nodes.NodeID = Pollers.NetObjectID
WHERE Nodes.Vendor = 'Windows'
AND Pollers.NetObjectType = 'N'
AND Pollers.Enabled = 'True'
AND Nodes.ObjectSubType = 'SNMP'

That should produce this list:

N.AssetInventory.Snmp.Generic
N.Cpu.SNMP.HrProcessorLoad
N.Details.SNMP.Generic
N.Memory.SNMP.HrStorage
N.ResponseTime.ICMP.Native
N.Routing.SNMP.Ipv4RoutingTable
N.Routing.SNMP.Ipv6RoutingTable
N.Status.ICMP.Native
N.Topology_Layer3.SNMP.ipNetToMedia
N.Uptime.SNMP.Generic

The fields that are required to create a new poller are these:

  1. PollerType (example, "N.Uptime.SNMP.Generic")
  2. NetObject (example, "N:2")
  3. NetObjectType (example, "N")
  4. NetObjectID (example, 2)
  5. Enabled (example, "True")

This is the entire process in PowerShell for reference.

https://github.com/solarwinds/OrionSDK/blob/master/Samples/PowerShell/CRUD.AddNode.ps1

You want to make some changes to it and send me a note when you want me to review it again? I promise I won't wait weeks this time! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants