@@ -114,6 +114,7 @@ type NodeStatsIndicesResponse struct {
114
114
Docs NodeStatsIndicesDocsResponse
115
115
Store NodeStatsIndicesStoreResponse
116
116
Indexing NodeStatsIndicesIndexingResponse
117
+ Merges NodeStatsIndicesMergesResponse
117
118
Get NodeStatsIndicesGetResponse
118
119
Search NodeStatsIndicesSearchResponse
119
120
FieldData NodeStatsIndicesFieldDataResponse
@@ -146,6 +147,16 @@ type NodeStatsIndicesIndexingResponse struct {
146
147
DeleteCurrent int64 `json:"delete_current"`
147
148
}
148
149
150
+ type NodeStatsIndicesMergesResponse struct {
151
+ Current int64 `json:"current"`
152
+ CurrentDocs int64 `json:"current_docs"`
153
+ CurrentSize int64 `json:"current_size_in_bytes"`
154
+ Total int64 `json:"total"`
155
+ TotalDocs int64 `json:"total_docs"`
156
+ TotalSize int64 `json:"total_size_in_bytes"`
157
+ TotalTime int64 `json:"total_time_in_millis"`
158
+ }
159
+
149
160
type NodeStatsIndicesGetResponse struct {
150
161
Total int64 `json:"total"`
151
162
Time int64 `json:"time_in_millis"`
@@ -278,6 +289,12 @@ var (
278
289
"transport_tx_count" : "Count of packets sent" ,
279
290
"transport_tx_size_in_bytes" : "Bytes sent" ,
280
291
"indices_store_throttle_time_in_millis" : "Throttle time for index store" ,
292
+ "indices_indexing_index_total" : "Total index calls" ,
293
+ "indices_indexing_index_time_in_millis" : "Cumulative index time" ,
294
+ "indices_merges_total" : "Total merges" ,
295
+ "indices_merges_total_docs" : "Cumulative docs merged" ,
296
+ "indices_merges_total_size_in_bytes" : "Total merge size in bytes" ,
297
+ "indices_merges_total_time_in_millis" : "Total time spent merging" ,
281
298
}
282
299
counterVecMetrics = map [string ]* VecInfo {
283
300
"jvm_gc_collection_count" : & VecInfo {
@@ -481,6 +498,13 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) {
481
498
e .counters ["indices_flush_total" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Indices .Flush .Total ))
482
499
e .counters ["indices_flush_time_in_millis" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Indices .Flush .Time ))
483
500
501
+ e .counters ["indices_indexing_index_time_in_millis" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Indices .Indexing .IndexTime ))
502
+ e .counters ["indices_indexing_index_total" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Indices .Indexing .IndexTotal ))
503
+
504
+ e .counters ["indices_merges_total_time_in_millis" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Indices .Merges .TotalTime ))
505
+ e .counters ["indices_merges_total_size_in_bytes" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Indices .Merges .TotalSize ))
506
+ e .counters ["indices_merges_total" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Indices .Merges .Total ))
507
+
484
508
// Transport Stats
485
509
e .counters ["transport_rx_count" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Transport .RxCount ))
486
510
e .counters ["transport_rx_size_in_bytes" ].WithLabelValues (all_stats .ClusterName , stats .Name ).Set (float64 (stats .Transport .RxSize ))
@@ -520,7 +544,7 @@ func main() {
520
544
w .Write ([]byte (`<html>
521
545
<head><title>Elasticsearch Exporter</title></head>
522
546
<body>
523
- <h1>Consul Exporter</h1>
547
+ <h1>Elasticsearch Exporter</h1>
524
548
<p><a href='` + * metricsPath + `'>Metrics</a></p>
525
549
</body>
526
550
</html>` ))
0 commit comments