I am looking for API in solarwinds . So that I can create SAM template and change threshold in component. Please help me in that. If not possible via orionsdk please confirm me as well.
Hi there,
Based on what you've typed, it doesn't make a lot of sense to have to create templates via the API, as the API is generally used for bulk changes and a template should only need to be created once for each application. Can you explain a little more about what you are trying to accomplish with this?
Now, for the changing of the component thresholds, this is a good use for the API. Using PowerShell, you can use the generic "Get-SWISObject" and Set-SWISObject" cmdlets to change these values, or you could even use a bulk SQL query to do this too.
Kind regards,
Marlie Fancourt | SolarWinds Pre-Sales Manager
Prosperon Networks | SolarWinds Partner since 2006
If this helps answer your question please mark my answer as confirmed to help other users, thank you!
I've written code to do this in the past. Since those tables are not directly able to be edited you have to edit them in SQL. As an admin you can shoot SQL commands in through the SDK/API through a verb under the Orion.Reporting, ExecuteSQL
As to the use case around creating and editing templates and app instances via API, the thing I ran into was that I would have cases where and application might have a variable number of "something" in it. I would build a template with a script based component that identifies the names and number of that "thing" running on the server and an example of the components i needed to monitor one of those things. Then I had a recurring job on my server to compare the list of things from the script component against the list of components in the assigned instance of the profile and as necessary it would create clones of the component and tweak their parameters to match what I needed. In some cases the thresholds would not be consistent, such as times when you are measuring a counter that doesn't return a percent so you have to do thresholds on static numbers.
It was kind of a DIY solution to the same problem that the Appinsight templates solve in their domains. I don't know how many websites are on an IIS server ahead of time, but once I apply the template it knows how to find out and then creates a standard set of components for each site it finds.
Hi,
Thank you for confirming.
For changing threshold in existing template can you please suggest me the database table name?
The table is Orion.APM.ComponentAlertThresholds
Thankyou for sharing details. But in that table popup is showing like CanUpdate: False. It means we can't update value in this table. Can you please check.