Kibana's Visualize feature turns Elasticsearch query aggregations into visual charts for exploring trends and distributions in your index data. This tutorial walks you through a complete example: using TSVB (Time Series Visual Builder) to display the average number of segments across all nodes in a monitoring index. TSVB is suited for time-series metrics sourced from index data, such as node statistics collected by the Elasticsearch monitoring feature.
Prerequisites
Before you begin, ensure that you have:
-
Access to the Kibana console. For details, see Connect to a cluster using Kibana
-
Monitoring enabled on your Elasticsearch cluster so that
.monitoring-es*indexes are populated
Create an index pattern for monitoring indexes
Before TSVB can query your monitoring data, Kibana needs an index pattern that points to the .monitoring-es* indexes.
-
Click the
icon in the upper-left corner to expand the navigation pane. Click Management, then click Stack Management. -
Click Index Patterns > Create index pattern.
-
Turn on Include system and hidden indices. In Index pattern name, enter
.monitoring-es*. Click Next step. -
In Time field, select timestamp. Click Create index pattern. Result: The index pattern is created and listed under Index Patterns.
Deleting .kibana* indexes removes the index pattern.
Create a TSVB visualization
With the index pattern in place, create a TSVB visualization and configure it to show the average segment count over time.
-
Click the
icon in the upper-left corner to expand the navigation pane. Under Kibana, click Visualize. -
Click Create new visualization, then select TSVB.
-
Click the Panel options tab. In Index pattern, enter
.monitoring-es*. In Time field, select timestamp. -
Click the Data tab. In Aggregation, select Average. In Field, select node_stats.indices.segments.count. Result: The chart displays the trend of the average number of segments across nodes over time.
-
Click Save in the upper-right corner. Enter a name for the visualization, then click Save.
What's next
-
Add this visualization to a Kibana dashboard to monitor cluster health alongside other metrics.
-
Explore other aggregation types (such as Max or Sum) in the Data tab to build additional views of your index data.
-
To visualize different monitoring fields, repeat these steps and select a different field in step 4.