I would like to add/remove custom pollers with the SDK. The only thread I found was from 2012, so I wanted to ask if it's possible now.
Thanks!
This support was added in 11.5, so it will be waiting for you when you get there.
Hi,
You can assign custom pollers to nodes or interfaces. Sample provided below.
New-SwisObject $swis –EntityType 'Orion.NPM.CustomPollerAssignmentOnNode' -Properties @{Description='Test';CustomPollerID='a519ce64-33c3-490c-b0f8-04982911cd3e';NodeID='1';}
use Orion.NPM.CustomPollerAssignmentOnInterface for adding custom pollers to interfaces.
Thanks for pointing that out. I'll give it a go.
What version of Powershell are you using to execute this? I've tried with both version 2 & 3 using both the ISE and Non-ISE versions with no luck.
The script is able to Get-SwisData, but trying to trying New-SwisObject throws this:
New-SwisObject : Operation not supported on Orion.NPM.CustomPollerAssignmentOnNode
This is the meat and potatoes of how I'm trying to do this:
$NodeID = Get-SwisData $swis "Select NodeID FROM Orion.Nodes WHERE IP_Address = @NodeIP" @{NodeIP = $NodeIP}
$CustomPollerID = Get-SwisData $swis "SELECT CustomPollerID FROM Orion.NPM.CustomPollers WHERE UniqueName = @UnDPName" @{UnDPName = $CustomPollerName}
$NodeBag = @{
Description='Test';
CustomPollerID=[System.Guid]$CustomPollerID;
NodeID=[Int]$NodeID;
}
#New-SwisObject $swis –EntityType 'Orion.NPM.CustomPollerAssignmentOnNode' -Properties @{Description='Test';CustomPollerID='c58f3b64-b9bc-448f-8a82-4975758736f6';NodeID='4466';}
New-SwisObject $swis –EntityType 'Orion.NPM.CustomPollerAssignmentOnNode' -Properties $NodeBag
The version of powershell wouldn't matter. What version of NPM are you using?
10.7 at the moment. (I've been delaying the 11.5 upgrade until the next NCM is released.)