Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the visualization of kibana

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to understand the visualization of kibana. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Introduction

Kibana is the visualization platform of elasticsearch (hereinafter referred to as ES). The author usually uses kibana dev tools more often, so it is more convenient to use various commands of ES, DSL query sentences and so on.

But the visualization function of kibana is much more than that. Kibana can be used to search, view data in ES indexes, easily perform advanced data analysis, and display data in a variety of charts, tables and maps. And you can quickly create and share dynamic dashboards based on the browser's interface, and feedback the changes of data in ES in real time.

Many components of kibana visualization are actually based on the results of ES aggregation.

The examples used below are all based on the sample data that comes with kibana, and readers can actually do it if they are interested.

The ES and kibana used for the operation are both based on version 7.1.0.

Body New Index Mode (index pattern)

Index pattern is a prerequisite for kibana visualization. It is equivalent to telling kibana which indexes to use as data for visualization. Index our first step is to create an index pattern.

As shown in the figure above, first find management in the left menu, and then click index patterns-create index pattern. Create a new index pattern. Here is an example of the index of e-commerce that comes with kibana.

In the figure above, by entering the name of index pattern, kibana will automatically display the matching index, and then click next.

Select the fields of the time dimension in the index, if there are multiple, according to the specific business scenario. For example, here I choose the creation time field of the order.

It is important to note that this time field is used to facilitate filtering data based on time. If your business does not need to be filtered based on the time frame, you may not choose this step.

At this point, our index pattern will be built. Readers can refer to the above process to create a new index pattern for the flight data index.

Search for data using discovery

Discovery is often used in log search, and now many companies will collect service logs to ES and then use kibana's discovery function to find logs. This is much more convenient than logging in to an online server and setting up a grep.

As shown in the figure above, select discovery from the menu, and then you can see the new index pattern created in our previous section.

In the position of 1 in the picture above, I select the index pattern of e-commerce, and then select the time to filter in the location of 2, here I select all the data from 1 year ago. There are many dimensions over time, so you can try them one by one. There is a search box next to 1, and you can enter any information to search the index. In addition to the general direct input string for search, you can also specify a search field. You only need to enter something like the following in the search box:

User: "youssef"

You can search for data whose user field value satisfies youssef.

The location of 3 in the figure summarizes the distribution of the data in the form of a histogram, and we can see that our data are mainly concentrated in the period from December 2019 to January 2020.

The location of figure 4 is the data itself, which can be displayed in both table and json. The menu on the left supports filtering the specified fields, which will not be expanded here.

Visual data

Kibana comes with many visual components, which make it easy for us to visually display the aggregated results. Let's look at an example.

Select visualize from the left menu, and then click the + sign on the right, as shown in the following figure:

There are a lot of visualization components here, and I'll take the pie pie chart as an example.

As shown in the figure above, we select the bucket aggregation mode on the left, then the bucket field is the user gender field, and the unit of measurement is count, and then click the triangle button above to run, and the result is the effect shown in the image above. The ratio of men to women can be seen in this picture.

If we also want to see the urban distribution of men and women, we can add a sub-bucket and click add sub buckets on the lower left.

As shown in the figure above, we also select the terms sub-bucket in the sub-bucket, and then the field of the sub-bucket is the user's city. After running, the effect is shown in the image above. Click the save button in the upper left corner to save the current visualization results. After saving it, we can show it on dashboard.

Display data in dashboard

Dashboard can be understood as a panel showing various visual components, and we can add the previously saved visualization results to the panel for display.

Click dashboard in the left menu, then click create new dashboard, then click add, and select the visualization component we saved earlier.

The following figure is an example of a panel based on the index of e-commerce we talked about earlier.

On how to understand the visualization of kibana to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report