Adding multiple URL monitors via API

Hello Thwackers,

I have approx. 300 URLs that I need to monitor using SolarWinds, and don't really want to type them all in manually.

Using SWQL, the schema seems to involve up to 6 tables to support this function. They include Application, Templates and Components.

I have a good idea of how they all fit together, but I feel like I would be hacking these in at a low level. I can only make assumptions about table relationships by column names. Furthermore, some columns have GUIDs and I don't know how these are generated. I don't really want to experiment with the live database and we currently don't have a test environment.

My question is either, how to add URL monitors automatically or is there a document in existence that describes the realtionships required to create certain objects?

I have no problem using the API, I have successfully added many ICMP only nodes using PowerShell.

Any help greatly appreciated!



  • If you get this figured out and after a few months, I'd like to know your experience with so many URLs.

    We tend to get so many false alerts with SAM http/s monitoring that its causing lots of grief.

  • I have managed to simplify the problem a bit. All I need is the ability to add more HTTP monitors to a template as seen in the screenshot below.

    I guess I just have to insert into the Orion.APM.Component table, the columns are below the screenshot.

    Can I just make up DetailsUrl? What table does ComponentEvidenceType join to?

    I don't feel confident adding a component without knowing the full extent of the relationships required.

    Does that information exist anywhere?






  • This is something that actually just came up yesterday as a question from a couple of my teams. While I have a monitor right now hitting a generic URL on each web server to just tell me if Tomcat is serving up that page or not, and a specific string returned on the page - if I could be specific with the URL I would then be monitoring the same URL the customer is. That way, in theory, if my monitor triggers then the customer should have the same experience with logging in issues.

  • If you are going to hack things up I absolutely wouldn't be doing it there in the api (I believe it won't even let you create objects on the tables you are looking at anyway). I've done what you are describing by hitting the SQL database directly because a LOT of whats in the API are derived values that the application will generate on it's own once the correct things exist in the database.  The simplest way to do this without making too much work for yourself and also with the least risk of screwing things up would be to use the GUI to create a template with enough blank url monitors (also having 300 components in one template tends to get iffy, makes it hard for many of the relevant pages to load and such so you may end up wanting to break them up across maybe 60 templates of 50 each).  Then you can set all the values you need programmatically by inserting the necessary fields into apm_componentsettings.  If there is something on componentsettings for an app monitor then that over rides the equivalent values on apm_componenttemplatesettings.

    I used a method like this to create and define over 10,000 JMX monitors for a client last year as part of us migrating him off his old monitoring tool and into Solarwinds.  Took a few days of poking around to get it working how I liked but in the end it probably saved us a month of clicking in the GUI settings the ports and paths for all of them.

  • If you already have the monitors in place it's pretty simple to override the URL away from http://{$ip} or whatever you are using to just hardcoding in the exact url you want to test.  If you don't want to muck around in the GUI you are going to have to do it in SQL as there is not yet any verb for the API to handle all this stuff.

  • Thanks mesverrum, I like this idea. Adding blanks will surely be faster than typing out fully configured monitors

  • This is now possible via the API. Check out Dan's answer to my questions at the bottom of this thread.