Blog Detail

Covid-19 Tracker Ask Question

preview image Programming
by Anurag Srivastava, Aug 1, 2020, 6:19:45 PM | 5 minutes |

Introduction to Kibana

I have already written some blogs on Elastic Stack where I have explained different components of Elastic Stack and also some use cases where we can import data from different sources like CSV, MySQL, and MongoDB, etc. I was getting different questions and chat messages from different users regarding "what is Kibana" and "how we can use Kibana". As it is the first step if you want to start using the Elastic Stack through the web interface of Kibana. So here in this blog, I am going to explain the basics of Kibana, its use case, and how we can create the index patterns in Kibana to use the Elasticsearch index data. So now without wasting any time lets start with the introduction to Kibana.

What is Kibana:
Kibana is a dashboarding tool that works very closely with the Elasticsearch. Kibana can be used for different use cases, such as system monitoring and application monitoring. In a traditional monitoring system, you can monitor system performance, application logs, and so on. But with Kibana and Elastic Stack, we can do a lot of things, please mention to the below points:

  • We can create alerts for certain threshold values so that we can get alerts without doing a continuous monitoring
  • We can configure different Beats to monitor system metrics, database metrics, and log metrics, etc.
  • We can configure the APM to monitor the application metrics and any application related issues.
  • We can Configure the JDBC plugin of Logstash to pull RDBMS, CSV, or NoSQL data into Elasticsearch to make it available in Kibana for creating visualizations on different KPIs
  • We can use different third-party plugins that help us to get data from different sources. For example, we can use the Twitter plugin to get the Twitter feeds
  • We can apply machine learning on our data set to find any data anomaly or future trends by analyzing the current dataset

These were some of the use cases where we can use Kibana. As I have mentioned that Kibana works very closely with Elasticsearch but I have forgotten to mention that it only works with Elasticsearch as of now. The Elasticsearch data is not available automatically in Kibana and if we want to use the Elasticsearch index data then we need to create the index pattern in Kibana for the Elasticsearch index. Now let us cover how to create the index pattern in Kibana for an Elasticsearch index.

Creating the index pattern:
Take an example of an Elasticsearch index "users" where we have the user details, please refer to the below example:

  {
        "_index" : "users",
        "_type" : "_doc",
        "_id" : "1",
        "_score" : 1.0,
        "_source" : {
          "name" : "Anurag Srivastava"
        }
  }
      
The above example is showing a document of the "users" index of Elasticsearch. Now if we want to create the index pattern in Kibana then we need to do the following:

  1. Click on the "Management" link from the left menu on Kibana UI. This will open the management page of Kibana.
  2. Now click on the "Index Patterns" link under the "Kibana" heading. This will open the Index Patterns page of Kibana.
  3. Click on the "Create index patterns" button on the top right corner this will open the "Create index pattern" page with step 1 of 2 "define index pattern".
  4. In the index pattern, text box types the name of the index "users" to match the index users.
  5. Also if we want to match more than one index through a single index pattern then we can type the name along with a wildcard. Like if we type "user*" then it will match with the user, users, and user_details index. Please refer to the below screenshot:



  6. In any case, if it matches any index then we will get the success message and the "next step" button will get enable.
  7. In the next step, we can do some settings like custom index pattern id. If we want Kibana to set it for us then we can click on the "Create index pattern" button.
  8. This will create the "users" index pattern and will show the field details along with the option to edit different fields. Here we can set the format of the field. Please refer to the below screenshot:



  9. We can verify the index pattern by clicking on the "Discover" link from the left menu and then we can select the index pattern from the drop-down, please refer to the below screenshot:



  10. After selecting the index patterns we can see the documents in tabular or JSON format. We can also apply search and filter on the data, please refer to the below screenshot:



The above screenshot is showing the documents of users index of Elasticsearch where we can apply the search or filter. So this way we can create the index pattern in Kibana using the Elasticsearch index name and once the index pattern is created then we can perform data analytics and visualization in Kibana. 

Other Blogs on Elastic Stack:

Configure Logstash to push MongoDB data into Elasticsearch
Load CSV Data into Elasticsearch
Introduction to Elasticsearch

Elasticsearch Installation and Configuration on Ubuntu 14.04
Log analysis with Elastic stack 
Elasticsearch Rest API
Basics of Data Search in Elasticsearch
Elasticsearch Rest API
Wildcard and Boolean Search in Elasticsearch
Metrics Aggregation in Elasticsearch
Bucket Aggregation in Elasticsearch
How to create Elasticsearch Cluster

In case of any doubt please leave your comments. You can also follow me on Twitter: https://twitter.com/anu4udilse

If you found this article interesting, then you can explore “Mastering Kibana 6.0”, “Kibana 7 Quick Start Guide”, “Learning Kibana 7”, and “Elasticsearch 7 Quick Start Guide” books to get more insight about Elastic Stack, how to perform data analysis, and how you can create dashboards for key performance indicators using Kibana.


Comments (0)

Leave a comment

Related Blogs

Elastic Stack Interview Questions

Sep 12, 2020, 3:58:55 PM | Anurag Srivastava

Create a Chess board in PHP

Mar 9, 2020, 8:45:41 AM | Rocky Paul

Handle Excel file using Python (Part 2)

Dec 31, 2019, 1:33:53 PM | Anurag Srivastava

Handle Excel file using Python (Part 1)

Dec 30, 2019, 11:20:08 AM | Anurag Srivastava

Create a Pie Chart in Kibana

Dec 24, 2018, 5:25:28 PM | Anurag Srivastava

Bucket Aggregation in Elasticsearch

Aug 29, 2018, 7:15:06 PM | Anurag Srivastava

Top Blogs

Wildcard and Boolean Search in Elasticsearch

Aug 10, 2018, 7:14:40 PM | Anurag Srivastava

Elasticsearch Rest API

Jul 31, 2018, 6:16:42 PM | Anurag Srivastava

Metrics Aggregation in Elasticsearch

Aug 18, 2018, 6:02:20 PM | Anurag Srivastava

Introduction to Elasticsearch Aggregations

Aug 14, 2018, 4:47:56 PM | Anurag Srivastava

Basics of Data Search in Elasticsearch

Aug 4, 2018, 7:02:21 AM | Anurag Srivastava