[Teach you through ELK] Kibana concept and architecture

Yuxian: CSDN content partner, CSDN new star mentor, full-stack creative star creator, 51CTO (Top celebrity + expert blogger), github open source enthusiast (go-zero source code secondary development, game back-end architecture https: https://github.com/Peakchen)

 

Kibana is a web-based data visualization tool for displaying and analyzing data in Elasticsearch. Kibana provides a wealth of charts and visualizations that can help users better understand and explore data. The following is the concept and architecture of Kibana, as well as a simple example implementation.

  1. Kibana concept

Kibana has the following core concepts:

  • Dashboard: A dashboard is a visual interface that displays multiple charts and data panels and allows users to customize and configure them.
  • Visualization: Visualization is a chart or data panel for displaying data in Elasticsearch. Kibana provides various types of visualizations, such as histograms, line charts, maps, etc.
  • Index Pattern: The index pattern specifies the Elasticsearch index to be used in Kibana. Index patterns are used to map indexes to fields and data types and allow users to search and analyze data in Kibana.
  • Search: Search is a query language used to search and filter data in Kibana. Users can use search statements to perform data query and filter operations in Kibana.
  1. Kibana Architecture

Kibana's architecture includes the following components:

  • Web Server: Kibana uses Node.js as a web server for handling HTTP requests and responses.
  • Client-side JavaScript: Kibana uses client-side JavaScript frameworks such as AngularJS and ReactJS for visualization and user interaction.
  • Elasticsearch API: Kibana uses the Elasticsearch API to query and retrieve data, and supports Elasticsearch query syntax and filters.
  • Plugin: Kibana supports the plug-in mechanism, which can extend the functions and customization of Kibana through plug-ins.
  1. Example implementation

Here is a simple Kibana example implementation for displaying data in Elasticsearch:

  1. Install Elasticsearch and Kibana

First you need to install Elasticsearch and Kibana. The latest versions of Elasticsearch and Kibana can be downloaded from the official website and installed according to the official documentation.

  1. Import data into Elasticsearch

Import some test data into Elasticsearch. For example, the following command can import a JSON file into Elasticsearch:

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/myindex/_bulk?pretty' --data-binary @data.json

Wherein myindexis the index name of the data to be imported, data.jsonand is the JSON file to be imported.

  1. Create index pattern

Create index patterns in Kibana, specifying index names and field mappings to be used in Kibana. Index patterns can be created in Kibana's admin interface.

  1. Create visualizations and dashboards

Create visualizations and dashboards in Kibana that display data from Elasticsearch. A type of visualization can be selected, such as column chart, line chart, etc., and added to the dashboard. At the same time, the visualization and dashboard can be customized and configured, such as selecting the fields to be displayed, setting filter conditions, etc.

  1. run Kibana

Run Kibana, and access Kibana's web interface in your browser. Visualization and data panels can be seen in Kibana's dashboard to display data in Elasticsearch.

The above is a simple Kibana example implementation for displaying data in Elasticsearch. In actual use, you can customize and extend Kibana's functions as needed, such as adding custom visualizations and dashboards, or using plug-ins to extend Kibana's functions.

The following is the architecture diagram of Kibana:

+-----------------+             +-------------------+
|    Web Browser   |             |     Kibana App    |
+-----------------+             +-------------------+
         |                                 |
         |         HTTP Requests            |
         +-------------------------------->+
         |                                 |
         |         Elasticsearch API       |
         +-------------------------------->+
         |                                 |
         |         Elasticsearch           |
         +<--------------------------------+
         |                                 |

The Kibana architecture includes the following components:

  • Web Browser: Kibana users use a web browser to access Kibana's web interface.
  • Kibana App: The Kibana application runs on the web server to process HTTP requests and responses from the web interface, and calls the Elasticsearch API to query and obtain data.
  • Elasticsearch API: Kibana uses the Elasticsearch API to query and retrieve data, and supports Elasticsearch query syntax and filters.
  • Elasticsearch: Elasticsearch is a distributed search and analysis engine for storing and processing large-scale data. Kibana obtains data through Elasticsearch, and uses Elasticsearch for query and analysis.

Kibana's architecture is web-based, and Kibana's web interface can be accessed through a web browser, and Kibana can be used for data visualization and analysis. Kibana queries and obtains data through the Elasticsearch API, and supports Elasticsearch query syntax and filters, making it easy to query and analyze data in Elasticsearch.

  1. Kibana usage scenarios

Kibana is widely used in the following scenarios:

  • Operation and maintenance monitoring: Use Kibana to monitor and warn the running status of servers and network devices, such as monitoring CPU, memory, disk, network and other indicators.
  • Log analysis: Use Kibana to analyze and count the logs, such as counting the number of logs, error types, access sources, etc.
  • Business analysis: Use Kibana to analyze and display business data, such as analyzing sales, user behavior, etc.
  • Security analysis: Use Kibana to analyze and monitor security events, such as detecting intrusions and abnormal behaviors.
  • Data visualization: Use Kibana to visualize and display data, such as displaying maps, charts, etc.
  1. Documentation Links

Here are some relevant literature and material links:

Guess you like

Origin blog.csdn.net/feng1790291543/article/details/132103074