Skip to content

Commit 2571b52

Browse files
authored
[elasticsearch module] serialize shards properties (#30408)
1 parent 5961a2d commit 2571b52

5 files changed

Lines changed: 14 additions & 4 deletions

File tree

metricbeat/docs/fields.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30340,6 +30340,13 @@ type: long
3034030340

3034130341
--
3034230342

30343+
*`elasticsearch.index.shards.primaries`*::
30344+
+
30345+
--
30346+
type: long
30347+
30348+
--
30349+
3034330350
*`elasticsearch.index.uuid`*::
3034430351
+
3034530352
--

metricbeat/module/elasticsearch/fields.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

metricbeat/module/elasticsearch/index/_meta/data.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
}
3232
},
3333
"shards": {
34-
"total": 1
34+
"total": 1,
35+
"primaries": 1
3536
},
3637
"status": "green",
3738
"total": {
@@ -89,4 +90,4 @@
8990
"address": "172.19.0.2:9200",
9091
"type": "elasticsearch"
9192
}
92-
}
93+
}

metricbeat/module/elasticsearch/index/_meta/fields.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
fields:
1414
- name: total
1515
type: long
16+
- name: primaries
17+
type: long
1618
- name: uuid
1719
type: keyword
1820
- name: status

metricbeat/module/elasticsearch/index/data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ type total struct {
113113

114114
type shardStats struct {
115115
Total int `json:"total"`
116-
Primaries int `json:"-"`
116+
Primaries int `json:"primaries"`
117117
Replicas int `json:"-"`
118118

119119
ActiveTotal int `json:"-"`

0 commit comments

Comments
 (0)