From SWQL I'm looking for existing/customized poller from local poller library ( Settings / all settings/Manage pollers).
Here's a SWQL query that would get you all that together. Not sure what exactly you're looking for but this is a start for you.
SELECT p.PollerID ,p.PollerType ,p.NetObjectType ,p.NetObjectID ,p.Uri ,'Orion.Pollers' AS [Source]FROM Orion.Pollers AS pWHERE p.Enabled = 1UNION ALL( SELECT d.ID AS [PollerId] ,dt.Name AS [PollerType] ,d.NetObjectType ,d.NetObjectID ,d.Uri ,'Orion.DeviceStudio' AS [Source]FROM Orion.DeviceStudio.PollerAssignments AS dINNER JOIN Orion.DeviceStudio.Pollers AS dp ON dp.PollerID = d.PollerIDINNER JOIN Orion.DeviceStudio.Technologies AS dt ON dt.TechnologyID = dp.TechnologyIDWHERE d.Enabled = 1 )
Thanks, I'm going to test this...
I am trying to find the custom pollers defined in all settings > manage pollers as well. I tested the above query and it just retrieved the generic pollers assigned to each node, for instance here are the poller retrieved for one of my nodes:
{'PollerID': 3567, 'PollerType': 'N.CPU.SNMP.NetSnmpReal', 'NetObjectType': 'N', 'NetObjectID': 1131, 'Uri': 'swis://server/Orion/Orion.Pollers/PollerID=3567', 'Source': 'Orion.Pollers'}{'PollerID': 3568, 'PollerType': 'N.Memory.SNMP.NetSnmpReal', 'NetObjectType': 'N', 'NetObjectID': 1131, 'Uri': 'swis://server/Orion/Orion.Pollers/PollerID=3568', 'Source': 'Orion.Pollers'}{'PollerID': 3563, 'PollerType': 'N.ResponseTime.ICMP.Native', 'NetObjectType': 'N', 'NetObjectID': 1131, 'Uri': 'swis://server/Orion/Orion.Pollers/PollerID=3563', 'Source': 'Orion.Pollers'}{'PollerID': 3569, 'PollerType': 'N.Routing.SNMP.Ipv4CidrRoutingTable', 'NetObjectType': 'N', 'NetObjectID': 1131, 'Uri': 'swis://server/Orion/Orion.Pollers/PollerID=3569', 'Source': 'Orion.Pollers'}{'PollerID': 3561, 'PollerType': 'N.Status.ICMP.Native', 'NetObjectType': 'N', 'NetObjectID': 1131, 'Uri': 'swis://server/Orion/Orion.Pollers/PollerID=3561', 'Source': 'Orion.Pollers'}{'PollerID': 3572, 'PollerType': 'N.Topology_Layer3.SNMP.ipNetToMedia', 'NetObjectType': 'N', 'NetObjectID': 1131, 'Uri': 'swis://server/Orion/Orion.Pollers/PollerID=3572', 'Source': 'Orion.Pollers'}{'PollerID': 3573, 'PollerType': 'N.Topology_Layer3_IpRouting.SNMP.ipCidrRouter', 'NetObjectType': 'N', 'NetObjectID': 1131, 'Uri': 'swis://server/Orion/Orion.Pollers/PollerID=3573', 'Source': 'Orion.Pollers'}{'PollerID': 3566, 'PollerType': 'N.Uptime.SNMP.Generic', 'NetObjectType': 'N', 'NetObjectID': 1131, 'Uri': 'swis://server/Orion/Orion.Pollers/PollerID=3566', 'Source': 'Orion.Pollers'}
It did not retrieve the custom pollers defined under manage pollers that I have defined and assigned to this node. I am trying to figure out how to find and apply these custom pollers to a node via the API.
The Device Studio Pollers (DeviceStudio) elements have no verbs and therefore cannot be assigned via the API.
DeviceStudio
The above entities (Orion.DeviceStudio.PollerAssignments, Orion.DeviceStudio.Pollers, and Orion.DeviceStudio.Technologies) are only read-only. They do not support create or update calls. Without a verb to do this work for you, there's no way to "automate" the work via the API.
Orion.DeviceStudio.PollerAssignments
Orion.DeviceStudio.Pollers
Orion.DeviceStudio.Technologies
You can report on this information via the API, but any "automation" would be handled by the SysObjectID matching mechanism in the product.
What are you trying to accomplish with this information? Can you provide an example of the workflow you are trying to handle?
We use a custom pollers so the Node Details "MachineType" pulls the specific model name/number of the node. After I add a node to Solarwinds with Ansible (using this ansible collection), I want to assign the custom poller, (for example CSR1000V as shown below) to the node so the Machine type pulls the specific module name in the machine type. I have already brought this issue up on in the collections github and looking for additional help to figure this out.
From the solarwinds web interface you can also assign the customer poller under the node > list resources. Under the Node Details section you can select the custom poller. So there is no way to assign this custom poller via the API?
If it's there, it's not something that's obvious (to me). I'd have to bow out and ask some of the architects to get more details.