Collect monitoring data using legacy collectorsedit
If you enable the Elastic monitoring features in your cluster, you can optionally collect metrics about Kibana.
Elastic Agent and Metricbeat are the recommended methods for collecting and shipping monitoring data to a monitoring cluster.
If you have previously configured legacy collection methods, you should migrate to using Elastic Agent or Metricbeat collection. Do not use legacy collection alongside other collection methods.
For more information, refer to Collect monitoring data with Elastic Agent and Collect monitoring data with Metricbeat.
The following method involves sending the metrics to the production cluster, which ultimately routes them to the monitoring cluster.
To learn about monitoring in general, see Monitor a cluster.
-
Set the
xpack.monitoring.collection.enabled
setting totrue
on each node in the production cluster. By default, it is is disabled (false
).You can specify this setting in either the
elasticsearch.yml
on each node or across the cluster as a dynamic cluster setting. If Elastic Stack security features are enabled, you must havemonitor
cluster privileges to view the cluster settings andmanage
cluster privileges to change them.-
To update the cluster settings in Kibana:
-
Open Kibana in your web browser.
By default, if you are running Kibana locally, go to
http://localhost:5601/
.If security features are enabled, log in.
- Open the main menu, then click Stack Monitoring. If data collection is disabled, you are prompted to turn it on.
-
-
From the Console or command line, set
xpack.monitoring.collection.enabled
totrue
on the production cluster.For example, you can use the following APIs to review and change this setting:
GET _cluster/settings PUT _cluster/settings { "persistent": { "xpack.monitoring.collection.enabled": true } }
For more information, see Monitoring settings in Elasticsearch and Cluster update settings.
-
-
Verify that
monitoring.enabled
andmonitoring.kibana.collection.enabled
are set totrue
in thekibana.yml
file. These are the default values. For more information, see Monitoring settings in Kibana. -
Identify where to send monitoring data. Kibana automatically sends metrics to the Elasticsearch cluster specified in the
elasticsearch.hosts
setting in thekibana.yml
file. This property has a default value ofhttp://localhost:9200
.In production environments, we strongly recommend using a separate cluster (referred to as the monitoring cluster) to store the data. Using a separate monitoring cluster prevents production cluster outages from impacting your ability to access your monitoring data. It also prevents monitoring activities from impacting the performance of your production cluster.
If security features are enabled on the production cluster, use an HTTPS URL such as
https://<your_production_cluster>:9200
in this setting. -
If security features are enabled on the production cluster:
-
Verify that there is a
valid user ID and password in the
elasticsearch.username
andelasticsearch.password
settings in thekibana.yml
file. These values are used when Kibana sends monitoring data to the production cluster. - Configure encryption for traffic between Kibana and Elasticsearch.
-
Verify that there is a
valid user ID and password in the
- Start Kibana.
- View the monitoring data in Kibana.