How to Monitor the AdroitLogic ESB (UltraESB-X) With Kibana
UltraESB-X can be used to publish metrics to Elasticsearch, and it can be monitored using Kibana. You can set this up in just six steps.
Join the DZone community and get the full member experience.Join For Free
AdroitLogic Enterprise Service Bus (UltraESB-X) publishes metrics to the distributed RESTful search and analytics engine Elasticsearch. We can use the open-source visualization tool Kibana for monitoring purposes.
In this blog post, we will go through the steps to set up UltraESB-X monitoring with Kibana.
1. Install Kibana and Elasticsearch
The current UltraESB-X release, v17.01, uses Elasticsearch v5.1.1. I am going to assume that you have downloaded and familiarized yourself with UltraESB. If not, please go over to our developer portal to have a quick look. Let’s first download and install Kibana and Elasticsearch from the following links:
2. Install X-Pack to Kibana and Elasticsearch
X-Pack is an Elastic Stack extension that bundles security, alerting, monitoring, reporting, and graphing capabilities. Follow this guide for X-Pack installation for both Elasticsearch and Kibana. Note that this extension comes as a 30-day trial.
3. Change UltraESB-X Metrics Configuration
UE-X by default is configured to publish to an embedded Elasticsearch server. However, it is recommended to use a standalone Elasticsearch server in production. Therefore, in this case, we will change the metrics configuration to publish to a standalone ES server. The metrics configuration is in the XML file in
There, comment the bean:
<bean id="es-server" class="org.adroitlogic.x.metrics.EmbeddedElasticsearchServer"/>
And uncomment the bean:
<bean id="es-server" class="org.adroitlogic.x.metrics.ExternalElasticsearchServer"> <constructor-arg> <map> <entry key="localhost" value="9300"/> </map> </constructor-arg> <constructor-arg value="elasticsearch" type="java.lang.String"/> </bean>
Also, for this case, we’ll disable the stats expiration. Change the rollover configuration section in the
es-publisher bean as follows.
<!--RollOver Configuration--> <property name="indexRollOverEnabled" value="false"/> <property name="maxDocs" value="1000"/> <property name="maxAgeInMinutes" value="15"/> <property name="rollOverTimePeriodInMinutes" value="10"/> <property name="deleteOldestIndexAfterRollOver" value="false"/> <property name="deleteInactiveIndicesAtInit" value="false"/> <property name="deleteInactiveIndicesAtDestroy" value="false"/>
The final updated configuration is in the metrics.xml file.
4. Start Elasticsearch, UltraESB-X, and Kibana
Start Elasticsearch by running the
elasticsearch script in the
ES_HOME/bin directory. Start Kibana by running the
kibana script in the
KIBANA_HOME/bin directory. Then, start UltraESB-X. Kibana by default runs at http://localhost:5601. The default credentials will be elastic/changeme.
Note: X-Pack comes with a security extension. You can disable it by adding
xpack.security.enabled: false to the
elasticsearch.yml file in the
ES_HOME/conf directory. When the security extension is disabled, login will not be required.
5. Add Index Template to Kibana
In Kibana, we first need to add the index templates that we are interested in. To do that, let’s go to the Management tab in the left pane and add an index template pattern ultraesb_x*.Once the index pattern is entered, Kibana will automatically pick the time-field name as recordTime, as shown below.
Now, we can add visualizations. In order to add visualizations, it is better to have an understanding of the ultraesb_x index mapping first. Elasticsearch mapping is used in the full-mapping.json file.
Now, let’s add a line chart for received messages. Go to the Visualizations tab in the left pane and add a line chart by selecting Line Chart and the ultraesb_x-* index pattern.
Configure the x-axis as shown below:
Configure the y-axis as follows:
Finally, we can apply the changes using the Play button. There you go; your first visualization is a success!
Finally, note that we can pick the time ranges from the top right button.
Call To Action
Originally published at notebookbft.wordpress.com on March 14, 2017.
Published at DZone with permission of Rajind Ruparathna, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.