About Ad Hoc Alert Sources
You can raise ad hoc alerts with the System_Alert_Send Process Definition or with a custom script using RedwoodScript. You can put the Process Definition or RedwoodScript code into a Chain Definition in order to implement customized alerting. The System_Alert_Send Process Definition takes two parameters:
- The name of the ad hoc alert source.
- An optional Data parameter that can be used to determine the escalation to use. You can use this as a substitution parameter in alert source expressions and the alert source email body.
Simple Ad Hoc Alert Source
Assume you have a Chain Definition that loads some data into a data warehouse. When the load is complete, you want to trigger an escalation named DataWarehouseLoaded
. To accomplish this, you could do the following:
-
Create an ad hoc alert source where Default Alert Escalation is
DataWarehouseLoaded
. -
In the Chain Definition, add a Step after the data is loaded, and have that Step raise the ad hoc alert using the System_Alert_Send Process Definition.
Complex Ad Hoc Alert Source
Assume you have a Chain Definition that loads some data into a data warehouse. When the load is complete, you want to trigger one of several different escalations, depending on what kind of data was loaded. For example, if you the data is from the EMEA region, you want to use the Data_Mart_EMEA
escalation, but otherwise you want to use the Data_Mart_Default
escalation. To accomplish this, you could do the following:
-
Create the
Data_Mart_EMEA
andData_Mart_Default
escalations. -
In the Step that loads the data, create a string output parameter that is set to "EMEA" for EMEA data or "Default" for other data.
-
In the Chain Editor, map the output parameter to the Data parameter on the System_Alert_Send Chain Process.
-
In the ad hoc alert source, instead of specifying a Default Alert Escalation, specify an Escalation Expression that incorporates the Data parameter, like so:
DataMart_${Data}
When the System_Alert_Send Process Definition is run, the escalation run depends on the value of the Data parameter:
- If the data is
EMEA
, the escalation DataMart_EMEA runs. - Otherwise, the escalation DataMart_Default runs.