[Monitoring] add get_clusters_summary to shrink cluster api response (#18596) (#18663)

This reduces the output from the clusters API in the data processing stage.

Mainly, it throws away a lot of unused fields in `elasticsearch.cluster_stats` and `elasticsearch.cluster_state`

cc @rasroh
This commit is contained in:
Tim Sullivan 2018-04-30 10:59:17 -07:00 committed by GitHub
parent d3b4cf5a49
commit c4476243d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 1486 additions and 773 deletions

View file

@ -89,7 +89,7 @@ export function ElasticsearchPanel(props) {
<EuiDescriptionList type="column">
<EuiDescriptionListTitle>Version</EuiDescriptionListTitle>
<EuiDescriptionListDescription data-test-subj="esVersion">
{ get(nodes, 'versions[0]') || 'N/A' }
{ props.version || 'N/A' }
</EuiDescriptionListDescription>
<EuiDescriptionListTitle>Uptime</EuiDescriptionListTitle>
<EuiDescriptionListDescription data-test-subj="esUptime">

View file

@ -20,6 +20,7 @@ export function Overview(props) {
<ElasticsearchPanel
{...props.cluster.elasticsearch}
version={props.cluster.version}
ml={props.cluster.ml}
changeUrl={props.changeUrl}
license={props.cluster.license}

View file

@ -0,0 +1,411 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`getClustersSummary should summarize cluster data with a primary cluster 1`] = `
Array [
Object {
"alerts": Object {
"alertsMeta": Object {
"enabled": true,
},
},
"beats": Object {
"beats": Object {
"total": null,
"types": Array [],
},
"bytesSent": null,
"totalEvents": null,
},
"cluster_name": "proddy1",
"cluster_uuid": "fOt6KT9KTICAMm2ncRhsMg",
"elasticsearch": Object {
"cluster_stats": Object {
"indices": Object {
"count": 1,
"docs": Object {
"count": 9,
"deleted": 0,
},
"shards": Object {
"index": Object {
"primaries": Object {
"avg": 1,
"max": 1,
"min": 1,
},
"replication": Object {
"avg": 0,
"max": 0,
"min": 0,
},
"shards": Object {
"avg": 1,
"max": 1,
"min": 1,
},
},
"primaries": 1,
"replication": 0,
"total": 1,
},
"store": Object {
"size_in_bytes": 37182,
},
},
"nodes": Object {
"count": Object {
"total": 1,
},
"fs": Object {
"available_in_bytes": 224468717568,
"free_in_bytes": 228403855360,
"total_in_bytes": 499963170816,
},
"jvm": Object {
"max_uptime_in_millis": 898395,
"mem": Object {
"heap_max_in_bytes": 731840512,
"heap_used_in_bytes": 273930776,
},
},
},
"status": "green",
},
},
"isPrimary": true,
"isSupported": true,
"kibana": Object {
"concurrent_connections": 1,
"count": 1,
"memory_limit": 1501560832,
"memory_size": 208977920,
"requests_total": 1,
"response_time_max": 69,
"status": "green",
},
"license": Object {
"expiry_date_in_millis": 1526499128764,
"status": "active",
"type": "trial",
},
"logstash": Object {
"avg_memory": 0,
"avg_memory_used": 0,
"events_in_total": 0,
"events_out_total": 0,
"max_uptime": 0,
"node_count": 0,
"pipeline_count": 0,
"versions": Array [],
},
"ml": undefined,
"status": "green",
"version": "7.0.0-alpha1",
},
Object {
"alerts": Object {
"alertsMeta": Object {
"enabled": true,
},
},
"beats": Object {
"beats": Object {
"total": null,
"types": Array [],
},
"bytesSent": null,
"totalEvents": null,
},
"cluster_name": "monitoring-one",
"cluster_uuid": "F4hFnr5JQQayOzd8yG1rSg",
"elasticsearch": Object {
"cluster_stats": Object {
"indices": Object {
"count": 6,
"docs": Object {
"count": 557,
"deleted": 1,
},
"shards": Object {
"index": Object {
"primaries": Object {
"avg": 1,
"max": 1,
"min": 1,
},
"replication": Object {
"avg": 0,
"max": 0,
"min": 0,
},
"shards": Object {
"avg": 1,
"max": 1,
"min": 1,
},
},
"primaries": 6,
"replication": 0,
"total": 6,
},
"store": Object {
"size_in_bytes": 651556,
},
},
"nodes": Object {
"count": Object {
"total": 1,
},
"fs": Object {
"available_in_bytes": 224468783104,
"free_in_bytes": 228403920896,
"total_in_bytes": 499963170816,
},
"jvm": Object {
"max_uptime_in_millis": 922788,
"mem": Object {
"heap_max_in_bytes": 731840512,
"heap_used_in_bytes": 271001920,
},
},
},
"status": "green",
},
},
"isPrimary": false,
"isSupported": true,
"kibana": Object {
"concurrent_connections": 0,
"count": 0,
"memory_limit": 0,
"memory_size": 0,
"requests_total": 0,
"response_time_max": 0,
"status": null,
},
"license": Object {
"expiry_date_in_millis": 1526499102070,
"status": "active",
"type": "trial",
},
"logstash": Object {
"avg_memory": 0,
"avg_memory_used": 0,
"events_in_total": 0,
"events_out_total": 0,
"max_uptime": 0,
"node_count": 0,
"pipeline_count": 0,
"versions": Array [],
},
"ml": undefined,
"status": "green",
"version": "7.0.0-alpha1",
},
]
`;
exports[`getClustersSummary should summarize cluster data with no primary cluster 1`] = `
Array [
Object {
"alerts": Object {
"alertsMeta": Object {
"enabled": true,
},
},
"beats": Object {
"beats": Object {
"total": null,
"types": Array [],
},
"bytesSent": null,
"totalEvents": null,
},
"cluster_name": "proddy1",
"cluster_uuid": "fOt6KT9KTICAMm2ncRhsMg",
"elasticsearch": Object {
"cluster_stats": Object {
"indices": Object {
"count": 1,
"docs": Object {
"count": 9,
"deleted": 0,
},
"shards": Object {
"index": Object {
"primaries": Object {
"avg": 1,
"max": 1,
"min": 1,
},
"replication": Object {
"avg": 0,
"max": 0,
"min": 0,
},
"shards": Object {
"avg": 1,
"max": 1,
"min": 1,
},
},
"primaries": 1,
"replication": 0,
"total": 1,
},
"store": Object {
"size_in_bytes": 37182,
},
},
"nodes": Object {
"count": Object {
"total": 1,
},
"fs": Object {
"available_in_bytes": 224468717568,
"free_in_bytes": 228403855360,
"total_in_bytes": 499963170816,
},
"jvm": Object {
"max_uptime_in_millis": 898395,
"mem": Object {
"heap_max_in_bytes": 731840512,
"heap_used_in_bytes": 273930776,
},
},
},
"status": "green",
},
},
"isPrimary": false,
"isSupported": true,
"kibana": Object {
"concurrent_connections": 1,
"count": 1,
"memory_limit": 1501560832,
"memory_size": 208977920,
"requests_total": 1,
"response_time_max": 69,
"status": "green",
},
"license": Object {
"expiry_date_in_millis": 1526499128764,
"status": "active",
"type": "trial",
},
"logstash": Object {
"avg_memory": 0,
"avg_memory_used": 0,
"events_in_total": 0,
"events_out_total": 0,
"max_uptime": 0,
"node_count": 0,
"pipeline_count": 0,
"versions": Array [],
},
"ml": undefined,
"status": "green",
"version": "7.0.0-alpha1",
},
Object {
"alerts": Object {
"alertsMeta": Object {
"enabled": true,
},
},
"beats": Object {
"beats": Object {
"total": null,
"types": Array [],
},
"bytesSent": null,
"totalEvents": null,
},
"cluster_name": "monitoring-one",
"cluster_uuid": "F4hFnr5JQQayOzd8yG1rSg",
"elasticsearch": Object {
"cluster_stats": Object {
"indices": Object {
"count": 6,
"docs": Object {
"count": 557,
"deleted": 1,
},
"shards": Object {
"index": Object {
"primaries": Object {
"avg": 1,
"max": 1,
"min": 1,
},
"replication": Object {
"avg": 0,
"max": 0,
"min": 0,
},
"shards": Object {
"avg": 1,
"max": 1,
"min": 1,
},
},
"primaries": 6,
"replication": 0,
"total": 6,
},
"store": Object {
"size_in_bytes": 651556,
},
},
"nodes": Object {
"count": Object {
"total": 1,
},
"fs": Object {
"available_in_bytes": 224468783104,
"free_in_bytes": 228403920896,
"total_in_bytes": 499963170816,
},
"jvm": Object {
"max_uptime_in_millis": 922788,
"mem": Object {
"heap_max_in_bytes": 731840512,
"heap_used_in_bytes": 271001920,
},
},
},
"status": "green",
},
},
"isPrimary": false,
"isSupported": true,
"kibana": Object {
"concurrent_connections": 0,
"count": 0,
"memory_limit": 0,
"memory_size": 0,
"requests_total": 0,
"response_time_max": 0,
"status": null,
},
"license": Object {
"expiry_date_in_millis": 1526499102070,
"status": "active",
"type": "trial",
},
"logstash": Object {
"avg_memory": 0,
"avg_memory_used": 0,
"events_in_total": 0,
"events_out_total": 0,
"max_uptime": 0,
"node_count": 0,
"pipeline_count": 0,
"versions": Array [],
},
"ml": undefined,
"status": "green",
"version": "7.0.0-alpha1",
},
]
`;

View file

@ -0,0 +1,682 @@
[
{
"cluster_uuid": "fOt6KT9KTICAMm2ncRhsMg",
"cluster_name": "proddy1",
"version": "7.0.0-alpha1",
"license": {
"status": "active",
"uid": "09f3fb66-6d77-4223-ab4e-c5a7ee7b1585",
"type": "trial",
"issue_date": "2018-04-16T19:32:08.764Z",
"issue_date_in_millis": 1523907128764,
"expiry_date": "2018-05-16T19:32:08.764Z",
"expiry_date_in_millis": 1526499128764,
"max_nodes": 1000,
"issued_to": "proddy1",
"issuer": "elasticsearch",
"start_date_in_millis": -1
},
"cluster_stats": {
"timestamp": 1523908015525,
"status": "green",
"indices": {
"count": 1,
"shards": {
"total": 1,
"primaries": 1,
"replication": 0,
"index": {
"shards": {
"min": 1,
"max": 1,
"avg": 1
},
"primaries": {
"min": 1,
"max": 1,
"avg": 1
},
"replication": {
"min": 0,
"max": 0,
"avg": 0
}
}
},
"docs": {
"count": 9,
"deleted": 0
},
"store": {
"size_in_bytes": 37182
},
"fielddata": {
"memory_size_in_bytes": 0,
"evictions": 0
},
"query_cache": {
"memory_size_in_bytes": 0,
"total_count": 0,
"hit_count": 0,
"miss_count": 0,
"cache_size": 0,
"cache_count": 0,
"evictions": 0
},
"completion": {
"size_in_bytes": 0
},
"segments": {
"count": 9,
"memory_in_bytes": 14272,
"terms_memory_in_bytes": 10251,
"stored_fields_memory_in_bytes": 2808,
"term_vectors_memory_in_bytes": 0,
"norms_memory_in_bytes": 320,
"points_memory_in_bytes": 9,
"doc_values_memory_in_bytes": 884,
"index_writer_memory_in_bytes": 0,
"version_map_memory_in_bytes": 0,
"fixed_bit_set_memory_in_bytes": 0,
"max_unsafe_auto_id_timestamp": -1,
"file_sizes": {}
}
},
"nodes": {
"count": {
"total": 1,
"data": 1,
"coordinating_only": 0,
"master": 1,
"ingest": 1
},
"versions": [
"7.0.0-alpha1"
],
"os": {
"available_processors": 8,
"allocated_processors": 1,
"names": [
{
"name": "Mac OS X",
"count": 1
}
],
"mem": {
"total_in_bytes": 17179869184,
"free_in_bytes": 357588992,
"used_in_bytes": 16822280192,
"free_percent": 2,
"used_percent": 98
}
},
"process": {
"cpu": {
"percent": 0
},
"open_file_descriptors": {
"min": 212,
"max": 212,
"avg": 212
}
},
"jvm": {
"max_uptime_in_millis": 898395,
"versions": [
{
"version": "10",
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_version": "10+46",
"vm_vendor": "\"Oracle Corporation\"",
"count": 1
}
],
"mem": {
"heap_used_in_bytes": 273930776,
"heap_max_in_bytes": 731840512
},
"threads": 43
},
"fs": {
"total_in_bytes": 499963170816,
"free_in_bytes": 228403855360,
"available_in_bytes": 224468717568
},
"plugins": [
{
"name": "x-pack-upgrade",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Upgrade",
"classname": "org.elasticsearch.xpack.upgrade.Upgrade",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-sql",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "The Elasticsearch plugin that powers SQL for Elasticsearch",
"classname": "org.elasticsearch.xpack.sql.plugin.SqlPlugin",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-ml",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Machine Learning",
"classname": "org.elasticsearch.xpack.ml.MachineLearning",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": true
},
{
"name": "x-pack-logstash",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Logstash",
"classname": "org.elasticsearch.xpack.logstash.Logstash",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-deprecation",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Deprecation",
"classname": "org.elasticsearch.xpack.deprecation.Deprecation",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-monitoring",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Monitoring",
"classname": "org.elasticsearch.xpack.monitoring.Monitoring",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-core",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Core",
"classname": "org.elasticsearch.xpack.core.XPackPlugin",
"extended_plugins": [],
"has_native_controller": false
},
{
"name": "x-pack-security",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Security",
"classname": "org.elasticsearch.xpack.security.Security",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-rollup",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Rollup",
"classname": "org.elasticsearch.xpack.rollup.Rollup",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-watcher",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Watcher",
"classname": "org.elasticsearch.xpack.watcher.Watcher",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-graph",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Graph",
"classname": "org.elasticsearch.xpack.graph.Graph",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
}
],
"network_types": {
"transport_types": {
"security4": 1
},
"http_types": {
"security4": 1
}
}
}
},
"cluster_state": {
"nodes_hash": -1775623708,
"status": "green",
"version": 10,
"state_uuid": "24ATwSkUS2Ky-hcR-uPRhA",
"master_node": "lLDq_ptaTRm6ntW7KPAmkQ",
"nodes": {
"lLDq_ptaTRm6ntW7KPAmkQ": {
"name": "nodey01",
"ephemeral_id": "P-xGmWktSCWsG4PcbEGcMg",
"transport_address": "127.0.0.1:9301",
"attributes": {
"ml.machine_memory": "17179869184",
"ml.max_open_jobs": "20",
"ml.enabled": "true"
}
}
}
},
"isSupported": true,
"alerts": {
"alertsMeta": {
"enabled": true
}
},
"kibana": {
"uuids": [
"46205c28-9d41-447a-a438-c8b86fb5d1ce"
],
"status": "green",
"requests_total": 1,
"concurrent_connections": 1,
"response_time_max": 69,
"memory_size": 208977920,
"memory_limit": 1501560832,
"count": 1
},
"logstash": {
"node_count": 0,
"events_in_total": 0,
"events_out_total": 0,
"avg_memory": 0,
"avg_memory_used": 0,
"max_uptime": 0,
"pipeline_count": 0,
"versions": []
},
"beats": {
"totalEvents": null,
"bytesSent": null,
"beats": {
"total": null,
"types": []
}
}
},
{
"cluster_uuid": "F4hFnr5JQQayOzd8yG1rSg",
"cluster_name": "monitoring-one",
"version": "7.0.0-alpha1",
"license": {
"status": "active",
"uid": "5d32fcdb-3f3b-4816-a8a9-8bac1c2a73a6",
"type": "trial",
"issue_date": "2018-04-16T19:31:42.070Z",
"issue_date_in_millis": 1523907102070,
"expiry_date": "2018-05-16T19:31:42.070Z",
"expiry_date_in_millis": 1526499102070,
"max_nodes": 1000,
"issued_to": "monitoring-one",
"issuer": "elasticsearch",
"start_date_in_millis": -1
},
"cluster_stats": {
"timestamp": 1523908013287,
"status": "green",
"indices": {
"count": 6,
"shards": {
"total": 6,
"primaries": 6,
"replication": 0,
"index": {
"shards": {
"min": 1,
"max": 1,
"avg": 1
},
"primaries": {
"min": 1,
"max": 1,
"avg": 1
},
"replication": {
"min": 0,
"max": 0,
"avg": 0
}
}
},
"docs": {
"count": 557,
"deleted": 1
},
"store": {
"size_in_bytes": 651556
},
"fielddata": {
"memory_size_in_bytes": 848,
"evictions": 0
},
"query_cache": {
"memory_size_in_bytes": 0,
"total_count": 0,
"hit_count": 0,
"miss_count": 0,
"cache_size": 0,
"cache_count": 0,
"evictions": 0
},
"completion": {
"size_in_bytes": 0
},
"segments": {
"count": 27,
"memory_in_bytes": 120198,
"terms_memory_in_bytes": 85510,
"stored_fields_memory_in_bytes": 8480,
"term_vectors_memory_in_bytes": 0,
"norms_memory_in_bytes": 4928,
"points_memory_in_bytes": 1020,
"doc_values_memory_in_bytes": 20260,
"index_writer_memory_in_bytes": 174805,
"version_map_memory_in_bytes": 16836,
"fixed_bit_set_memory_in_bytes": 104,
"max_unsafe_auto_id_timestamp": -1,
"file_sizes": {}
}
},
"nodes": {
"count": {
"total": 1,
"data": 1,
"coordinating_only": 0,
"master": 1,
"ingest": 1
},
"versions": [
"7.0.0-alpha1"
],
"os": {
"available_processors": 8,
"allocated_processors": 1,
"names": [
{
"name": "Mac OS X",
"count": 1
}
],
"mem": {
"total_in_bytes": 17179869184,
"free_in_bytes": 359727104,
"used_in_bytes": 16820142080,
"free_percent": 2,
"used_percent": 98
}
},
"process": {
"cpu": {
"percent": 2
},
"open_file_descriptors": {
"min": 204,
"max": 204,
"avg": 204
}
},
"jvm": {
"max_uptime_in_millis": 922788,
"versions": [
{
"version": "10",
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_version": "10+46",
"vm_vendor": "\"Oracle Corporation\"",
"count": 1
}
],
"mem": {
"heap_used_in_bytes": 271001920,
"heap_max_in_bytes": 731840512
},
"threads": 39
},
"fs": {
"total_in_bytes": 499963170816,
"free_in_bytes": 228403920896,
"available_in_bytes": 224468783104
},
"plugins": [
{
"name": "x-pack-upgrade",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Upgrade",
"classname": "org.elasticsearch.xpack.upgrade.Upgrade",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-sql",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "The Elasticsearch plugin that powers SQL for Elasticsearch",
"classname": "org.elasticsearch.xpack.sql.plugin.SqlPlugin",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-ml",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Machine Learning",
"classname": "org.elasticsearch.xpack.ml.MachineLearning",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": true
},
{
"name": "x-pack-logstash",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Logstash",
"classname": "org.elasticsearch.xpack.logstash.Logstash",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-deprecation",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Deprecation",
"classname": "org.elasticsearch.xpack.deprecation.Deprecation",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-monitoring",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Monitoring",
"classname": "org.elasticsearch.xpack.monitoring.Monitoring",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-core",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Core",
"classname": "org.elasticsearch.xpack.core.XPackPlugin",
"extended_plugins": [],
"has_native_controller": false
},
{
"name": "x-pack-security",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Security",
"classname": "org.elasticsearch.xpack.security.Security",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-rollup",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Rollup",
"classname": "org.elasticsearch.xpack.rollup.Rollup",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-watcher",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Watcher",
"classname": "org.elasticsearch.xpack.watcher.Watcher",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
},
{
"name": "x-pack-graph",
"version": "7.0.0-alpha1",
"elasticsearch_version": "7.0.0-alpha1",
"java_version": "1.8",
"description": "Elasticsearch Expanded Pack Plugin - Graph",
"classname": "org.elasticsearch.xpack.graph.Graph",
"extended_plugins": [
"x-pack-core"
],
"has_native_controller": false
}
],
"network_types": {
"transport_types": {
"security4": 1
},
"http_types": {
"security4": 1
}
}
}
},
"cluster_state": {
"nodes_hash": -721035764,
"status": "green",
"version": 37,
"state_uuid": "FE17aYiRRHSxPqolSADJyw",
"master_node": "iPcqcwhiRv-RDQjYSaXrkg",
"nodes": {
"iPcqcwhiRv-RDQjYSaXrkg": {
"name": "monitoring-one-01",
"ephemeral_id": "46J0NLewQQCza8de7CnFvw",
"transport_address": "127.0.0.1:9300",
"attributes": {
"ml.machine_memory": "17179869184",
"ml.max_open_jobs": "20",
"ml.enabled": "true"
}
}
}
},
"isSupported": true,
"alerts": {
"alertsMeta": {
"enabled": true
}
},
"kibana": {
"uuids": [],
"status": null,
"requests_total": 0,
"concurrent_connections": 0,
"response_time_max": 0,
"memory_size": 0,
"memory_limit": 0,
"count": 0
},
"logstash": {
"node_count": 0,
"events_in_total": 0,
"events_out_total": 0,
"avg_memory": 0,
"avg_memory_used": 0,
"max_uptime": 0,
"pipeline_count": 0,
"versions": []
},
"beats": {
"totalEvents": null,
"bytesSent": null,
"beats": {
"total": null,
"types": []
}
}
}
]

View file

@ -0,0 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import clusters from './fixtures/clusters';
import { getClustersSummary } from '../get_clusters_summary';
describe('getClustersSummary', () => {
it('should summarize cluster data with a primary cluster', () => {
const kibanaUuid = '46205c28-9d41-447a-a438-c8b86fb5d1ce';
const result = getClustersSummary(clusters, kibanaUuid);
expect(result).toMatchSnapshot();
});
it('should summarize cluster data with no primary cluster', () => {
const kibanaUuid = null;
const result = getClustersSummary(clusters, kibanaUuid);
expect(result).toMatchSnapshot();
});
});

View file

@ -13,35 +13,12 @@ import { getKibanasForClusters } from '../kibana';
import { getLogstashForClusters } from '../logstash';
import { getPipelines } from '../logstash/get_pipelines';
import { getBeatsForClusters } from '../beats';
import { calculateOverallStatus } from '../calculate_overall_status';
import { alertsClustersAggregation } from '../../cluster_alerts/alerts_clusters_aggregation';
import { alertsClusterSearch } from '../../cluster_alerts/alerts_cluster_search';
import { checkLicense as checkLicenseForAlerts } from '../../cluster_alerts/check_license';
import { getClustersSummary } from './get_clusters_summary';
import { CLUSTER_ALERTS_SEARCH_SIZE } from '../../../common/constants';
// manipulate cluster status and license meta data
export function normalizeClustersData(clusters, kibanaUuid) {
clusters.forEach(cluster => {
cluster.elasticsearch = {
cluster_stats: cluster.cluster_stats,
nodes: cluster.nodes,
indices: cluster.indices
};
cluster.status = calculateOverallStatus([
cluster.elasticsearch.status,
cluster.kibana && cluster.kibana.status || null
]);
cluster.isPrimary = cluster.kibana.uuids.includes(kibanaUuid);
delete cluster.cluster_stats;
delete cluster.nodes;
delete cluster.indices;
delete cluster.kibana.uuids;
});
return clusters;
}
/**
* Get all clusters or the cluster associated with {@code clusterUuid} when it is defined.
*/
@ -131,5 +108,5 @@ export async function getClustersFromRequest(req, indexPatterns, { clusterUuid,
const config = req.server.config();
const kibanaUuid = config.get('server.uuid');
return normalizeClustersData(clusters, kibanaUuid);
return getClustersSummary(clusters, kibanaUuid);
}

View file

@ -0,0 +1,77 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { pick, omit } from 'lodash';
import { calculateOverallStatus } from '../calculate_overall_status';
export function getClustersSummary(clusters, kibanaUuid) {
return clusters.map(cluster => {
const {
isSupported,
cluster_uuid: clusterUuid,
cluster_name: clusterName,
version,
license,
cluster_stats: clusterStats,
logstash,
kibana,
ml,
beats,
alerts
} = cluster;
const {
status: licenseStatus,
type: licenseType,
expiry_date_in_millis: licenseExpiry
} = license;
const indices = pick(clusterStats.indices, ['count', 'docs', 'shards', 'store']);
const jvm = {
max_uptime_in_millis: clusterStats.nodes.jvm.max_uptime_in_millis,
mem: clusterStats.nodes.jvm.mem
};
const nodes = {
fs: clusterStats.nodes.fs,
count: {
total: clusterStats.nodes.count.total
},
jvm
};
const { status } = cluster.cluster_state;
return {
isSupported,
cluster_uuid: clusterUuid,
cluster_name: clusterName,
version,
license: {
status: licenseStatus,
type: licenseType,
expiry_date_in_millis: licenseExpiry
},
elasticsearch: {
cluster_stats: {
indices,
nodes,
status
}
},
logstash,
kibana: omit(kibana, 'uuids'),
ml,
beats,
alerts,
isPrimary: kibana.uuids.includes(kibanaUuid),
status: calculateOverallStatus([
status,
kibana && kibana.status || null
])
};
});
}

View file

@ -1,5 +1,98 @@
[
{
"cluster_uuid": "6d-9tDFTRe-qT5GoBytdlQ",
"cluster_name": "clustertwo",
"version": "7.0.0-alpha1",
"license": {
"status": "active",
"type": "basic",
"expiry_date_in_millis": 1914278399999
},
"elasticsearch": {
"cluster_stats": {
"indices": {
"count": 1,
"docs": {
"count": 8,
"deleted": 0
},
"shards": {
"total": 1,
"primaries": 1,
"replication": 0,
"index": {
"shards": {
"min": 1,
"max": 1,
"avg": 1
},
"primaries": {
"min": 1,
"max": 1,
"avg": 1
},
"replication": {
"min": 0,
"max": 0,
"avg": 0
}
}
},
"store": {
"size_in_bytes": 34095
}
},
"nodes": {
"fs": {
"total_in_bytes": 499065712640,
"free_in_bytes": 200665341952,
"available_in_bytes": 200403197952
},
"count": {
"total": 1
},
"jvm": {
"max_uptime_in_millis": 701043,
"mem": {
"heap_used_in_bytes": 204299464,
"heap_max_in_bytes": 628555776
}
}
},
"status": "green"
}
},
"logstash": {
"node_count": 0,
"events_in_total": 0,
"events_out_total": 0,
"avg_memory": 0,
"avg_memory_used": 0,
"max_uptime": 0,
"pipeline_count": 0,
"queue_types": {
"memory": 0,
"persisted": 0
},
"versions": []
},
"kibana": {
"status": null,
"requests_total": 0,
"concurrent_connections": 0,
"response_time_max": 0,
"memory_size": 0,
"memory_limit": 0,
"count": 0
},
"beats": {
"totalEvents": null,
"bytesSent": null,
"beats": {
"total": null,
"types": []
}
},
"alerts": {
"alertsMeta": {
"enabled": true
@ -9,420 +102,80 @@
"message": "Cluster [clustertwo] license type [basic] does not support Cluster Alerts"
}
},
"beats": {
"beats": {
"total": null,
"types": []
},
"bytesSent": null,
"totalEvents": null
},
"cluster_name": "clustertwo",
"cluster_state": {
"master_node": "7Cw93cHFS9mLBojuYdd9EQ",
"nodes": {
"7Cw93cHFS9mLBojuYdd9EQ": {
"attributes": {
"ml.enabled": "true"
},
"ephemeral_id": "39Xe_o2RR9uVBRAk5j6WOQ",
"name": "clustertwo-02",
"transport_address": "127.0.0.1:9304"
}
},
"state_uuid": "L0nkstGcQpKQr1kZDgryAw",
"status": "green",
"version": 15
},
"cluster_uuid": "6d-9tDFTRe-qT5GoBytdlQ",
"elasticsearch": {
"cluster_stats": {
"indices": {
"completion": {
"size_in_bytes": 0
},
"count": 1,
"docs": {
"count": 8,
"deleted": 0
},
"fielddata": {
"evictions": 0,
"memory_size_in_bytes": 0
},
"query_cache": {
"cache_count": 0,
"cache_size": 0,
"evictions": 0,
"hit_count": 0,
"memory_size_in_bytes": 0,
"miss_count": 0,
"total_count": 0
},
"segments": {
"count": 8,
"doc_values_memory_in_bytes": 680,
"file_sizes": {},
"fixed_bit_set_memory_in_bytes": 0,
"index_writer_memory_in_bytes": 0,
"max_unsafe_auto_id_timestamp": -1,
"memory_in_bytes": 13852,
"norms_memory_in_bytes": 256,
"points_memory_in_bytes": 8,
"stored_fields_memory_in_bytes": 2496,
"term_vectors_memory_in_bytes": 0,
"terms_memory_in_bytes": 10412,
"version_map_memory_in_bytes": 0
},
"shards": {
"index": {
"primaries": {
"avg": 1,
"max": 1,
"min": 1
},
"replication": {
"avg": 0,
"max": 0,
"min": 0
},
"shards": {
"avg": 1,
"max": 1,
"min": 1
}
},
"primaries": 1,
"replication": 0,
"total": 1
},
"store": {
"size_in_bytes": 34095
}
},
"nodes": {
"count": {
"coordinating_only": 0,
"data": 1,
"ingest": 1,
"master": 1,
"total": 1
},
"fs": {
"available_in_bytes": 200403197952,
"free_in_bytes": 200665341952,
"total_in_bytes": 499065712640
},
"jvm": {
"max_uptime_in_millis": 701043,
"mem": {
"heap_max_in_bytes": 628555776,
"heap_used_in_bytes": 204299464
},
"threads": 40,
"versions": [
{
"count": 1,
"version": "1.8.0_121",
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_vendor": "Oracle Corporation",
"vm_version": "25.121-b13"
}
]
},
"network_types": {
"http_types": {
"security4": 1
},
"transport_types": {
"security4": 1
}
},
"os": {
"allocated_processors": 1,
"available_processors": 4,
"mem": {
"free_in_bytes": 183799808,
"free_percent": 1,
"total_in_bytes": 17179869184,
"used_in_bytes": 16996069376,
"used_percent": 99
},
"names": [
{
"count": 1,
"name": "Mac OS X"
}
]
},
"plugins": [
{
"classname": "org.elasticsearch.xpack.XPackPlugin",
"description": "Elasticsearch Expanded Pack Plugin",
"has_native_controller": true,
"name": "x-pack",
"version": "7.0.0-alpha1"
}
],
"process": {
"cpu": {
"percent": 0
},
"open_file_descriptors": {
"avg": 163,
"max": 163,
"min": 163
}
},
"versions": [
"7.0.0-alpha1"
]
},
"status": "green",
"timestamp": 1502835059952
}
},
"isPrimary": false,
"kibana": {
"concurrent_connections": 0,
"count": 0,
"memory_limit": 0,
"memory_size": 0,
"requests_total": 0,
"response_time_max": 0,
"status": null
},
"license": {
"expiry_date": "2030-08-29T23:59:59.999Z",
"expiry_date_in_millis": 1914278399999,
"issue_date": "2014-09-29T00:00:00.000Z",
"status": "active",
"type": "basic"
},
"logstash": {
"avg_memory": 0,
"avg_memory_used": 0,
"events_in_total": 0,
"events_out_total": 0,
"max_uptime": 0,
"node_count": 0,
"pipeline_count": 0,
"queue_types": {
"memory": 0,
"persisted": 0
},
"versions": []
},
"version": "7.0.0-alpha1"
"status": "green"
},
{
"alerts": {
"alertsMeta": {
"enabled": true
},
"count": 1,
"high": 0,
"low": 0,
"medium": 1
},
"beats": {
"beats": {
"total": null,
"types": []
},
"bytesSent": null,
"totalEvents": null
},
"cluster_name": "monitoring-one",
"cluster_state": {
"master_node": "7r5cGj40Qcyia0J1xF0lnA",
"nodes": {
"7r5cGj40Qcyia0J1xF0lnA": {
"attributes": {
"ml.enabled": "true"
},
"ephemeral_id": "9h7Asl78Riu-5BjLw7W9Tg",
"name": "monitoring-one-01",
"transport_address": "127.0.0.1:9300"
}
},
"state_uuid": "asE-gTxlRuad4K1ED5lNag",
"status": "yellow",
"version": 45
},
"isSupported": true,
"cluster_uuid": "lOF8kofiS_2DX58o9mXJ1Q",
"cluster_name": "monitoring-one",
"version": "7.0.0-alpha1",
"license": {
"status": "active",
"type": "trial",
"expiry_date_in_millis": 1505426308997
},
"elasticsearch": {
"cluster_stats": {
"indices": {
"completion": {
"size_in_bytes": 0
},
"count": 8,
"docs": {
"count": 3997,
"deleted": 69
},
"fielddata": {
"evictions": 0,
"memory_size_in_bytes": 2104
},
"query_cache": {
"cache_count": 0,
"cache_size": 0,
"evictions": 0,
"hit_count": 0,
"memory_size_in_bytes": 0,
"miss_count": 0,
"total_count": 0
},
"segments": {
"count": 36,
"doc_values_memory_in_bytes": 91352,
"file_sizes": {},
"fixed_bit_set_memory_in_bytes": 992,
"index_writer_memory_in_bytes": 205347,
"max_unsafe_auto_id_timestamp": -1,
"memory_in_bytes": 278961,
"norms_memory_in_bytes": 6784,
"points_memory_in_bytes": 3250,
"stored_fields_memory_in_bytes": 11544,
"term_vectors_memory_in_bytes": 0,
"terms_memory_in_bytes": 166031,
"version_map_memory_in_bytes": 26362
},
"shards": {
"index": {
"primaries": {
"avg": 1,
"max": 1,
"min": 1
},
"replication": {
"avg": 0,
"max": 0,
"min": 0
},
"shards": {
"avg": 1,
"max": 1,
"min": 1
}
},
"total": 8,
"primaries": 8,
"replication": 0,
"total": 8
"index": {
"shards": {
"min": 1,
"max": 1,
"avg": 1
},
"primaries": {
"min": 1,
"max": 1,
"avg": 1
},
"replication": {
"min": 0,
"max": 0,
"avg": 0
}
}
},
"store": {
"size_in_bytes": 2647163
}
},
"nodes": {
"count": {
"coordinating_only": 0,
"data": 1,
"ingest": 1,
"master": 1,
"total": 1
},
"fs": {
"available_in_bytes": 200403648512,
"total_in_bytes": 499065712640,
"free_in_bytes": 200665792512,
"total_in_bytes": 499065712640
"available_in_bytes": 200403648512
},
"count": {
"total": 1
},
"jvm": {
"max_uptime_in_millis": 761002,
"mem": {
"heap_max_in_bytes": 628555776,
"heap_used_in_bytes": 133041176
},
"threads": 42,
"versions": [
{
"count": 1,
"version": "1.8.0_121",
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_vendor": "Oracle Corporation",
"vm_version": "25.121-b13"
}
]
},
"network_types": {
"http_types": {
"security4": 1
},
"transport_types": {
"security4": 1
"heap_used_in_bytes": 133041176,
"heap_max_in_bytes": 628555776
}
},
"os": {
"allocated_processors": 1,
"available_processors": 4,
"mem": {
"free_in_bytes": 86732800,
"free_percent": 1,
"total_in_bytes": 17179869184,
"used_in_bytes": 17093136384,
"used_percent": 99
},
"names": [
{
"count": 1,
"name": "Mac OS X"
}
]
},
"plugins": [
{
"classname": "org.elasticsearch.xpack.XPackPlugin",
"description": "Elasticsearch Expanded Pack Plugin",
"has_native_controller": true,
"name": "x-pack",
"version": "7.0.0-alpha1"
}
],
"process": {
"cpu": {
"percent": 2
},
"open_file_descriptors": {
"avg": 178,
"max": 178,
"min": 178
}
},
"versions": [
"7.0.0-alpha1"
]
}
},
"status": "yellow",
"timestamp": 1502835054610
"status": "yellow"
}
},
"isSupported": true,
"isPrimary": false,
"kibana": {
"concurrent_connections": 0,
"count": 0,
"memory_limit": 0,
"memory_size": 0,
"requests_total": 0,
"response_time_max": 0,
"status": null
},
"license": {
"expiry_date": "2017-09-14T21:58:28.997Z",
"expiry_date_in_millis": 1505426308997,
"issue_date": "2017-08-15T21:58:28.997Z",
"status": "active",
"type": "trial"
},
"logstash": {
"avg_memory": 0,
"avg_memory_used": 0,
"node_count": 0,
"events_in_total": 0,
"events_out_total": 0,
"avg_memory": 0,
"avg_memory_used": 0,
"max_uptime": 0,
"node_count": 0,
"pipeline_count": 0,
"queue_types": {
"memory": 0,
@ -430,220 +183,106 @@
},
"versions": []
},
"version": "7.0.0-alpha1"
},
{
"alerts": {
"alertsMeta": {
"enabled": true
}
"kibana": {
"status": null,
"requests_total": 0,
"concurrent_connections": 0,
"response_time_max": 0,
"memory_size": 0,
"memory_limit": 0,
"count": 0
},
"beats": {
"totalEvents": null,
"bytesSent": null,
"beats": {
"total": null,
"types": []
},
"bytesSent": null,
"totalEvents": null
}
},
"cluster_name": "clusterone",
"cluster_state": {
"master_node": "fYjS7QwxT42788axNXnZ1Q",
"nodes": {
"ZcUHP_QBQzeRjE5by3TbvQ": {
"attributes": {
"ml.enabled": "true"
},
"ephemeral_id": "dkdHpjB2RIabMwbwcMWDNw",
"name": "clusterone-02",
"transport_address": "127.0.0.1:9303"
},
"fYjS7QwxT42788axNXnZ1Q": {
"attributes": {
"ml.enabled": "true"
},
"ephemeral_id": "gLCiGmfARciO6_8eTh9caw",
"name": "clusterone-01",
"transport_address": "127.0.0.1:9301"
}
"alerts": {
"alertsMeta": {
"enabled": true
},
"state_uuid": "v9cBtnUvQMqe_J-kAvZaBw",
"status": "green",
"version": 221
"count": 1,
"low": 0,
"medium": 1,
"high": 0
},
"isPrimary": false,
"status": "yellow"
},
{
"isSupported": true,
"cluster_uuid": "TkHOX_-1TzWwbROwQJU5IA",
"cluster_name": "clusterone",
"version": "7.0.0-alpha1",
"license": {
"status": "active",
"type": "trial",
"expiry_date_in_millis": 1505426327135
},
"elasticsearch": {
"cluster_stats": {
"indices": {
"completion": {
"size_in_bytes": 0
},
"count": 5,
"docs": {
"count": 150,
"deleted": 0
},
"fielddata": {
"evictions": 0,
"memory_size_in_bytes": 0
},
"query_cache": {
"cache_count": 0,
"cache_size": 0,
"evictions": 0,
"hit_count": 0,
"memory_size_in_bytes": 0,
"miss_count": 0,
"total_count": 0
},
"segments": {
"count": 76,
"doc_values_memory_in_bytes": 88064,
"file_sizes": {},
"fixed_bit_set_memory_in_bytes": 0,
"index_writer_memory_in_bytes": 7006184,
"max_unsafe_auto_id_timestamp": 1502834982386,
"memory_in_bytes": 1907922,
"norms_memory_in_bytes": 197184,
"points_memory_in_bytes": 3818,
"stored_fields_memory_in_bytes": 23744,
"term_vectors_memory_in_bytes": 0,
"terms_memory_in_bytes": 1595112,
"version_map_memory_in_bytes": 260
},
"shards": {
"index": {
"primaries": {
"avg": 2.6,
"max": 5,
"min": 1
},
"replication": {
"avg": 1,
"max": 1,
"min": 1
},
"shards": {
"avg": 5.2,
"max": 10,
"min": 2
}
},
"total": 26,
"primaries": 13,
"replication": 1,
"total": 26
"index": {
"shards": {
"min": 2,
"max": 10,
"avg": 5.2
},
"primaries": {
"min": 1,
"max": 5,
"avg": 2.6
},
"replication": {
"min": 1,
"max": 1,
"avg": 1
}
}
},
"store": {
"size_in_bytes": 4838464
}
},
"nodes": {
"count": {
"coordinating_only": 0,
"data": 2,
"ingest": 2,
"master": 2,
"total": 2
},
"fs": {
"available_in_bytes": 200404209664,
"total_in_bytes": 499065712640,
"free_in_bytes": 200666353664,
"total_in_bytes": 499065712640
"available_in_bytes": 200404209664
},
"count": {
"total": 2
},
"jvm": {
"max_uptime_in_millis": 741786,
"mem": {
"heap_max_in_bytes": 1257111552,
"heap_used_in_bytes": 465621856
},
"threads": 92,
"versions": [
{
"count": 2,
"version": "1.8.0_121",
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_vendor": "Oracle Corporation",
"vm_version": "25.121-b13"
}
]
},
"network_types": {
"http_types": {
"security4": 2
},
"transport_types": {
"security4": 2
"heap_used_in_bytes": 465621856,
"heap_max_in_bytes": 1257111552
}
},
"os": {
"allocated_processors": 2,
"available_processors": 8,
"mem": {
"free_in_bytes": 332099584,
"free_percent": 1,
"total_in_bytes": 34359738368,
"used_in_bytes": 34027638784,
"used_percent": 99
},
"names": [
{
"count": 2,
"name": "Mac OS X"
}
]
},
"plugins": [
{
"classname": "org.elasticsearch.xpack.XPackPlugin",
"description": "Elasticsearch Expanded Pack Plugin",
"has_native_controller": true,
"name": "x-pack",
"version": "7.0.0-alpha1"
}
],
"process": {
"cpu": {
"percent": 2
},
"open_file_descriptors": {
"avg": 227,
"max": 237,
"min": 218
}
},
"versions": [
"7.0.0-alpha1"
]
}
},
"status": "green",
"timestamp": 1502835052641
"status": "green"
}
},
"isSupported": true,
"isPrimary": false,
"kibana": {
"concurrent_connections": 307,
"count": 1,
"memory_limit": 1501560832,
"memory_size": 231141376,
"requests_total": 571,
"response_time_max": 1930,
"status": "green"
},
"license": {
"expiry_date": "2017-09-14T21:58:47.135Z",
"expiry_date_in_millis": 1505426327135,
"issue_date": "2017-08-15T21:58:47.135Z",
"status": "active",
"type": "trial"
},
"logstash": {
"avg_memory": 1038876672,
"avg_memory_used": 487782224,
"node_count": 1,
"events_in_total": 142,
"events_out_total": 142,
"avg_memory": 1038876672,
"avg_memory_used": 487782224,
"max_uptime": 570039,
"node_count": 1,
"pipeline_count": 1,
"queue_types": {
"memory": 1,
@ -653,7 +292,29 @@
"7.0.0-alpha1"
]
},
"version": "7.0.0-alpha1"
"kibana": {
"status": "green",
"requests_total": 571,
"concurrent_connections": 307,
"response_time_max": 1930,
"memory_size": 231141376,
"memory_limit": 1501560832,
"count": 1
},
"beats": {
"totalEvents": null,
"bytesSent": null,
"beats": {
"total": null,
"types": []
}
},
"alerts": {
"alertsMeta": {
"enabled": true
}
},
"isPrimary": false,
"status": "green"
}
]

View file

@ -1,228 +1,74 @@
[
{
"alerts": [
{
"message": "Allocate missing replica shards.",
"metadata": {
"alert_index": ".monitoring-alerts-6",
"cluster_uuid": "y1qOsQPiRrGtmdEuM3APJw",
"link": "elasticsearch/indices",
"severity": 1100,
"type": "monitoring",
"version_created": 6000026,
"watch": "elasticsearch_cluster_status"
},
"prefix": "Elasticsearch cluster status is yellow.",
"resolved_timestamp": "2017-08-23T21:45:31.882Z",
"timestamp": "2017-08-23T21:28:25.639Z",
"update_timestamp": "2017-08-23T21:45:31.882Z"
}
],
"beats": {
"beats": {
"total": null,
"types": []
},
"bytesSent": null,
"totalEvents": null
},
"cluster_name": "singlecluster",
"cluster_state": {
"master_node": "ghLf1mWQRdiE8RQXA128UA",
"nodes": {
"ghLf1mWQRdiE8RQXA128UA": {
"attributes": {
"ml.enabled": "true"
},
"ephemeral_id": "QX8nwLiQSbeI3WpDygHn-g",
"name": "single-01",
"transport_address": "127.0.0.1:9300"
},
"ukb0scOOSNK_Vs4CoXKFTw": {
"attributes": {
"ml.enabled": "true"
},
"ephemeral_id": "ALwCj74_SJCDkKVdCu9zMA",
"name": "single-02",
"transport_address": "127.0.0.1:9301"
}
},
"state_uuid": "EDVQBaWPRpiHsEEcUeqYyA",
"status": "green",
"version": 140
},
"cluster_uuid": "y1qOsQPiRrGtmdEuM3APJw",
"cluster_name": "singlecluster",
"version": "7.0.0-alpha1",
"license": {
"status": "active",
"type": "gold",
"expiry_date_in_millis": 1914278399999
},
"elasticsearch": {
"cluster_stats": {
"indices": {
"completion": {
"size_in_bytes": 0
},
"count": 17,
"docs": {
"count": 4001,
"deleted": 99
},
"fielddata": {
"evictions": 0,
"memory_size_in_bytes": 2496
},
"query_cache": {
"cache_count": 0,
"cache_size": 0,
"evictions": 0,
"hit_count": 0,
"memory_size_in_bytes": 0,
"miss_count": 0,
"total_count": 0
},
"segments": {
"count": 172,
"doc_values_memory_in_bytes": 365000,
"file_sizes": {},
"fixed_bit_set_memory_in_bytes": 2752,
"index_writer_memory_in_bytes": 299400,
"max_unsafe_auto_id_timestamp": 1503524661506,
"memory_in_bytes": 3045776,
"norms_memory_in_bytes": 276480,
"points_memory_in_bytes": 8325,
"stored_fields_memory_in_bytes": 54080,
"term_vectors_memory_in_bytes": 0,
"terms_memory_in_bytes": 2341891,
"version_map_memory_in_bytes": 7690
},
"shards": {
"index": {
"primaries": {
"avg": 2.8823529411764706,
"max": 5,
"min": 1
},
"replication": {
"avg": 1,
"max": 1,
"min": 1
},
"shards": {
"avg": 5.764705882352941,
"max": 10,
"min": 2
}
},
"total": 98,
"primaries": 49,
"replication": 1,
"total": 98
"index": {
"shards": {
"min": 2,
"max": 10,
"avg": 5.764705882352941
},
"primaries": {
"min": 1,
"max": 5,
"avg": 2.8823529411764706
},
"replication": {
"min": 1,
"max": 1,
"avg": 1
}
}
},
"store": {
"size_in_bytes": 11826390
}
},
"nodes": {
"count": {
"coordinating_only": 0,
"data": 2,
"ingest": 2,
"master": 2,
"total": 2
},
"fs": {
"available_in_bytes": 201386397696,
"total_in_bytes": 499065712640,
"free_in_bytes": 201648541696,
"total_in_bytes": 499065712640
"available_in_bytes": 201386397696
},
"count": {
"total": 2
},
"jvm": {
"max_uptime_in_millis": 1201658,
"mem": {
"heap_max_in_bytes": 1257111552,
"heap_used_in_bytes": 551929768
},
"threads": 83,
"versions": [
{
"count": 2,
"version": "1.8.0_121",
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_vendor": "Oracle Corporation",
"vm_version": "25.121-b13"
}
]
},
"network_types": {
"http_types": {
"security4": 2
},
"transport_types": {
"security4": 2
"heap_used_in_bytes": 551929768,
"heap_max_in_bytes": 1257111552
}
},
"os": {
"allocated_processors": 2,
"available_processors": 8,
"mem": {
"free_in_bytes": 85819392,
"free_percent": 0,
"total_in_bytes": 34359738368,
"used_in_bytes": 34273918976,
"used_percent": 100
},
"names": [
{
"count": 2,
"name": "Mac OS X"
}
]
},
"plugins": [
{
"classname": "org.elasticsearch.xpack.XPackPlugin",
"description": "Elasticsearch Expanded Pack Plugin",
"has_native_controller": true,
"name": "x-pack",
"version": "7.0.0-alpha1"
}
],
"process": {
"cpu": {
"percent": 13
},
"open_file_descriptors": {
"avg": 304,
"max": 338,
"min": 270
}
},
"versions": [
"7.0.0-alpha1"
]
}
},
"status": "green",
"timestamp": 1503524825081
"status": "green"
}
},
"isPrimary": true,
"kibana": {
"concurrent_connections": 646,
"count": 1,
"memory_limit": 1501560832,
"memory_size": 196005888,
"requests_total": 914,
"response_time_max": 2873,
"status": "green"
},
"license": {
"expiry_date": "2030-08-29T23:59:59.999Z",
"expiry_date_in_millis": 1914278399999,
"issue_date": "2014-09-29T00:00:00.000Z",
"status": "active",
"type": "gold"
},
"logstash": {
"avg_memory": 1038876672,
"avg_memory_used": 479515336,
"node_count": 1,
"events_in_total": 31,
"events_out_total": 31,
"avg_memory": 1038876672,
"avg_memory_used": 479515336,
"max_uptime": 603966,
"node_count": 1,
"pipeline_count": 1,
"queue_types": {
"memory": 1,
@ -232,6 +78,42 @@
"7.0.0-alpha1"
]
},
"version": "7.0.0-alpha1"
"kibana": {
"status": "green",
"requests_total": 914,
"concurrent_connections": 646,
"response_time_max": 2873,
"memory_size": 196005888,
"memory_limit": 1501560832,
"count": 1
},
"beats": {
"totalEvents": null,
"bytesSent": null,
"beats": {
"total": null,
"types": []
}
},
"alerts": [
{
"metadata": {
"severity": 1100,
"cluster_uuid": "y1qOsQPiRrGtmdEuM3APJw",
"version_created": 6000026,
"watch": "elasticsearch_cluster_status",
"link": "elasticsearch/indices",
"alert_index": ".monitoring-alerts-6",
"type": "monitoring"
},
"update_timestamp": "2017-08-23T21:45:31.882Z",
"prefix": "Elasticsearch cluster status is yellow.",
"message": "Allocate missing replica shards.",
"resolved_timestamp": "2017-08-23T21:45:31.882Z",
"timestamp": "2017-08-23T21:28:25.639Z"
}
],
"isPrimary": true,
"status": "green"
}
]