Status for a cluster: Request

Prev Next

To get the status of a specified Elasticsearch cluster, send the following request:

GET https://<IA_IP_address>:<port_number>/stats/v1/elastic/<cluster_name>/clusterstatus

Required header:

Cookie: px=<token>

Note

You must be logged in to use this request.

Options

  • IA_IP_address—The IP address of the NDR appliance running the NDR API.

  • port_number—The port number of the NDR appliance running the NDR API.

  • cluster_name—The name of the cluster.

  • token—This token authenticates the session. By default, the session times out after 24 hours.

Example

GET https://xxx.xxx.xxx.xxx:443/stats/v1/elastic/ia150/clusterstatus

Required header:

Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Status for a cluster: Response

HTTP/1.1 [Response Code] [Response Message]				
Server: [Server]
Date: [Date]				
Content-Type: [Content Type]

clusterName: [Cluster Name]
clusterStatus: [Cluster Status]
indicesCount: [Indices Count]
shardCount: [Shard Count]
totalNodesCount: [Total Nodes Count]
dataNodesOnlyCount: [Data Nodes Only Count]
masterNodesOnlyCount: [Master Nodes Only Count]
masterDataNodesCount: [Master Data Nodes Count]
Response fields
  • Response Code—A standard HTTP response code.

  • Response Message—A standard HTTP response message.

  • Server—The server being used.

  • Date—Standard HTML date format.

  • Content Type—The response format.

  • Cluster Name—The name of the cluster.

  • Cluster Status—Green indicates that the cluster is fully operational. Yellow indicates that one or more replica is missing. Red indicates that data is missing and the search results will be incomplete.

  • Indices Count—The total number of indices in the cluster.

  • Shard Count—The total number of shards in the cluster.

  • Total Nodes Count—The total number of Elasticsearch instances in the cluster.

  • Data Nodes Only Count—The total number of Elasticsearch data-node-only instances in the cluster.

  • Master Nodes Only Count—The total number of Elasticsearch master-only instances in the cluster.

  • Master Data Nodes Count—The total number of Elasticsearch instances that are both master and data node in the cluster.

Example
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 29 Apr 2016 16:39:18 GMT
Content-Type: application/json; charset=utf-8
{
  "clusterName":"ia150",
  "clusterStatus":"GREEN",
  "indicesCount":81,
  "shardCount":315,
  "nodeStats":{
    "totalNodesCount":2,
    "dataNodesOnlyCount":1,
    "masterNodesOnlyCount":0,
    "masterDataNodesCount":1
  }
}

cURL code sample: Status for a cluster

curl -k -H "Content-Type: Application/json" --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" https://xxx.xxx.xxx.xxx:443/stats/v1/elastic/ia150/clusterstatus

This cURL sample includes the following options:

  • -k—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate.

  • -H "Content-Type: Application/json"—This header specifies that the request body is in JSON format.

  • --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This option specifies the authentication token for this session.

  • https://xxx.xxx.xxx.xxx:443/stats/v1/elastic/ia150/clusterstatus—The statistics request URL. Replace xxx.xxx.xxx.xxx with the IP address of your NDR appliance. Replace ia150 with the cluster name of interest.

Results

This example returns the status of the specified Elasticsearch cluster. The output is in JSON format.