This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

How to create and edit alert trigger conditions in API ?

I am looking to automate deployment and configuration of Solarwinds NPM. Part of that involves configuring alert trigger conditions and actions, does the Solarwinds API provide a way to work with the xml strings stored in the database? If not, is there any documentation on what the XML must look like for these fields ?

  • Completely undocumented, I've learned to make one-off adjustments when I didn't want to do repetitive work in the GUI, but its murky in there.  Your best bet is just to create an example of the alert you want then export it and pick apart the XML.

    You can definitely use the API to export alerts and import them, and I believe you can use update statements to replace the xml in the trigger and reset conditions, but I've not made those kind of updates directly with it before.  The command would probably look something like this, based on the powershell examples in the github:

    Set-SwisObject -SwisConnection $swis -Uri $alert.uri -properties @{Trigger= $alert.triggerxml} 

  • I have the similar request. I need to create multiple alerts with little differences, so It will be cool to make several xml's and just import them instead of gui-clicking. But XML must contain AlertID and AlertRefID. How to generate them?