cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Level 14

Need help with the SDK

I have the SDK installed, but don;t know how to proceed. My immediate challenge is to figure out how to use the SDK to automate the creation of dynamic groups. A good example would be City. I would like to create all possible City groups based on a dynamic query of the Node custom property "City". I'm sure that if someone can show a "non-programmer" like me an example of how to do this, I could replicate the process for other groups. I would greatly appreciate the help. Thanks. BTW, I'm running 2019.4.

0 Kudos
5 Replies
Highlighted
MVP
MVP

Re: Need help with the SDK

What language would you like to use?

0 Kudos
Highlighted
Level 14

Re: Need help with the SDK

Powershell

0 Kudos
Highlighted
Level 12

Re: Need help with the SDK

Just to be clear.  You only need the SDK to create the groups for NEW cities.  You can already populate the groups dynamically without the API.

 

If you are not adding and deleting cities often, then maybe look at “Add Dynamic Query” on the same screen as you would manually add each node to the group.

 

I just want to make this point, because delving into the API for a non-programmer is not a small task, even with examples.  The powershell API is not what I would call "powershelly"  It's more forcing powershell to use SQL/REST/CRUD which can be awkward and confusing.

0 Kudos
Highlighted
Level 14

Re: Need help with the SDK

My goal is to perform an INITIAL creation of a list of City groups with dynamic queries. After that, one might add a new City here and there, but the goal is to abbreviate the "onboarding" process so as to get all existing nodes assigned to a City groups without having to create them one by one in the web GUI.

0 Kudos
Highlighted
MVP
MVP

Re: Need help with the SDK

Yeah @brscott is spot-on when he says it's not your typical PowerShell suite of cmdlets. If you've worked with VMware's PowerCLI (a cmdlet for everything) then the 5 cmdlet SDK is going to feel a bit anemic. @micheal100 has done some very cool work on a thing called PowerOrion that's meant to bridge the gap.

That being said, what you're looking to do is at least well-traveled road. There's an example on the SolarWinds GitHub repository that does very nearly what you're looking to do.

https://github.com/solarwinds/OrionSDK/blob/master/Samples/PowerShell/Groups.ps1#L16-L87 (focus on the highlighted bits to connect to the API and then create the group)

If you're feeling froggy after 7pm PST on a weekday and want to do some pair programming we could write something specific and contribute it back to the SolarWinds samples.

0 Kudos