Data Publisher Samples

This section describe how to configure data publishers to send events to BAM and where you can view the statistics collected in BAM dashboard. Step by step howto's can be found in samples bundled with the distribution.

Getting Started with Monitoring

A similar workflow has to followed for monitoring with all the publishers as described below.

  1. Installing the respective publisher to the server to be monitored. For information on data publishers available and installation instructions for each publisher see the section on data publishers.
  2. Configuring publisher parameters in publisher UI. This section describes configurations available to each publisher in order to tune event publishing.
  3. Adding the server to be monitored at BAM side in correct monitoring mode so that BAM will get subscribed to recieve events published by the publisher. For documentation on adding monitored servers according to the monitoring requirement see the section on monitored servers.
  4. Letting the statistics to be collected by BAM by sending requests to the monitored server.
  5. Observing the statistics collected by BAM in dashboard. This section documents where corresponding statistics can be observed for each publisher.

Service Statistics Data publisher

Publisher Configuration

Configuration UI for this publisher can be reached via "Configure --> Service Data Publishing" in management console left menu. There is only one configuration available with respect to this publisher. It is possible to configure the system wide request threshold after which the publisher would fire an event to BAM. Unchecking "Enable Eventing" checkbox will stop event publishing to BAM in case it is required to stop monitoring the server.

Publisher Configuration Window

Observing Statistics

Statistics visualizations relating to data published by this publisher are present under the "Server Data" and "Server Level Service Data" tabs in dashboard. Drill down view of hit counts and response times is also available under "Main" --> "Service Data" of management console left menu.

Mediation Statistics Data publisher

Publisher Configuration

Configuration UI for this publisher can be reached via "Configure --> Mediation Data" Publishing in management console left menu. There are three configurations available with respect to this publisher. Sequence, proxy and endpoint level thresholds can be defined using these configurations. Unchecking "Enable Eventing" checkbox will stop event publishing to BAM in case it is required to stop monitoring the server.

Publisher Configuration Window

In order to for the publisher to obtain statistics data from ESB, statistics should be enabled in the respective sequence, endpoint or proxy. This can be done clicking "enable statistics" option in respective sequence, endpoint or proxy configuration page. For a sequence it can be done in sequence list down page as shown below.

Enabling Statistics For Sequence

Observing Statistics

Statistics visualizations relating to data published by this publisher are present under the "Mediation Data", "Endpoint Data", "Sequence Data" and "Proxy Data" tabs in dashboard. Drill down view of hit counts and response times is also available under "Main" --> "Mediation Data" of management console left menu.

Activity Publishers

Publisher configurations and data visualizations are mostly similar for Activity Mediation and Activity Service Data Publishers. So information in following sections are relevant to both publishers.

Publisher Configuration

Configuration UI for this publisher can be reached under "Configure --> Activity Publishing" menu item in management console left menu.

Publisher Configuration Window

XPath configurations required for "Message Lookup" option can be added in "Configure --> Activity Publishing --> XPath Configuration" page.

XPath Configuration Window

Click "Add New XPath Definition" link to add a XPath configuration value.

Add XPath Configuration Window

Provide the XPath configuration along with required namespaces if necessary. Put a unique memorable value to "Name" field since the XPath configuration is identified with this name for message filtering at BAM side.

List XPath Configurations Window

Added XPath configuration can be updated at a later time using "update" link at XPath list down table. Note these XPath configurations will take effect only if "Message Lookup" option is enabled at "Activity Publishing" page. With these configurations in place we are ready to monitor messages flowing through the server, if Activity Service Publisher is being used. But in case of Activity Mediation Publisher one additional step is required in order for the message capture to be successful.

Activity Mediation Publisher contains a class mediator which can be injected in to mediator sequence in the ESB so that messages can be monitored at different locations inside the mediator flow. Insert following configuration to each of the points where it's required to trace the message in the sequence.

		<class name="org.wso2.carbon.bam.data.publisher.activity.mediation.MessageActivityMediator" >
	

Observing Statistics

Statistics relating to data published by activity publishers are present under the "Activity Data" tab. The gadget "Activity Details" can be used to filter and view details of messages of interest by using several filter criteria.

Activity Details Gadget

Messages can be filtered using timestamp and values for XPaths specified at monitored server side as discussed in the "Publisher Configuration" section above.

Activity Details Gadget Configuration

Filtered messages are displayed now as shown below.

Activity Details Gadget Data