Skip to content

Commit

Permalink
Add elasticsearch node_stats metricset (#4014)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin authored and andrewkroh committed Apr 13, 2017
1 parent 4840c93 commit a9b5334
Show file tree
Hide file tree
Showing 15 changed files with 1,380 additions and 3 deletions.
151 changes: 151 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,157 @@ type: keyword
Node version.
[float]
== node_stats Fields
node_stats
[float]
=== elasticsearch.node_stats.name
type: keyword
Node name.
[float]
== jvm.mem.pools Fields
JVM memory pool stats
[float]
== old Fields
Old memory pool stats.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.old.max.bytes
type: long
format: bytes
Max bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.old.peak.bytes
type: long
format: bytes
Peak bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.old.peak_max.bytes
type: long
format: bytes
Peak max bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.old.used.bytes
type: long
format: bytes
Used bytes.
[float]
== young Fields
Young memory pool stats.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.young.max.bytes
type: long
format: bytes
Max bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.young.peak.bytes
type: long
format: bytes
Peak bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.young.peak_max.bytes
type: long
format: bytes
Peak max bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.young.used.bytes
type: long
format: bytes
Used bytes.
[float]
== survivor Fields
Survivor memory pool stats.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.survivor.max.bytes
type: long
format: bytes
Max bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.survivor.peak.bytes
type: long
format: bytes
Peak bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.survivor.peak_max.bytes
type: long
format: bytes
Peak max bytes.
[float]
=== elasticsearch.node_stats.jvm.mem.pools.survivor.used.bytes
type: long
format: bytes
Used bytes.
[float]
== stats Fields
Expand Down
6 changes: 5 additions & 1 deletion metricbeat/docs/modules/elasticsearch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
#- module: elasticsearch
# metricsets: ["node", "stats"]
# metricsets: ["node", "node_stats", "stats"]
# enabled: true
# period: 10s
# hosts: ["localhost:9200"]
Expand All @@ -32,9 +32,13 @@ The following metricsets are available:

* <<metricbeat-metricset-elasticsearch-node,node>>

* <<metricbeat-metricset-elasticsearch-node_stats,node_stats>>

* <<metricbeat-metricset-elasticsearch-stats,stats>>

include::elasticsearch/node.asciidoc[]

include::elasticsearch/node_stats.asciidoc[]

include::elasticsearch/stats.asciidoc[]

19 changes: 19 additions & 0 deletions metricbeat/docs/modules/elasticsearch/node_stats.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-metricset-elasticsearch-node_stats]]
include::../../../module/elasticsearch/node_stats/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-elasticsearch,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/elasticsearch/node_stats/_meta/data.json[]
----
1 change: 1 addition & 0 deletions metricbeat/include/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
_ "github.com/elastic/beats/metricbeat/module/docker/network"
_ "github.com/elastic/beats/metricbeat/module/elasticsearch"
_ "github.com/elastic/beats/metricbeat/module/elasticsearch/node"
_ "github.com/elastic/beats/metricbeat/module/elasticsearch/node_stats"
_ "github.com/elastic/beats/metricbeat/module/elasticsearch/stats"
_ "github.com/elastic/beats/metricbeat/module/golang"
_ "github.com/elastic/beats/metricbeat/module/golang/expvar"
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/metricbeat.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ metricbeat.modules:

#---------------------------- elasticsearch Module ---------------------------
#- module: elasticsearch
# metricsets: ["node", "stats"]
# metricsets: ["node", "node_stats", "stats"]
# enabled: true
# period: 10s
# hosts: ["localhost:9200"]
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/elasticsearch/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#- module: elasticsearch
# metricsets: ["node", "stats"]
# metricsets: ["node", "node_stats", "stats"]
# enabled: true
# period: 10s
# hosts: ["localhost:9200"]
Expand Down
67 changes: 67 additions & 0 deletions metricbeat/module/elasticsearch/node_stats/_meta/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"@timestamp": "2016-05-23T08:05:34.853Z",
"beat": {
"hostname": "host.example.com",
"name": "host.example.com"
},
"elasticsearch": {
"node_stats": {
"jvm": {
"mem": {
"pools": {
"old": {
"max": {
"bytes": 362414080
},
"peak": {
"bytes": 212130904
},
"peak_max": {
"bytes": 362414080
},
"used": {
"bytes": 154487944
}
},
"survivor": {
"max": {
"bytes": 17432576
},
"peak": {
"bytes": 17432576
},
"peak_max": {
"bytes": 17432576
},
"used": {
"bytes": 7878680
}
},
"young": {
"max": {
"bytes": 139591680
},
"peak": {
"bytes": 139591680
},
"peak_max": {
"bytes": 139591680
},
"used": {
"bytes": 100266128
}
}
}
}
},
"name": "4Il1NmqoQEi-x8a50GNUIw"
}
},
"metricset": {
"host": "elasticsearch:9200",
"module": "elasticsearch",
"name": "node_stats",
"rtt": 115
},
"type": "metricsets"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
=== elasticsearch node_stats MetricSet

This is the node_stats metricset of the module elasticsearch. It fetches data from `/_nodes/_local/stats`. The data received is only for the local node so this metricset has to be run on each elasticsearch node.
89 changes: 89 additions & 0 deletions metricbeat/module/elasticsearch/node_stats/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
- name: node_stats
type: group
description: >
node_stats
fields:
- name: name
type: keyword
description: >
Node name.
- name: jvm.mem.pools
type: group
description: >
JVM memory pool stats
fields:
- name: old
type: group
description: >
Old memory pool stats.
fields:
- name: max.bytes
type: long
format: bytes
description:
Max bytes.
- name: peak.bytes
type: long
format: bytes
description:
Peak bytes.
- name: peak_max.bytes
type: long
format: bytes
description:
Peak max bytes.
- name: used.bytes
type: long
format: bytes
description:
Used bytes.
- name: young
type: group
description: >
Young memory pool stats.
fields:
- name: max.bytes
type: long
format: bytes
description:
Max bytes.
- name: peak.bytes
type: long
format: bytes
description:
Peak bytes.
- name: peak_max.bytes
type: long
format: bytes
description:
Peak max bytes.
- name: used.bytes
type: long
format: bytes
description:
Used bytes.
- name: survivor
type: group
description: >
Survivor memory pool stats.
fields:
- name: max.bytes
type: long
format: bytes
description:
Max bytes.
- name: peak.bytes
type: long
format: bytes
description:
Peak bytes.
- name: peak_max.bytes
type: long
format: bytes
description:
Peak max bytes.
- name: used.bytes
type: long
format: bytes
description:
Used bytes.
Loading

0 comments on commit a9b5334

Please sign in to comment.