Skip to content

Commit

Permalink
metricbeat: add more node metrics in elasticseach module
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdisdu committed Oct 12, 2017
1 parent 10e87a0 commit a693143
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 29 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di

*Metricbeat*

- Rename `heap_init` field to `heap.init`. {pull}5320[5320]


*Packetbeat*

- Remove not-working `runoptions.uid` and `runoptions.gid` options in Packetbeat. {pull}5261[5261]
Expand Down
65 changes: 55 additions & 10 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2469,13 +2469,26 @@ node
[float]
=== `elasticsearch.node.jvm.memory.heap_init.bytes`
=== `elasticsearch.node.name`
type: long
type: keyword
format: bytes
Node name.
[float]
=== `elasticsearch.node.version`
type: keyword
Node version.
[float]
== jvm fields
JVM Info.
Heap init used by the JVM in bytes.
[float]
Expand All @@ -2487,19 +2500,51 @@ JVM version.
[float]
=== `elasticsearch.node.name`
=== `elasticsearch.node.jvm.memory.heap.init.bytes`
type: keyword
type: long
Node name.
format: bytes
Heap init used by the JVM in bytes.
[float]
=== `elasticsearch.node.version`
=== `elasticsearch.node.jvm.memory.heap.max.bytes`
type: keyword
type: long
Node version.
format: bytes
Heap max used by the JVM in bytes.
[float]
=== `elasticsearch.node.jvm.memory.nonheap.init.bytes`
type: long
format: bytes
Non-Heap init used by the JVM in bytes.
[float]
=== `elasticsearch.node.jvm.memory.nonheap.max.bytes`
type: long
format: bytes
Non-Heap max used by the JVM in bytes.
[float]
=== `elasticsearch.node.process.mlockall`
type: bool
If process locked in memory.
[float]
Expand Down
32 changes: 24 additions & 8 deletions metricbeat/module/elasticsearch/node/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,32 @@
"name": "elasticsearch"
},
"node": {
"jvm": {
"memory": {
"heap_init": {
"bytes": 536870912
"name": "8zgOwJ24TMamDDH9amWINQ",
"version": "6.0.0-alpha1",
"jvm":{
"version":"1.8.0_60",
"memory":{
"heap":{
"init":{
"bytes":268435456
},
"max":{
"bytes":1038876672
}
},
"nonheap":{
"init":{
"bytes":2555904
},
"max":{
"bytes":0
}
}
},
"version": "1.8.0_121"
},
"name": "8zgOwJ24TMamDDH9amWINQ",
"version": "6.0.0-alpha1"
"process":{
"mlockall":true
}
}
}
},
"metricset": {
Expand Down
42 changes: 33 additions & 9 deletions metricbeat/module/elasticsearch/node/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
description: >
node
fields:
- name: jvm.memory.heap_init.bytes
type: long
format: bytes
description: >
Heap init used by the JVM in bytes.
- name: jvm.version
type: keyword
description: >
JVM version.
- name: name
type: keyword
description: >
Expand All @@ -20,3 +11,36 @@
type: keyword
description: >
Node version.
- name: jvm
type: group
description: >
JVM Info.
fields:
- name: version
type: keyword
description: >
JVM version.
- name: memory.heap.init.bytes
type: long
format: bytes
description: >
Heap init used by the JVM in bytes.
- name: memory.heap.max.bytes
type: long
format: bytes
description: >
Heap max used by the JVM in bytes.
- name: memory.nonheap.init.bytes
type: long
format: bytes
description: >
Non-Heap init used by the JVM in bytes.
- name: memory.nonheap.max.bytes
type: long
format: bytes
description: >
Non-Heap max used by the JVM in bytes.
- name: process.mlockall
type: bool
description: >
If process locked in memory.
20 changes: 18 additions & 2 deletions metricbeat/module/elasticsearch/node/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,27 @@ var (
"jvm": c.Dict("jvm", s.Schema{
"version": c.Str("version"),
"memory": c.Dict("mem", s.Schema{
"heap_init": s.Object{
"bytes": c.Int("heap_init_in_bytes"),
"heap": s.Object{
"init": s.Object{
"bytes": c.Int("heap_init_in_bytes"),
},
"max": s.Object{
"bytes": c.Int("heap_max_in_bytes"),
},
},
"nonheap": s.Object{
"init": s.Object{
"bytes": c.Int("non_heap_init_in_bytes"),
},
"max": s.Object{
"bytes": c.Int("non_heap_max_in_bytes"),
},
},
}),
}),
"process": c.Dict("process", s.Schema{
"mlockall": c.Bool("mlockall"),
}),
}
)

Expand Down

0 comments on commit a693143

Please sign in to comment.