Skip to content

Commit

Permalink
Make elasticsearch/index_recovery metricset work for Stack Monitoring…
Browse files Browse the repository at this point in the history
… without xpack.enabled flag (elastic#20810)
  • Loading branch information
sayden authored Dec 1, 2020
1 parent 7df22a0 commit 3861294
Show file tree
Hide file tree
Showing 11 changed files with 678 additions and 118 deletions.
131 changes: 131 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19999,6 +19999,13 @@ index



*`elasticsearch.index.recovery.total_time.ms`*::
+
--
type: long

--

*`elasticsearch.index.recovery.id`*::
+
--
Expand Down Expand Up @@ -20099,6 +20106,130 @@ type: keyword

--

*`elasticsearch.index.recovery.stop_time.ms`*::
+
--
type: long

--

*`elasticsearch.index.recovery.start_time.ms`*::
+
--
type: long

--


*`elasticsearch.index.recovery.index.total_time.ms`*::
+
--
type: long

--

*`elasticsearch.index.recovery.index.throttle_time.source.ms`*::
+
--
type: long

--

*`elasticsearch.index.recovery.index.throttle_time.target.ms`*::
+
--
type: long

--


*`elasticsearch.index.recovery.index.files.count`*::
+
--
type: long

--

*`elasticsearch.index.recovery.index.files.reused`*::
+
--
type: long

--

*`elasticsearch.index.recovery.index.files.recovered`*::
+
--
type: long

--


*`elasticsearch.index.recovery.index.size.recovered.bytes`*::
+
--
type: long

--

*`elasticsearch.index.recovery.index.size.total.bytes`*::
+
--
type: long

--

*`elasticsearch.index.recovery.index.size.reused.bytes`*::
+
--
type: long

--


*`elasticsearch.index.recovery.translog.total_time.ms`*::
+
--
type: long

--

*`elasticsearch.index.recovery.translog.count`*::
+
--
type: long

--

*`elasticsearch.index.recovery.translog.total_on_start`*::
+
--
type: long

--

*`elasticsearch.index.recovery.translog.recovered`*::
+
--
type: long

--


*`elasticsearch.index.recovery.verify_index.check_index_time.ms`*::
+
--
type: long

--

*`elasticsearch.index.recovery.verify_index.total_time.ms`*::
+
--
type: long

--

[float]
=== index.summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func TestXPackEnabled(t *testing.T) {
"ccr": []string{}, // no longer indexed into .monitoring-es-*
"cluster_stats": []string{}, // no longer indexed into .monitoring-es-*
"enrich": []string{}, // no longer indexed into .monitoring-es-*
"index_recovery": []string{"index_recovery"},
"index_recovery": []string{}, // no longer indexed into .monitoring-es-*
"index_summary": []string{}, // no longer indexed into .monitoring-es-*
"ml_job": []string{"job_stats"},
"node_stats": []string{}, // no longer indexed into .monitoring-es-*
Expand Down Expand Up @@ -261,6 +261,9 @@ func getXPackConfig(host string) map[string]interface{} {
"metricsets": xpackMetricSets,
"hosts": []string{host},
"xpack.enabled": true,
// index_recovery.active_only is part of the config of the index_recovery Metricset and it is required during the
// test of that particular metricset to get some data from the ES node (instead of an empty JSON if set to true)
"index_recovery.active_only": false,
}
}

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/elasticsearch/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 69 additions & 15 deletions metricbeat/module/elasticsearch/index_recovery/_meta/data.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,92 @@
{
"@timestamp": "2017-10-12T08:05:34.853Z",
"agent": {
"hostname": "host.example.com",
"name": "host.example.com"
},
"elasticsearch": {
"cluster": {
"id": "3LbUkLkURz--FR-YO0wLNA",
"name": "es1"
"id": "8l_zoGznQRmtoX9iSC-goA",
"name": "docker-cluster"
},
"index": {
"name": ".monitoring-es-6-2018.11.20",
"name": ".kibana-event-log-8.0.0-000001",
"recovery": {
"id": 0,
"index": {
"files": {
"count": 0,
"recovered": 0,
"reused": 0
},
"size": {
"recovered": {
"bytes": 0
},
"reused": {
"bytes": 0
},
"total": {
"bytes": 0
}
},
"throttle_time": {
"source": {
"ms": 0
},
"target": {
"ms": 0
}
},
"total_time": {
"ms": 1600
}
},
"primary": true,
"source": {},
"stage": "DONE",
"start_time": {
"ms": 1605819056123
},
"stop_time": {
"ms": 1605819058696
},
"target": {
"host": "127.0.0.1",
"id": "FMRmkE3HTU6xxxoFK-06Ww",
"name": "es1_1"
"id": "Fkj12lAFQOex0DwK0HMwHw",
"name": "082618b4bb36"
},
"type": "EMPTY_STORE"
"total_time": {
"ms": 2573
},
"translog": {
"count": 0,
"recovered": 0,
"total_on_start": 0,
"total_time": {
"ms": 951
}
},
"type": "EMPTY_STORE",
"verify_index": {
"check_index_time": {
"ms": 0
},
"total_time": {
"ms": 0
}
}
}
}
},
"event": {
"dataset": "elasticsearch.index.recovery",
"duration": 115000,
"module": "elasticsearch"
},
"metricset": {
"host": "127.0.0.1:9200",
"module": "elasticsearch",
"name": "index_recovery",
"namespace": "elasticsearch.index.recovery",
"rtt": 115
"period": 10000
},
"service": {
"name": "elasticsearch"
"address": "127.0.0.1:50581",
"name": "elasticsearch",
"type": "elasticsearch"
}
}
Loading

0 comments on commit 3861294

Please sign in to comment.