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.
A similar workflow has to followed for monitoring with all the publishers as described below.
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.
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.
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.
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.
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.
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.
Configuration UI for this publisher can be reached under "Configure --> Activity Publishing" menu item in management console left menu.
XPath configurations required for "Message Lookup" option can be added in "Configure --> Activity Publishing --> XPath Configuration" page.
Click "Add New XPath Definition" link to add a XPath configuration value.
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.
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" >
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.
Messages can be filtered using timestamp and values for XPaths specified at monitored server side as discussed in the "Publisher Configuration" section above.
Filtered messages are displayed now as shown below.