cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

Move nodes between Polling Engines using SWIS API (agent based)

Jump to solution

Hi all,

I'm wondering if there is a way to move nodes to different Polling Engine through the SWIS API whilst also maintaining agent functionality. You can do this through the GUI using the "Manage Nodes" page under "More Actions" and "Change Polling Engine".

If I change it via the SWIS API, using Set-SwisObject $swis $nodeUriToMove @{EngineID = $targetEngineId}, it changes Polling Engines in the database as expected but the Agent itself doesn't know anything.

I need an API equivalent for the GUI example, essentially.

Cheers,

JWTech

0 Kudos
1 Solution

Last time I had to do this I built a script that just looped through all the agent based nodes and redeployed the agent with my new engineid, i was using the DeployToNode verb, but it also looks like the AssignToEngine verb could work too.

Orion.AgentManagement.Agent | Orion SDK Schemas

- Marc Netterfield, Github

View solution in original post

5 Replies

Last time I had to do this I built a script that just looped through all the agent based nodes and redeployed the agent with my new engineid, i was using the DeployToNode verb, but it also looks like the AssignToEngine verb could work too.

Orion.AgentManagement.Agent | Orion SDK Schemas

- Marc Netterfield, Github

View solution in original post

"Orion.AgentManagement.Agent AssignToEngine" did the trick, and by itself no less. Once the config had been pushed to the agent, it synced with SolarWinds and the database updated with the new Poller ID.

Thanks!

@jwtech thx for tip - exactly what i was looking for !!! 🙂

0 Kudos

Can you provide the script you used to push the change to the managed nodes? I am very very new to this and have no clue where to even start with "a" tool to do this.

0 Kudos

Probably start here

Home · solarwinds/OrionSDK Wiki · GitHub

And they gave code samples for how to do various tasks, this is a powershell example

OrionSDK/DeployAgentViaVerb.ps1 at master · solarwinds/OrionSDK · GitHub

- Marc Netterfield, Github
0 Kudos