Skip to content

Commit

Permalink
[elasticsearch module] serialize shards properties (#30408)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2571b52)
  • Loading branch information
klacabane authored and mergify-bot committed Feb 16, 2022
1 parent a531901 commit 9e7bd23
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29876,6 +29876,13 @@ type: long

--

*`elasticsearch.index.shards.primaries`*::
+
--
type: long

--

*`elasticsearch.index.uuid`*::
+
--
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.

5 changes: 3 additions & 2 deletions metricbeat/module/elasticsearch/index/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
}
},
"shards": {
"total": 1
"total": 1,
"primaries": 1
},
"status": "green",
"total": {
Expand Down Expand Up @@ -89,4 +90,4 @@
"address": "172.19.0.2:9200",
"type": "elasticsearch"
}
}
}
2 changes: 2 additions & 0 deletions metricbeat/module/elasticsearch/index/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
fields:
- name: total
type: long
- name: primaries
type: long
- name: uuid
type: keyword
- name: status
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/elasticsearch/index/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ type total struct {

type shardStats struct {
Total int `json:"total"`
Primaries int `json:"-"`
Primaries int `json:"primaries"`
Replicas int `json:"-"`

ActiveTotal int `json:"-"`
Expand Down

0 comments on commit 9e7bd23

Please sign in to comment.