pp108 : Alerts

Alerts

This topic introduces the concept of Alerts.

Alerts are designed to inform the administrator or the administration application about the major events in the application. Alerts in Process Platform are exposed as JMX notifications, which can be monitored from any JMX management tool. In addition, these alerts are published through Log4J so that they can be forwarded as SMS or E-mail message through appenders.

Defining an alert

An alert can be defined for a Managed Component in an application through defineAlert Web service operation. This Web service operation returns an IAlertDefinition instance that the application must retain. While defining an alert, the level of the alert should be specified. The following are the three levels of alerts:

  • ERROR - An alert of this level must be issued when a fatal error occurs.
  • WARNING - An alert of this level must be issued as a signal to a potentially upcoming error alert.
  • INFORMATIONAL - An alert of this level must be issued when a major informational event occurs (starting or stopping a Service) and when an error or warning condition is cleared.
    The following example illustrates different types of alerts:
 // Defining an alert IAlertDefinition m_indexCorruptAlert = managedComponent.defineAlert(AlertLevel.ERROR, CoBOCMessages.INDEX_CORRUPT_ALERT_MESSAGE, CoBOCMessages.INDEX_CORRUPT_ALERT_DESCRIPTION); 

Issuing a Process Platform alert

issueAlert Web Service Operation should be called to issue an alert. When an alert is issued:

  • Depending upon the consumers, the alert will be delegated to the alert system for further processing.
  • A JMX notification is issued.
 try { ... ... } catch (IndexCorruptException ex) { // Issue an alert m_indexCorruptAlert.issueAlert(ex, indexName); }