Command | Description |
curl -X GET http://localhost:9240/_cluster/health?pretty | This command retrieves API Data Store cluster health status. |
$.status | This JSON path expression retrieves the cluster health status from the response. |
$.number_of_nodes | This JSON path expression retrieves the number of nodes in the cluster from the response. |
Status | Description |
green | Indicates that the cluster is in a healthy state. When API Data Store is handling huge data, it takes some time to display the cluster health status. |
yellow | Indicates that the cluster is not in a healthy state. Identify the cause and rectify it. During this time, API Data Store processes the requests for the index that is available. If there are unassigned shards, then identify the unassigned shards, check the reason for the unallocation and resolve the issue. Run the following command to retrieve the list of unassigned shards. curl -X GET “http://localhost:9240/_cat/ shards?h=index,shard,primaryOrReplica,state,docs,store,ip,node,segments.count,unassigned.at,unassigned.details,unassigned.for,unassigned.reason,help,s=index&v” Run the following command to check the unallocated reason for specific shards. curl -X GET "http://localhost:9240/_cluster/allocation/ explain" -d ‘{ "index" :"index name","primary" : "true|false","shard": "shardnumber"}’reason,help,s=index&v” |
red | Indicates that API Data Store nodes are down or not reachable or the API Data Store master is not discovered. If the number of nodes does not match the number of API Data Store nodes configured, identify the node that did not join the cluster and identify the root cause for the node to not join the cluster. Based on the root cause, identify if your API Data Store is down. If your API Data Store is down and not reachable, check the connectivity. |
Command | Description |
curl -X GET "http://localhost:9240/_cluster/health?pretty" | This command retrieves the number of shards on API Data Store. If the total number of active shards from the response exceeds the heap space * nodes * 20 count, then increase the heap space of API Data Store nodes or add a new API Data Store node. For more information on adding a new API Data Store node, see
Adding New Nodes to an Elasticsearch Cluster. API Data Store considers a maximum of 20 active shards per GB of heap space as healthy. Perform any of the following actions to maintain the total number of active shards: Scale up the API Data Store node. If you are not able to scale up the API Data Store node, then increase the heap size as the last option. The heap space should not be more than half of system memory (RAM). For example, if the system memory is 16 GB, you can allocate a maximum of 8 GB for API Data Store. To increase the heap space, modify the parameters Xms2g and Xmx2g in the jvm.options file located at SAG_Install_Directory\InternalDataStore\config. |
Metric | Description |
elasticsearch_jvm_gc_collection_seconds_sum elasticsearch_jvm_gc_collection_seconds_count | The quotient of both the metrics gives the GC run time. If the quotient is more than 1 second, it implies that GC is taking longer time to run and this slows down API Data Store request processing. You must collect the logs and get the mapping of API index and transaction index. |