About Process Server Alert Sources
Process Server alert sources raise alerts when Process Servers change status. They determine when to raise alerts based on two criteria:
- A pattern matching the name of the Process Server or process.
- The new status of the Process Server or process.
Alerts are raised only if both the Name and Statuses criteria match. Glob matching is used.
Operator Message and Reply Expressions
The Operator Message Expression field allows substitution parameters. The message can be specified at the alert source level, and overridden per status. If no message is specified at any level, the default message is Acknowledge.
The reply expression works the same way as the reply expression for the System_OperatorMessage Process Definition. This can be specified at the alert source level, and overridden per status. If no reply expression is specified, the default reply expression is Acknowledge.
Process Server Escalation Example
You can define different escalation paths depending on the new status of a Process Server. For example, assume you have defined the following alert escalations:
-
PS_PRD_Connecting
-
PS_PRD_Alert
You can set up a Process Server alert source with the following values:
- Name Pattern:
PS_PRD*
- Escalation Expression:
PS_PRD_${newStatus}
- Default Alert Escalation:
PS_PRD_Alert
(This will be ignored because you have specified an Escalation Expression.) - Statuses to alert on: Connecting, Unknown, Shutdown
Now, if a Process Server that matches the Name Pattern (for example, PS_PRD_EMEA_DB2) changes to one of the following statuses:
New Status | Escalation Triggered | Notes |
---|---|---|
Connecting |
PS_PRD_Connecting | The Escalation Expression will try to match on PS_PRD_Connecting and succeed. |
Unknown | PS_PRD_Alert | The Escalation Expression will try to match on PS_PRD_Unknown and fail, so it will fall back to the Default Alert Escalation. |
Running | None | No escalation will be triggered, because this is not one of the statuses used by the Process Server alert source. |
Example Action Script
Assume the Process Server named PR3_ProcessServer is undergoing maintenance. The following Post Alert script tells this Process Server alert source to automatically acknowledge alerts on PR3_ProcessServer for now.
{
// Get the alert information
Alert alert = jcsAlertSourcePostAlertContext.getAlert();
OperatorMessage oMessage = alert.getOperatorMessage();
SchedulerEntity sEntity = oMessage.getSenderObject();
//Check if the Process Server is PR3
if ("Process Server PR3_ProcessServer".equals(sEntity.getErrorNameEN()))
{
//Optional log entry
jcsOutLog.info(sEntity.getErrorNameEN()+ " was shut down, ignoring alert.");
//Reply to Operator Message
oMessage.setReply("Acknowledge");
//Set status of alert to acknowledged
alert.setStatus(AlertStatus.Acknowledged);
}
}
Note: The above script uses getErrorNameEN()
to retrieve the name of the Process Server because the method is available on SchedulerEntity
. However, since it is mainly used for error messages, it has an object type prefix, which we have to take that into consideration when we compare the strings. You could also look up the business key of the Process Server and retrieve the name from the ProcessServer class.