Getting started with Kibana.

In the previous article, we announced a visualization component, available in OCDSearch. It is based on Kibana, a popular open-source tool for data visualization. Let’s see how to use it.

There are several elements in the system, but for the quick introduction, the first three will be enough: Discover, Visualize, and Dashboard.


Discover is a tool, which allows exploring the data from the search index. It is easy to use: just select the index (1), enter your query in the search form (2) or leave it blank, and see what you have in the form of snippets (3). You may dig the data in details by clicking on a small arrow on the left of the snippet. This is very helpful when you want to check the structure of the data which you want to visualize using other parts of Kibana.

If you want, you may customize the view, turning it to the table with columns of your choice. Look at the menu ‘Available fields’ at the left — when you place the mouse over any field, a small button ‘Add’ will appear. Just press it to add the field to the view. If you then decide to remove it, place the mouse over the header of the column — a small cross will appear. So, with just a few clicks your Discover window will look like this:

And one more hint before we proceed to the more interesting part. You may apply filters just below the search form and save it. These saved searched may be used in the visualization.


Kibana 5.5 contains 16 different visualization tools, but we will cover just a few to get started — Vertical bar, Pie chart, and Metric.

Vertical bar

Press ‘+’ button, select Vertical var and select data source. There are two options — from an index (left column) or a saved search. We will select ‘Colombia tenders’, the search we saved in our Discover example above.

Let’s build a simple visualization of contracts signed by months, both in quantity and value.

First, click on ‘Y-Axis’ arrow on the left. If will expand configurations settings for our first metric. By default, it is ‘Count’ in the aggregation field, which is what we need for quantity of tenders. Just add ‘Quantity’ label and this is it.

Now click on X-Axis link in the ‘bucket’ area below (1), select Aggregation = Date Histogram, Field = contract.dateSigned, Interval = Monthly, and add a label Months. Now click on the Play button (2) and here we are:

Let’s add one more metric — value of tenders. For this, click on the button ‘Add metric’ above ‘X-Axis’ bucket, select ‘Y-Axis’, then Aggregation = Sum, Field = value.amount, and Custom label = Value. If you press ‘Play’ button now, the diagram will change somehow, but we are not finished yet.

Let’s format it. Please, select ‘Metrics & Axes’ (1), then configure ‘Value’ metric (2) in this way: Value Axis = New Axis (it will be automatically changed to Right Axis), line mode = stepped. Also you may change color of the lines (3) as you wish.

We are almost finished. If you want to use this visualization in Kibana, just save it with a meaningful name. Also you may share it, for example, embedding the chart to your website. Please, note, that users will need login and password to access it, so it is not suitable for public demonstration.

However, somewhere on internal site it will look pretty handy:

Pie chart

Making a pie chart is even easier. Just repeat first steps from our previous example, select Pie chart and in the ‘buckets’ area select ‘Split slices’. Then select ‘Terms’ as an aggregation rule and choose the field. For example, contract.status is very illustrative. Press ‘Play’ button and here we are:


Another easy, yet useful visualization is a plain figure, called Metric. Just select appropriate visualization and the first option (by default) will be quantity of tenders in the index:

What it a bit more sophisticated? Just press a button ‘Add metric’ and add another one right here. Let’s take Aggregation = Sum and Field = value.amount. Press the‘Play’ button:

It looks a bit messy yet, but don’t worry. You may decrease font size on an ‘Option’ menu and it will look better. Let’s move to the final section of our Getting Started Guide.


Now it is time to assemble all the visualizations to a single collection. Select Dashboard on the left menu and press ‘+’ button. Now you can create your dashboard as you want it — just press ‘Add’ element on the menu and select visualizations which you created

With simple drag and drop you can locate it on your dashboard and resize the elements to fit each other. For example, it may look like this:

Now you can play with it. Please, note, that it is interactive. You may click and select different elements of these charts and the entire dashboard will be automatically recalculated. And if you work with the dashboard from Kibana interface, you may use search form at the top of the page, entering there specific search queries and receiving visualizations for your particular search string.

Have fun :)

If you have any questions on using this tool with OCDSearch, feel free to ask us: And do not forget to clap this article or share it on social networks if you found it useful.

If you want to join alpha testing of OCDSearch, you may do it here: