Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

Is there any way to change the TriggeredMessage of an Alert using the SDK?

$
0
0

I am trying to modify the text of an alert after firing in order to make it more useful. I have a trap and I want to pass it along to an external script in order to extract a substring from it, so far so good. What I can't seem to find is how can I update the TriggeredMessage field in the database after I've extracted the substring. I tried swis.query('UPDATE... (I am using python) but (un)fortunately it does input validation and doesn't let me abuse it like this.

 

Is there any other way to do it? From what I can tell swiss.update only works if you have an uri and I cannot find one for the AlertActive tabel.

 

LE: Found the uri, but it doesn't let me change TriggeredMessage. Here is the error:

raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 403 Client Error: Operation not supported on Orion.AlertActive for url: https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://SolarWinds-NPM./Orion/Orion.AlertActive/AlertActiveID=221,AlertObjectID=89

 

and the code:

swis.update(Uri, TriggeredMessage='Am reusit!')


Viewing all articles
Browse latest Browse all 2677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>