What is Kibana and what is it used for? Take you to know in detail

Introduction to Kibana

  • Kibana is an open source analytics and visualization platform designed for use with Elasticsearch. You can use kibana to search and view data stored in Elasticsearch. The interaction between Kibana and Elasticsearch is a variety of charts, tables, maps, etc., to display data intuitively, so as to achieve the purpose of advanced data analysis and visualization. The three technologies of Elasticsearch, Logstash and Kibana are what we often call the ELK technology stack. It can be said that the combination of these three technologies is a very clever design in the field of big data. A very typical MVC idea, model persistence layer, view layer and control layer. Logstash acts as the control layer and is responsible for collecting and filtering data. Elasticsearch acts as a data persistence layer and is responsible for storing data. The theme of our chapter, Kibana, plays the role of the view layer, has various dimensions of query and analysis, and uses a graphical interface to display the data stored in Elasticsearch.

Kibana installation

1. Download the Kibana installation package:

  • Download Kibana Free | Get Started Now | Elastic

  • The above address is the download address of Kibana's official website. The latest version is 6.3.2. The Kibana version and Elasticsearch version are updated synchronously, so we'd better use the same version, and the version we use for Elasticsearch is 6.2.4, so we also need Kibana Download 6.2.4. Click the past releases link on the download page to enter the historical version download interface, select version 6.2.4, and we download the compressed package in tar format. The full name of the package is: kibana-6.2.4-linux-x86_64.tar.gz.

2. Run Kibana

  • Upload the Kibana installation package to Linux and decompress it. Enter the bin directory and you will see a script named Kibana. This script is the script program to start Kibana. Execute it directly to run the Kibana instance: $ ./kibana We are executing kibana After starting the script, see the information printed on the console, and immediately connect to the Elasticsearch service when kibana is started. The printed information is as follows:

  • log   [17:40:27.350] [warning][admin][elasticsearch] Unable to revive connection: http://localhost:9200/
    log   [17:40:27.355] [warning][admin][elasticsearch] No living connections
  • Through the print information on the console, we can know that Kibana is trying to connect to the Elasticsearch service of the local IP, but it cannot be connected, because we have not started Elasticsearch yet. Once we start the Elasticsearch service, we can see the following information:

  • log   [17:45:06.851] [info][status][plugin:[email protected]] Status changed from red to green - Ready
  • From the above information, we know that the status of Kibana is normal, and the default port of kibana that can connect to the elasticsearch service is 5601. After opening the port 5601 for the Linux firewall, access Kibana in a browser on another windows system host. It is found that it cannot be accessed. The reason is that by default, Kibana can only be accessed locally, not remotely. If you want to remotely access Kibana services, you need to modify the configuration file. Next, let's see what key configurations Kibana has.

3. Configuration file

  • The configuration file of Kibana is in the kibana/config directory, and the file name is kibana.yml. After we open it with the vi editor, we can see that all configurations in this file are commented out, indicating that all configurations are default, so if we need to modify these default configurations, we need to find the corresponding configuration properties. Untie the comment, and then fill in the value we want.

  • 1. Service port configuration:

  • Property name: server.port default is 5601

  • 2. Address configuration that allows remote access:

  • The attribute name is: server.host defaults to the local machine. If we need to provide Kibana services to remote hosts, we only need to fill in the ip address of the remote host in this configuration. If we want all remote hosts to be able to access , then fill in 0.0.0.0

  • 3. Connect Elasticsearch service configuration

  • The property name is: elasticsearch.url defaults to the elasticsearch connected to the local machine, and the port is 9200, which is localhost:9200. If our Elasticsearch is not installed on the same host as Kibana, or the port number of Elasticsearch is not 9200, just You need to modify this configuration

  • 4. Elasticsearch username and password

  • The attribute names are: elasticsearch.username and elasticsearch.password. By default, there is no username and password. If elasticsearch is configured with a username and password, you need to configure these two lines of attributes

  • 5. Access Kibana service

  • After the relevant configuration is modified, you can use the browser to access kibana, and see the following interface:

Kibana interface

  •  

How to switch Chinese

  • Add in config/kibana.yml

  • i18n.locale: "zh-CN"

Guess you like

Origin blog.csdn.net/Andrew_Chenwq/article/details/129633472