BAM Mediation Data Agent is used to collect statistics related to mediation data from WSO2 ESB and send to WSO2 BAM. The BAM server receives data events via its Thrift API. This is a binary protocol that enables fast data transmission between the ESB and BAM. It is possible to configure BAM Mediation Data Agent early so that you can predefine the statistics to be extracted from mediation data of ESB. In the configuration panel, specify the BAM server (Thrift server) related information and properties to be extracted from the Configuration Context of ESB. Also specify the Event Stream related parameters uniquely identified by a name and a version.
...
- Download WSO2 ESB from http://wso2.com/products/enterprise-service-bus.
When running both ESB and BAM servers concurrently, you must change the port of one server in order to prevent port conflicts. This is done by applying an offset in file <ESB_HOME>/repository/conf/carbon.xml. Change the value in xpath Server/Ports/Offset from 0 to some other integer. For example,
Code Block language html/xml <!-- Ports offset. This entry will set the value of the ports defined below to the define value + Offset. e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445 --> <Offset>2</Offset>
- Start the ESB server by executing the following commands from <ESB_HOME>/bin.
- on Linux wso2server.sh
- on MS Windows wso2server.bat
- After starting the server, log in to ESB's management console (
https://localhost:9443+offset/carbon
) - In the management console, go to Configure > Features menu.
In the Repository Management tab, select and add a P2 repository either from a URL or a file. For instructions, see Managing the Feature Repository.
Info WSO2 features are available in Equinox P2 repository at http://dist.wso2.org/p2/carbon/releases. Repositories are listed there by WSO2 Carbon platform versions.
- After adding the repository, go to Available Features tab. From the repository drop-down list, select the one you added above. The, click Find Features.
- From the list of features that appears, select
BAM Mediation Data Agent Aggregate
feature and Install. - After the installation is done, restart the ESB server.
...
- Enable statistics in
<ESB_HOME>/repository/conf/carbon.xml
file as follows:<StatisticsReporterDisabled>false</StatisticsReporterDisabled>
- Log in to the ESB management console and select Mediation Data Publishing in the Configure menu.
- The Mediation Data Publisher Configuration window opens. Fill in the field. By default the Stream name must be bam_mediation_stats_data_publisher. For example,
The fields of the above page are described below:Enable Mediation Stats: Select this option to enable the agent.
Stream Definition Configuration:
- Stream Name : Any string value with alpha-numeric characters.
- Version : Stream version distinguishes different streams with the same stream name. Default version is 1.0.0.
- Nick Name : This is a user-preferred nick name to the stream name in alpha-numeric characters. Useful when stream name is lengthy and you want to keep a shorter alias for convenience.
- Description : A description about the stream identified by Stream Name, Stream Version pair. Description should also consist of alpha-numeric characters.
BAM Credentials:
- BAM URL : IP address of the BAM server. Port must be the thrift port (e.g., tcp://127.0.0.1:7611). Add a comma-separated list of server URLs here to ensure that the load is distributed among many servers. It minimizes effects of a failure of one node.
- Username and Password: BAM Thrift login user name and password. Default values are admin/admin.
Properties: BAM receives events from different data agents. You can associate a property to uniquely identify the events triggering from one agent. This feature is particularly useful in a clustered environment.
...
BAM mediation statistics metrics are similar to the metrics used by General ESB mediation statistics component. Mediation statistics are widely used monitoring features . From where functional components of the ESB, sequences, proxy services and endpoints , directly get involved in processing messages. The BAM Mediation Statistics feature enables a server administrator/Tenant tenant administrator to collect runtime statistical information statistics on these three types of functional components and view them through via an interactive BAM Dashboard. This feature provides a simple but effective way of determining to determine the runtime performance of the ESB. The collected statistical data can be used to analyze network traffic patterns and draw rough estimates on how the service bus will be used in the future. Perhaps One of the most enticing attribute attributes of the mediation statistics feature is that it can be configured in a fine-grained manner. In other words, it allows a user to collect data on only a specified set of sequences, proxy services and endpoints.
All statistics information collected by the mediation component is aggregated for time duration and published to BAM as an event. That meansis, mediation statistics events are not sent for every request. Rather, rather it the server aggregates request measures for some a period of time and sends a an event for to BAM. You can find For more detailed information form about on the measures of mediation statistics in , see this OT articlearticle in WSO2 library: http://wso2.com/library/articles/2010/06/wso2-esb-mediation-statistics-can-numbers-tell-about-your-soa.