Index Changes
ESB Console Home

General Information about Alerting

Introduction

If you are currently using Java CAPS 6, you can use all user-defined alerting capabilities as you are used to like in previous versions of Java CAPS. The NetBeans IDE already provides facilities that the user can leverage to send out user-defined alerts from his Java collaboration projects, or BPEL processes, etc. These alerts can be viewed from the Java CAPS Enterprise Manager, and also filtered and routed through multiple channels (JMS, SMTP, SNMP, etc.) by setting these channels and filters up from the Java CAPS Alert and SNMP Agent configurations through the standard Web interface.

Moreover, if you are a Java CAPS 6 customer, there are samples available that come with the Java CAPS 6 product that show you how to write your own client using not only Java, but also using any one of 26 different (at the time of this writing) JSR 223 scripting languages like Groovy, JRuby, PHP, etc.

If you are NOT a Java CAPS 6 customer, you can still use alerting capabilities available in the platform. You will however, not have pre-built Alert clients like the Java CAPS Enterprise Manager, or the routing capabilities of the Java CAPS Alert Agent, or the Java CAPS SNMP Agent. But you can still retrieve the alerts from the system using the Common Management and Monitoring API. Once you retrieve alerts from the system, you can store it wherever you like if you so choose to and deal with the alerts appropriately as you deem fit.

Java CAPS Alert Agent and Java CAPS SNMP Agent documentation

  • All documentation is available on the net on docs.sun.com.
  • There is no change in Java CAPS 6.x as far as Alert and SNMP Agents go.
  • You can see the documentation for the JavaCAPS Alert and SNMP Agents from here http://docs.sun.com/app/docs/coll/1607.3?l=en.

Alerting across product lines (Java CAPS, Open ESB, Glassfish ESB, Fuji)

Usage

The attached screen-shots from the Java CAPS 6 NetBeans IDE show how to generate a custom alert from a Java EE composite application. You can also do the same from your BPEL processes too.

Design-Time Steps

  • In the IDE, create an EJB Module project.
  • Add a web service or session bean to the project.
  • Add an operation.
  • Go to the Source view.
  • In the Palette window, click the Alerter icon and drag it into the operation method.
  • A dialog box prompts you to specify details about the alert.
  • Select the approriate type: Info, Warning, Minor, Major, Critical, Fatal, or Custom.
  • In the Alert Message field, enter the message string.
  • If you selected the Custom type, then you must also specify the alert code name and the severity.
  • Click OK. The alerter code is added.
public class NewWebService {
    private Alerter alerter = AlerterFactory.getAlerter();

    /**
    * Web service operation
    */
    @WebMethod(operationName = "operation")
    public String operation() {
        alerter.warning("test warning", "EJBModule1");
        //TODO write your implementation code here:
        return null;
    }
....
....
}
  • Finish and deploy the application.

Runtime Steps

Some Frequently Asked Questions

1. I notice that some alerts generated do not have an associated alert/message code. So how do you setup a corresponding notification rule in the Java CAPS Alert Agent?

If the alert/message code is not set, then there is only one option available - select ALL Types for alert code.

2. I notice that some alerts generated do not have either project, or deployment, or component names set to construct a valid path. So how do you setup a corresponding notification rule in the Java CAPS Alert Agent?

The source path can be very coarse-grained - just select the host:port e.g.,
e51x|Server|<host>:<port> 
You get ALL alerts from the matching the host:port.

Also note that the source path can also be very fine-grained where you can select down to the component (provided the Project, Deployment and component names are set), for e.g.,

 
e51x|Servers|<hostname>:<port>|Project1|Deployment1|CMap1|Service1 

3. Can you create custom alerts with the BPEL Alerter?

No the BPEL alerter allows you to only create alerts of severity type: critical, major, minor, warning, and info. Only the EJB alerter allows you to create custom alerts in addition to the others. For more about the BPEL alerter, see http://wiki.open-esb.java.net/Wiki.jsp?page=BPELProcessLoggingAndAlerting

4. Do you know which docs explain the parameters of alerter.custom(arg0, arg1, arg2, arg3)?

  • The corresponding parameters are:
    alerter.custom(messageCode, severity, message, deploymentName);

URLs of interest

Java CAPS Enterprise Manager and Monitoring Alerts

Java CAPS Common Management and Monitoring API JavaDocs

The Extended Java CAPS Management and Monitoring API JavaDocs

Also see

Alerting Architecture

Alert Configuration Service Details

Alert Notification Service Details

Refactoring the Alerting Service

General Information about Alerting

How do I use the Alert Reception API

How do I use the Alert Sender API

How do I use the Alert Framework Configuration Service API

How do I use the Alert Management API

Also Note

  • Java CAPS (the superset of Glassfish ESB) has a Java CAPS SNMP Agent which lets you send alerts as SNMP traps
  • Java CAPS (the superset of Glassfish ESB) has a component called the Java CAPS Enterprise Manager which - among other things - lets you see alert messages.
  • Both the Java CAPS SNMP Agent, and the Java CAPS Enterprise Manager are not part of OpenESB/Glassfish ESB
  • Glassfish Enterprise Server (the Application Server used by Glassfish ESB) has the ability to generate SNMP traps for some messages produced by Glassfish - i.e., not alerts generated by Glassfish ESB components.
  • Glassfish Enterprise Server (the Application Server used by Glassfish ESB) has a component called the Glassfish Enterprise Manager which lets you do some Performance Analysis and other nice things.
  • The Glassfish Enterprise Manager and its SNMP trap generator are only available for Glassfish Enterprise Server. i.e., paying customers using Glassfish ESB or Glassfish.
  • The Glassfish Enterprise Manager is totally different to the Java CAPS Enterprise Manager. It is a pity that they have such similar names.
  • The SNMP and Alert infrastructure of Glassfish Enterprise Server and Glassfish ESB are different things. Please dont confuse them.
  • If you want to know more about Glassfish Enterprise Manager, the documentation is at http://docs.sun.com/app/docs/coll/1343.6. See Performance Advisor and SNMP.


Back to to How Tos


Number of visits: 22

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-44) was last changed on 11-Nov-09 11:15 AM, -0800 by Gopalan Suresh Raj