Publishing ESB Data to the Analytics Profile
The following sections describe the prerequisites for publishing statistics from the ESB profile of WSO2 EI to the Analytics profile.
Enabling statistics/message tracing
Follow the instructions give below to enable statistics monitoring and message tracing. You can use message tracing to track a message (including the message payload) throughout a mediation flow.
Note that it is not recommended to enable tracing in production environments as it generates a large number of events that reduces the performance of the analytics profile. Therefore, tracing should only be enabled in development environments.
Step 1: Enabling statistics/message tracing for the ESB profile
Open the synapse.properties
file (stored in the <EI_HOME>/conf/
directory) and configure the properties given below.
Property | Description |
---|---|
mediation.flow.statistics.enable | Set this property to
|
mediation.flow.statistics.tracer.collect.payloads | Set this property to |
| Set this property to
Note that message tracing is not recommended for production environments. |
mediation.flow.statistics.collect.all | Set this property to If you set this property to |
Step 2: Enabling statistics/message tracing for ESB artifacts
If you have enabled the mediation.flow.statistics.collect.all
property in the synapse.properties
file as explained in the previous section, you will be monitoring the statistics of all the ESB artifacts (proxy services, REST APIs, sequences, and endpoints) by default. Alternatively, you have the option of enabling statistics for only the required artifacts. You can use WSO2 EI Tooling or the management console for this purpose.
In a clustered deployment, statistics should be enabled for the required artifacts in all the EI nodes if you have not enabled deployment synchronizing. If deployment synchronising is enabled, you need to enable statistics for the required artifacts only in one node.
Using WSO2 EI Tooling
Follow the steps given below.
- Go to WSO2 EI Tooling, and select the Properties tab of the required artifact.
- Set the value of the Trace Enabled and Statistics Enabled options to true as shown below. Note that message tracing is not recommended for production environments.
Using the management console
Follow the steps given below.
- Start the ESB profile of WSO2 EI and log in to the management console.
- Click Enable Statistics and Enable Tracing links. Note that message tracing is not recommended for production environments.
Click OK in the information message that appears to confirm that statistics/tracing is enabled.EI Artifact Type Path Proxy Service Main tab => Services => List => Deployed Services page => <Proxy_Service_Name> REST API Main tab => APIs => Deployed APIs page Sequence Main tab => Sequences => Mediation Sequences page Endpoint Main tab => Endpoints => Manage Endpoints page Inbound Endpoint Main tab => Inbound Endpoints => Manage Inbound Endpoints page See the following examples:
Configuring the ESB to publish data to the Analytics profile
The required configuration details described below are available by default. Follow this section to understand the Analytics related configurations used in the process, and do any modifications if required. In a clustered deployment, the following configurations should be checked for each Enterprise Integrator node in the cluster.
This step involves providing the information required by the ESB profile to publish data to WSO2 EI Analytics in order to analyze the data via the Analytics Dashboard. An event publisher is configured with the URL to which ESB-related information are published as events.
Follow the procedure below to configure EI Analytics.
Open the
<EI_HOME>/repository/deployment/server/eventpublishers/MessageFlowConfigurationPublisher.xml
file, and enter relevant configurations as described in the table below. This file is used to enter the information required to publish ESB data to the WSO2 EI Analytics server.Property Required Value Example username
The username to be used when accessing the WSO2 EI Analytics server to publish configurations. admin
password
The password to be used when accessing the WSO2 EI Analytics server to publish configurations. admin
receiverURL
The URL of the thrift port to which the EI configurations should be published. The format of the URL is as follows. tcp://<localhost>:<THRIFT_PORT>
tcp://localhost:7612
Open the
<EI_HOME>/repository/deployment/server/eventpublishers/MessageFlowStatisticsPublisher.xml
file, and do the configurations and specified in the table below.Property Required Value Example username
The username to be used when accessing the WSO2 EI Analytics server to publish statistics. admin
password
The password to be used when accessing the WSO2 EI Analytics server to publish statistics. admin
receiverURL
The URL of the thrift port to which the EI statistics should be published. The format of the URL is as follows. tcp://<localhost>:<THRIFT_PORT>
tcp://localhost:7612