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.

Orion.ActiveAlerts - can I get the "Trigger Action" to run for all Active Alerts?

Can someone use the SDK (PowerShell hopefully) to have Orion execute the "Trigger Action" for all Orion.Active Alerts?

Use Case:

NPM is successfully sending Alerts to centralized Alert system.  In Advanced Alert manager the "Trigger Action" is configured and working just fine.  Trigger Action is to run an external program.   This is all working fine.  But when the centralize alert system is restarted / rebooted, Alerts are deleted and all tools that send Alerts are triggered to resend all active alerts.   How can NPM do the same thing?

to restate the use case:

- centralized Alert System is restarted/ rebooted

- during restart sequence, the Active Alerts from NPM are all deleted in the centralized alert management system

- need to have NPM resend all Active Alerts to repopulate central alerting system

  • There is no API for re-firing the trigger actions on alerts, so you will have to build this repopulation capability externally. Here's how I would do it:

    1. Modify the existing trigger action that sends the alerts to the central system so that it records its command line in a simple table where the key is the alert identifier (definitionId, objectType, objectId) and the value is the command line for the external program.

    2. Add a reset action that removes the table row created in #1.

    3. When the centralized system clears itself and needs to be repopulated, you can use this table to rerun these trigger actions for the currently-active alerts.

  • I would prefer to poll the internal sql table for active alerts... and then automate the refresh based on that.   would that work?

  • Possibly. I depends what details need to be passed to the other system. If Orion.ActiveAlerts has everything you need, then you can poll it and repopulate the other system based on that. But if you need other information (for example, information that is available in macros you use to build the command line for your tool), then that state will need to be saved somewhere else.