In order to use the WSO2 ESB 5.0.0 we need to set up the three elements:
- ESB – Analytics
- ESB – Tooling
You can download these from the WSO2 website or use the new WSO2 Update Manager.
It is important to have WSO2 products that run on the same server to have a different port offset.
In this case we will put the port offset as follows:
|WSO2 ESB Analytics||10|
The ESB-Tooling is actually Eclipse with specific ESB and Governance Registry Developer Studio features and therefor does not need a port offset.
The portOffset is done in the
[ESB-HOME-ANALYTICS]/repository/conf/carbon.xml file. You can edit this file with your favourite editor (e.g. notepad, notepad++, gedit or vi).
In order to start the ESB Analytics on Windows , another library is needed (snappy-java-126.96.36.199.jar). Please place this jar file in [ESB-ANALYTICS-HOME]/repository/components/lib.
Configuring the ESB Analytics
In order to enable statistics and message tracing it is necessary to enable the mediation statistics and message tracing as required by configuring the ESB 5.0.0
This entails setting the following variables:
|mediation.flow.statistics.enable||True||Setting this property to true
results in the following information being recorded.
· The time spent on each
· The time spent to process
· The fault count of a single
|True||Setting this property to true results
in the message payload before and
after the mediation performed by
individual mediators being recorded.
|True||Setting this property to true results
in the following information being
· Message context properties.
· Message transport-scope
|True/False||If this property is set to true,
mediation statistics is enabled for
all the artifacts in your WSO2 ESB
server by default.
You can enable statistics for the ESB artifacts by setting this property only if the mediation.flow.statistics.enable
If this property is set to false, statistics and/or tracing needs to be manually enabled for the required artifacts.
These four variables are found near each other in the file:
Step 2 Setting the message flow configuration
This step involves providing the information required by WSO2 ESB to publish data to the Analytics – ESB server in order to analyze the data using the Analytics Dashboard. An event publisher (a process that sends data over to the ESB Analytics) is configured with the URL to which WSO2 ESB related information are published as events.
We need to change the correct Event Publisher configuration: [ESB-HOME]/repository/deployment/server/eventpublishers/MessageFlowConfigurationPublisher.xml
The values below need to be entered in this file. Please note that password is not by default present, it should be added as a XML tag pair.
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 ESB Analytics server. These values are filled in already (APART FROM THE receiverURL thrift port) but nevertheless check them before starting. The password value will be encrypted after beginning WSO2 ESB, resulting in something like the following:
<property encrypted="true" name="password">kuv2MubUUveMyv6GeHrXr9il59ajJIqUI4eoYHcgGKf/BBFOWn96NTjJQI+wYbWjKW6r79S7L7ZzgYeWx7DlGbff5X3pBN2Gh9yV0BHP1E93QtFqR7uTWi141Tr7V7ZwScwNqJbiNoV+vyLbsqKJE7T3nP8Ih9Y6omygbcLcHzg=</property>
This means that the password cannot be changed from the xml file. This is the similar process as with the user-mgt.xml file where the admin password is also store in plaintext
||The username to be used when accessing the Analytics server to publish configurations.||
||The password to be used when accessing the Analytics server to publish configurations.||
||The URL of the thrift port to which the ESB configurations should be published. The format of the URL is as follows.
[ESB-HOME]/repository/deployment/server/eventpublishers/MessageFlowStatisticsPublisher.xml file, and do the configurations and specified in the table below.
||The username to be used when accessing the Analytics server to publish statistics.||
||The password to be used when accessing the Analytics server to publish statistics.||
||The URL of the thrift port to which the ESB statistics should be published. The format of the URL is as follows.
Beginning WSO2 ESB
Start the Analytics server first before beginning WSO2 ESB. This because the ESB wants to connect to the thrift port of the Analytics server. If both products start without problems, you can access the Analytics dashboard. Please enable popups of no dashboard is started if you click on this:
When accessing the dashboard, you need to login with the default (admin/admin) credentials.
However, at this time it is still empty since no invocations have been made. In order to see invocations, you need to wait until you have created some APIs, Proxies or Endpoints. If you would have any invocations, you would see a screen like this:
Now you are ready to start with ESB 5.0 Analytics!
Read also our other WSO2 tutorials and blogs, written by our WSO2 Gurus. In case you need WSO2 support, contact the Yenlo WSO2 Guru team to get WSO2 Development Support or WSO2 Operational Support. Of course we do deliver excellent WSO2 training services as well, based on reallife WSO2 tutorials.