Kibana provides the visualization feature that you can use to create visualization controls for your data stored in an Elasticsearch cluster. A Kibana visualization control can extract data from the data query results of an Elasticsearch cluster and process the data by using the query result aggregation feature provided by Elasticsearch. A Kibana visualization control can also present the data distribution and data change trend in charts. You can use the visualization feature to visualize data in an index of an Elasticsearch cluster. This topic describes how to use the visualization feature to visualize the data query results of monitoring indexes of an Elasticsearch cluster. In this example, the query results of the average number of segments in monitoring indexes on nodes are visualized.

Prerequisites

  • An Alibaba Cloud Elasticsearch cluster is created. For more information, see Create an Alibaba Cloud Elasticsearch cluster. In this example, an Elasticsearch V7.10 cluster is created.
  • The indexes that you want to use are created. In this example, monitoring indexes are used.
  • You have logged on to the Kibana console of the Elasticsearch cluster. For more information, see Log on to the Kibana console.

Procedure

  1. On the homepage of the Kibana console, click the Navigation bar icon icon in the upper-left corner to show the names of menu items in the left-side navigation pane.
  2. Create an index pattern.
    1. In the left-side navigation pane, click Stack Management below Management.
    2. In the Kibana section, click Index Patterns.
    3. Click Create index pattern.
    4. On the Create index pattern page, turn on Include system and hidden indices, enter an index pattern name in the Index pattern name field, and then click Next step. In this example, the index pattern name is .monitoring-es*.
      Create an index pattern 1
    5. Select an option from the Time field drop-down list and click Create index pattern. In this example, timestamp is selected.
      Create an index pattern 2
      Important
      If you delete .kibana* indexes, the index pattern is lost.
  3. Go back to the homepage of the Kibana console, and click the Navigation bar icon icon in the upper-left corner to show the names of menu items in the left-side navigation pane. In the left-side navigation pane, click Visualize below Kibana.
  4. On the Visualizations page, click Create new visualization.
  5. On the New Visualization page, click TSVB.
    Note
    Time Series Visual Builder (TSVB) is a tool that is used to visualize time series data.
  6. Click the Panel options tab. On the Panel options tab, enter the name of the index pattern that is created in the Index pattern field and select the name of the time field that is specified from the Time field drop-down list to view charts for the time series data of the matched indexes. In this example, .monitoring-es* is entered in the Index pattern field, and timestamp is selected from the Time field drop-down list.
    View charts for time series data
  7. Click the Data tab. On the Metrics subtab, select Average from the Aggregation drop-down list and select node_stats.indices.segments.count from the Field drop-down list to aggregate the time series data and display the processing results in charts.
    Aggregate
  8. Click Save in the upper-right corner of the page to save the configurations.