Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20403

Retrieve trigger action variables

$
0
0

We have an app that integrates with SW NPM and SAM and pulls in alerts and events via SWIS. We are trying to add a feature to it where we automatically retrieve any Orion variables used in alert trigger definitions. So for example if the Orion alert will log a message of Alert: ${NodeName} rebooted at ${LastBoot} then in our app we want to see two data values, nodename and lastboot, both containing their relevant value.

 

We think we can simply read the alert templates and parse out the variables with a simple regex to get anything that looks like ${}. Once we have this list of variables we can attempt to get the values from SW. The issue is how to get these values.. they seem to be properties that can be found in many different tables since some apply to a node, others to an interface etc. This would be too complex to do this way as we'd have to cater for every variable manually, and there are many. Perhaps there is an alternate way to get these values? Some query or API call that accepts the template and the alert or event and returns the computed variables?


Viewing all articles
Browse latest Browse all 20403

Trending Articles



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