com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Prerequisites to Publish Statistics

Following sections cover the prerequisites that should be completed in order to publish information relating to the processing carried out by WSO2 ESB in the Analytics Dashboard of WSO2 ESB Analytics.

For information on configuring a minimum high availability deployment cluster of WSO2 ESB Analytics, go to Minimum High Availability Deployment in the WSO2 Clustering Guide.

Downloading WSO2 ESB Analytics

Follow the instructions below to download the binary distribution of WSO2 ESB Analytics

The binary distribution contains the binary files for both MS Windows, and Linux-based operating systems. You can also download, and build the source code.

  1. Go to the WSO2 ESB home page.
  2. Under Downloads, click Analytics.

Installing WSO2 ESB Analytics

The procedure for installing WSO2 ESB Analytics is the same as that for WSO2 Data Analytics Server. Therefore, for detailed information about supporting applications, installing in different operating systems, starting and running the product etc., see the Installation Guide in WSO2 Data Analytics Server documentation.

Running WSO2 ESB Analytics

Once WSO2 ESB Analytics is downloaded, you can start its server and access its Management Console. For detailed instructions to run a WSO2 product, see Running the Product.

  • You may need more than one WSO2 ESB Analytics server in a clustered deployment depending on the load of requests handled by the ESB cluster. The possible deployment patterns for WSO2 ESB Analytics is the same as that for WSO2 Data Analytics Server. For more information on how to run more than one ESB - Analytics server, see Clustering Data Analytics Server.
  • If you get the Caused by: java.lang.IllegalArgumentException: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy exception when starting WSO2 ESB Analytics in certain environments such as Windows or Red Hat linux, download the snappy-java_1.1.1.7.jar file and add it to the <ESB_HOME>/repository/components/lib directory.

Enabling tracing/statistics for the mediation flow

Enable mediation statistics and message tracing as required by configuring the <ESB_HOME>/repository/conf/synapse.properties file as described below. 

In a clustered deployment, the following configurations should be done for each node in the ESB cluster.

 

PropertyRequired ValuePurpose
mediation.flow.statistics.enabletrue

Set this property to true and enable statistics for the required ESB artifact, to record information such as the following.

  • The time spent on each mediator.
  • The time spent to process each message.
  • The fault count of a single message flow.
mediation.flow.statistics.tracer.collect.payloadstrue

Set this property to true and enable tracing for the required ESB artifact, to record the message payload before and after the mediation performed by individual mediators.

mediation.flow.statistics.tracer.collect.properties

true

Set this property to true and enable tracing for the required ESB artifact, to record the following information.

  • Message context properties.
  • Message transport-scope properties. 
mediation.flow.statistics.collect.alltrue/false

Set this property to true and set the mediation.flow.statistics.enable property also to true, to enable mediation statistics for all the artifacts in the ESB profile by default.

If you set this property to false, you need to set the mediation.flow.statistics.enable property to true and manually enable statistics for the required ESB artifact.

Configuring ESB 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 ESB node in the cluster.

This step involves providing the information required by WSO2 ESB to publish data to the WSO2 ESB Analytics server in order to analyze the data using the Analytics Dashboard. An event publisher is configured with the URL to which WSO2 ESB related information are published as events.

Follow the procedure below to configure WSO2 ESB Analytics.

  1. Open the <ESB_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 ESB data to the WSO2 ESB Analytics server.

    PropertyRequired ValueExample
    usernameThe username to be used when accessing the WSO2 ESB Analytics server to publish configurations.admin
    passwordThe password to be used when accessing the WSO2 ESB Analytics server to publish configurations.admin
    receiverURLThe URL of the thrift port to which the ESB configurations should be published. The format of the URL is as follows.
    tcp://<localhost>:<THRIFT_PORT>
    tcp://localhost:7612
  2. Open the <ESB_HOME>/repository/deployment/server/eventpublishers/MessageFlowStatisticsPublisher.xml file, and do the configurations and specified in the table below. 

    PropertyRequired ValueExample
    usernameThe username to be used when accessing the WSO2 ESB Analytics server to publish statistics.admin
    passwordThe password to be used when accessing the WSO2 ESB Analytics server to publish statistics.admin
    receiverURLThe URL of the thrift port to which the ESB statistics should be published. The format of the URL is as follows.
    tcp://<localhost>:<THRIFT_PORT>
    tcp://localhost:7612

Running WSO2 ESB

The WSO2 ESB server should run simultaneously with the WSO2 ESB Analytics server. For detailed instructions to run a WSO2 product, see Running the Product.

 

Open the Management Consoles of the two WSO2 products in two separate browsers to avoid signing off from one Management Console when you sign into the other.

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 <ESB-ANALYTICS_HOME>/repository/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 ESB artifacts

You can select the specific proxy services, REST APIs, sequences and endpoints that you want to monitor via WSO2 ESB 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 ESB 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 ESB nodes if you have not enabled deployment synchronising. 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.

  1. Start the WSO2 ESB server and log into the Management Console.
  2. 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.
     
  3. Click Enable Statistics and Enable Tracing links. Click OK in the information message that appears to confirm that statistics/tracing is enabled.

The following table specifies the path to the Enable Statistics link for each ESB artifact type that can be analysed using the Analytics Dashboard.


ESB Artifact TypePath
Proxy ServiceMain tab => Services => List => Deployed Services page => <Proxy_Service_Name>
REST APIMain tab => APIs => Deployed APIs page
SequenceMain tab => Sequences => Mediation Sequences page
EndpointMain tab => Endpoints => Manage Endpoints page

If you have worker nodes configured in your deployment, use WSO2 ESB 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.)

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.