I'm trying to write a standard automation script that sends an email from a correlation rules or from a hyperlink. I provide the RootKey and the AlarmID as parameters. What is the best way to read the alarm information for the email into the automation script, such as RootTime, Severity, Element Name, Parameter, Value, etc?
As this question has now been inactive for a very long time, I will close it. If you still want more information about this, could you post a new question?
Hi Gerrit,
If you trigger the script from a correlation rule you could use How do I parse Correlation Alarm Info data.
If you trigger the script from a hyperlink, you could use these keywords to pass information to the automation script.
Hope it helps.
The information from a Correlation trigger is different from a Hyperlink. For example, with an Severity, with the correlation rule we get an severityID (int) and with the hyperlink a severity as (string).
My idea was to query the data using the AlarmID to create a universal script that can always be used regardless of the source.
Hi Gerrit,
Apologies for the delay in my answer.
Indeed, ‘correlation alarm info data’ and ‘keywords’ from hyperlinks use different structure to reference alarms. I believe that will not be changed.
In your case, a possible solution is to add an extra script parameter in your script that can be used to define if the script was executed from a correlation rule or hyperlink. For example, when triggering the automation script from an hyperlink, you can set this new script param to ‘hyperlink’. You can use this information to process the alarm accordingly.
Hope it helps.
I see that this question has been inactive for some time. Do you still need help with this? If not, could you select the answer (using the ✓ icon) to indicate that the question is resolved?