Once you have deployed your production cluster, it is equally important to monitor the cluster regularly and perform maintenance as required. The Elasticsearch stack supports various APIs to monitor the health of nodes and clusters, along with various tools that make the monitoring task easier.
Elasticsearch provides a health API to monitor the health of clusters. Here is an example call and response to obtain the cluster health:
$ curl -XGET http://localhost:9200/_cluster/health?pretty
This should return the result shown in the following code:
{ "cluster_name": "eshadoopcluster", "status": "red", "timed_out": false, "number_of_nodes": 5, "number_of_data_nodes": 5, "active_primary_shards": 28, "active_shards": 56, "relocating_shards": 0, "initializing_shards": 0, "unassigned_shards": 6, "number_of_pending_tasks": 0 }
The response shows important information. Many of these metrics in the response are self...