This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Prerequisites to Publish Statistics
The following sections describe the prerequisites to publish statistics related to the processing in WSO2 EI to WSO2 EI Analytics.
Running WSO2 EI Analytics
For instructions on how to run WSO2 EI Analytics, see Starting EI Analytics.
Note
WSO2 EI should run simultaneously with the WSO2 EI Analytics. For instructions on how to run WSO2 EI, see Running the Product.
Configuring datasources
The datasources of WSO2 EI Analytics are by default configured with the H2 database type. If you configure them with the MSSQL database type, add the SendStringParametersAsUnicode
property to the database connection URL in the data source configuration in the <EI_HOME>/wso2/analytics/conf/datasources/analytics-datasources.xml
file as shown below to avoid deadlock issues that are caused when the same table row is updated in two or more sessions at the same time.
<url>SQLSERVER_JDBC_URL;SendStringParametersAsUnicode=false</url>
Enabling tracing/statistics for the mediation flow
Enable mediation statistics and message tracing by configuring the <EI_HOME>/conf/synapse.properties
file as described below.
In a clustered deployment, the following configurations should be done for each node in the EI cluster.
Property | Required Value | Purpose |
---|---|---|
mediation.flow.statistics.enable | true | Set this property to
|
mediation.flow.statistics.tracer.collect.payloads | true | Set this property to |
| true | Set this property to
|
mediation.flow.statistics.collect.all | true/false | Set this property to If you set this property to |
Configuring WSO2 EI Analytics
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 WSO2 EI 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 WSO2 EI 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 WSO2 EI 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
Change the
hostname
to the actual hostname in the<EI_HOME>/wso2/analytics/repository/deployment/server/jaggeryapps/portal/configs/designer.json
file as follows.This step avoids the host verification errors that can occur when multiple WSO2 product instances publish statistics.
}, "host": { "hostname": "localhost", "port": "", "protocol": "" }
Running WSO2 EI
WSO2 Enterprise Integrator should run simultaneously with the WSO2 EI Analytics server. For instructions on how to run a WSO2 product, see Running the Product.
Enabling tracing/statistics for EI artifacts
Note that it is not recommended to enable tracing in production environments. Tracing should only be enabled in development environments.
You can select the specific proxy services, REST APIs, sequences and endpoints that you want to monitor via WSO2 EI Analytics by enabling statistics for them. To enable statistics for an individual artifact, you need to click the Enable Statistics link for it in the EI Management Console. See the following sections for detailed information on enabling statistics for the required artifact types.
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.
For example, you can enable statistics for a proxy service as described below.
- Start WSO2 EI and log into the Management Console.
- In the Main tab, look for the Services section and click List under the same section to open the Deployed Services page. Then click on the required proxy service as shown below.
- Click Enable Statistics and Enable Tracing links. 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 |
If you have worker nodes configured in your deployment, use WSO2 EI Tooling to enable message tracing/statistics as follows. (You need to set the value of the Trace Enabled and Statistics Enabled options to true in the Properties tab of the artifact.)