Red Hat
Aug 7, 2015
by Christina Lin
Moving away from a monolithic application towards microservice architectures, that means the application goes from a centralized big bulk of package deploy on single instance, to small modularized chunk deploy on multiple distributed environment. As mircoservice brings you the advantages of easier to maintain the code, and allowing more developer to work simultaneously, but it also comes with additional problems like a more complex environment, and become difficult to manage.

It will be very irritating to check every single instances, so it's important to have a centralized view of the entire environment, and have that summarized. In JBoss Fuse, we uses something called Insight, which consolidate view on both the log and Camel events, so you have better idea of what is going on in your system in a broader view. By default JBoss Fuse collects data into Easticsearch. It is a is a powerful search engine, which handles distributed datasource efficiently with Restful interface open for query. By taking advantage of the fast search ability, we can store and load the log and camel metrics content. Have data is not enough, without a proper display view, it is also just a bunch of text, and numbers. In JBoss Fuse, we uses Kibana is the search dashboard for Elasticsearch, which analyze the data, display the query result. 


Enabling the Insight is pretty easy, First of all, we need to create a few container to act as the distributed datastore for the instance, please locate a large amount of memories for these instance, as the algorithm requires loading indexes in memory for calculations. I am creating more then one datasource instance because I would like to have HA clusters for these data. 


And add the Insight console (Kibana) profile to the root container, also add the log and camel metrics profile too to also collect data from root. 


Once the profile is installed, you will find the Insight view on the top lefthand corner, click on it, 


Here are the dashboard consolidated view on log and camel metrics of the entire fabric, for the managements to see. 



And under Elasticsearch tab, it shows how the data are distributed

To run an example, I am going to create 2 running instances (containers), deploying a basic camel example writing logs in every 5 seconds. To start collecting data, please also add the insight-log and insight-camel to the container. 




Once all container started, 

Go back to the Insight view and you will see under Logs tab, all the logs in the fabric are collected. 

And the camel events are picked up as well. 


By having this centralized view, we can see the distributed instance in one single view, making it easy to manage just like what we used to do in monolithic application.

Original Post