Elasticsearch endpoints
/elasticsearch/clusters/metrics
Returns the cluster level KPI metrics for Elasticsearch.
GET http://unravel-host
:8081/api/v1/elasticsearch/clusters/metrics?start_time={date}
&end_time={date}
None.
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
Name | Type | Description |
---|---|---|
| integer | Number of successful nodes for Elasticsearch. |
nodes_total | integer | Total number of nodes. |
shards_successful | integer | Number of successful shards. |
shards_total | integer | Total number of shards. |
cluster_name | string | Name of the cluster. |
indices_count | integer | Count of the indices. |
indices_docs_count | integer | Count of the indices documents. |
indices_shards_total | integer | Total number of indices shards. |
Request:
curl -X GET
"http://localhost:8081/api/v1/elasticsearch/clusters/metrics?start_time=2020-01-01&end_time=2020-04-01" -H "accept: application/json" -H "Authorization: JWT token
"
Response:
{ "elasticsearch": { "_nodes_successful": 1, "_nodes_total": 1, "_shards_successful": 392, "_shards_total": 774, "cluster_name": "elasticsearch", "indices_count": 96, "indices_docs_count": 1551925314, "indices_shards_total": 392 } }
/elasticsearch/{cluster}/index
Returns indices and the corresponding metrics in an Elasticsearch cluster.
GET http://unravel-host
/api/v1/elasticsearch/{cluster}
/index?start_time={date}
&end_time={date}
Name | Type | Description |
---|---|---|
| string | Name of the cluster. |
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
Name | Type | Description |
---|---|---|
Indices | string | Index name |
Metrics | array | Metric details |
Request:
curl -X GET
"http://localhost:8081/api/v1/elasticsearch/elasticsearch/index?start_time=2020-01-01&end_time=2020-04-01" -H "accept: application/json" -H "Authorization: JWT token
"
Response:
{ ".kibana_1": { "fielddata_evictions": null, "fielddata_memory_size_in_bytes": null, "flush_total": 1, "flush_total_time_in_millis": 50, "indexing_index_time_in_millis": 1, "indexing_index_total": 3, "merges_total": null, "merges_total_time_in_millis": null, "query_cache_evictions": null, "query_cache_memory_size_in_bytes": null, "search_fetch_time_in_millis": null, "search_fetch_total": 3, "search_query_time_in_millis": 35, "search_query_total": 21, "segments_count": 1, "segments_memory_in_bytes": 2639, "store_size_in_bytes": 6352, "fetch_latency": null, "fetch_rate": null, "flush_latency": null, "flush_rate": null, "indexing_latency": null, "indexing_rate": null, "merge_latency": null, "merge_rate": null, "search_latency": null, "search_rate": null }, ".kibana_2": { "fetch_latency": null, "fetch_rate": null, "fielddata_evictions": null, "fielddata_memory_size_in_bytes": 656, "flush_latency": null, "flush_rate": null, "flush_total": 73, "flush_total_time_in_millis": 3754, "indexing_index_time_in_millis": 330, "indexing_index_total": 78, "indexing_latency": null, "indexing_rate": null, "merge_latency": null, "merge_rate": null, "merges_total": null, "merges_total_time_in_millis": null, "query_cache_evictions": null, "query_cache_memory_size_in_bytes": null, "search_fetch_time_in_millis": 8420, "search_fetch_total": 203281, "search_latency": null, "search_query_time_in_millis": 20598, "search_query_total": 203299, "search_rate": null, "segments_count": 4, "segments_memory_in_bytes": 5793, "store_size_in_bytes": 18884 } }
/elasticsearch/{cluster}/kpi_cluster
Returns the cluster level value of a specific metric.
GET http://unravel-host
/api/v1/elasticsearch/{cluster}
/kpi_cluster?start_time={date}
&end_time={date}
&prefix={metrics}
"
Name | Type | Description |
---|---|---|
| string | Name of the cluster. |
Name | Type | Description |
---|---|---|
| string | Cluster name. |
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
| string | Any of the following metrics:
|
Name | Type | Description |
---|---|---|
Cluster name | string | Name of the cluster |
ts | - | Timestamp |
avg_vd | string | Value of the metrics in a specific timestamp. |
Request:
curl -X GET
"http://localhost:8081/api/v1/elasticsearch/elasticsearch/kpi_cluster?start_time=2020-01-01&end_time=2020-04-01&prefix=search_rate" -H "accept: application/json" -H "Authorization: JWT token
"
Response:
{ "elasticsearch": [ { "ts": 1585746000000, "avg_vd": 0 } ] }
/elasticsearch/{cluster}/kpi_index
Returns metric values of all the indices.
GET http://unravel-host
:8081/api/v1/elasticsearch/{cluster}
/kpi_node?start_time={date}
&end_time={date}
&prefix={metrics}
&node=node name
Name | Type | Description |
---|---|---|
| string | Name of the cluster. |
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
| string | Any of the following metrics:
|
Name | Type | Description |
---|---|---|
indices | string | Name of the index |
ts | - | Timestamp |
avg_vd | string | Value of a metrics in a specific timestamp. |
Request:
curl -X GET "http://localhost:8081/api/v1/elasticsearch/elasticsearch/kpi_node?start_time=2020-01-01&end_time=2020-04-01&prefix=indices_segments_memory_in_bytes&node=es-node-1" -H "accept: application/json" -H "Authorization: JWT token
"
Response:
{ ".kibana_1": [ { "ts": 1585746000000, "avg_vd": null } ], ".kibana_2": [ { "ts": 1585746000000, "avg_vd": null } ] }
In case you want to get metric values of a specific index, then you must pass the index
parameter along with the request.
GET http://unravel-host
:8081/api/v1/elasticsearch/elasticsearch/kpi_node?start_time={date}
&end_time={date}
&prefix=indices_segments_memory_in_bytes&node=nod name
&index={index name}
"
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
| string | Any of the following metrics:
|
| string | Name of the index. |
Request:
curl -X GET "http://localhost:8081/api/v1/elasticsearch/elasticsearch/kpi_node?start_time=2020-01-01&end_time=2020-04-01&prefix=indices_segments_memory_in_bytes&node=es-node-1&index=.kibana_1" -H "accept: application/json" -H "Authorization: JWT Token
Response:
{ ".kibana_1": [ { "ts": 1585746000000, "avg_vd": null } ] }
/elasticsearch/{cluster}/kpi_node
Returns the metric values of specific nodes
GET http://unravel-host
:8081/api/v1/elasticsearch/{cluster}
/kpi_node?start_time={date}
&end_time={date}
&prefix={metrics}
&node={node}
Name | Type | Description |
---|---|---|
| string | Name of the cluster. |
Name | Type | Description |
---|---|---|
| string | cluster name |
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
| string | Node name. |
| string | Any of the following metrics:
|
Name | Type | Description |
---|---|---|
Node name | string | Name of the node |
ts | - | Timestamp |
avg_vd | string | Value of the metrics in a specific timestamp. |
Request:
curl -X GET
"http://localhost:8081/api/v1/elasticsearch/elasticsearch/kpi_node?start_time=2020-01-01&end_time=2020-04-01&prefix=indices_segments_memory_in_bytes&node=es-node-1" -H "accept: application/json" -H "Authorization: token
"
Response:
{ "es-node-1": [ { "ts": 1585746000000, "avg_vd": 780607518 } ] }
/elasticsearch/{cluster}/nodes
Returns the node list and the corresponding metrics in an Elasticsearch cluster.
GET http://unravel-host
:8081/api/v1/elasticsearch/{cluster}
/nodes?start_time={date}
&end_time={date}
Name | Type | Description |
---|---|---|
| string | Name of the cluster. |
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
{cluster} | string | Cluster name. |
{ “node1” :{ Metrics …. }, “node2” :{ Metrics …. }
Request:
curl -X GET "http://localhost:8081/api/v1/elasticsearch/elasticsearch/nodes?start_time=2020-01-01&end_time=2020-04-01" -H "accept: application/json" -H "Authorization: JWT token
"
Response:
{ "es-node-1": { "thread_pool_index_rejected": null, "fs_io_stats_total_read_operations": 874907, "fs_io_stats_total_write_operations": 619102586, "indices_docs_count": 1551925314, "indices_flush_total": 11481, "indices_flush_total_time_in_millis": 1835085, "indices_indexing_index_time_in_millis": 900479673, "indices_indexing_index_total": 1800782360, "indices_indexing_throttle_time_in_millis": null, "indices_merges_total": 1530425, "indices_search_fetch_time_in_millis": 464906, "indices_search_fetch_total": 6020352, "indices_search_query_time_in_millis": 4859332, "indices_search_query_total": 7438300, "indices_segments_count": 5599, "indices_segments_memory_in_bytes": 780607518, "indices_store_size_in_bytes": 195450839892, "jvm_gc_collectors_old_collection_count": 22, "jvm_gc_collectors_old_collection_time_in_millis": 12952, "jvm_gc_collectors_young_collection_count": 515893, "jvm_gc_collectors_young_collection_time_in_millis": 19639944, "jvm_mem_heap_used_in_bytes": 4677283048, "name": "es-node-1", "os_cpu_load_average_15m": 3.85, "os_cpu_load_average_1m": 2.9, "os_cpu_percent": 14, "os_mem_total_in_bytes": 105433157632, "os_mem_used_in_bytes": 104178266112, "thread_pool_search_queue": null, "thread_pool_search_rejected": null, "thread_pool_write_queue": null, "thread_pool_write_rejected": 99588, "fetch_latency": null, "fetch_rate": null, "flush_latency": null, "flush_rate": null, "indexing_latency": null, "indexing_rate": null, "search_latency": null, "search_rate": null } }