From 9146875f52163f324fbfca8a9f636e682a689daf Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Thu, 22 Aug 2024 10:22:03 -0600 Subject: [PATCH] [Stack Monitoring] Put `elasticsearch.node.stats.jvm.mem.pools.*` (#40571) This re-adds the pools to the `node_stats` metric set. --- CHANGELOG.next.asciidoc | 11 +--------- .../module/elasticsearch/node_stats/data.go | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index d1465e60197..9fe4b108ebb 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -55,6 +55,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - Remove fallback to the node limit for the `kubernetes.pod.cpu.usage.limit.pct` and `kubernetes.pod.memory.usage.limit.pct` metrics calculation - Add support for Kibana status metricset in v8 format {pull}40275[40275] - Update metrics for the vSphere Host metricset. {pull}40429[40429] +- Added back `elasticsearch.node.stats.jvm.mem.pools.*` to the `node_stats` metricset {pull}40571[40571] *Osquerybeat* @@ -356,13 +357,3 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] ==== Known Issues - - - - - - - - - - diff --git a/metricbeat/module/elasticsearch/node_stats/data.go b/metricbeat/module/elasticsearch/node_stats/data.go index f1986045660..2673baa3b06 100644 --- a/metricbeat/module/elasticsearch/node_stats/data.go +++ b/metricbeat/module/elasticsearch/node_stats/data.go @@ -46,6 +46,11 @@ var ( "pct": c.Int("heap_used_percent"), }, }, + "pools": c.Dict("pools", s.Schema{ + "young": c.Dict("young", poolSchema), + "survivor": c.Dict("survivor", poolSchema), + "old": c.Dict("old", poolSchema), + }), }), "gc": c.Dict("gc", s.Schema{ "collectors": c.Dict("collectors", s.Schema{ @@ -308,6 +313,21 @@ var ( }, } + poolSchema = s.Schema{ + "used": s.Object{ + "bytes": c.Int("used_in_bytes"), + }, + "max": s.Object{ + "bytes": c.Int("max_in_bytes"), + }, + "peak": s.Object{ + "bytes": c.Int("peak_used_in_bytes"), + }, + "peak_max": s.Object{ + "bytes": c.Int("peak_max_in_bytes"), + }, + } + totalMemoryPressureSchema = s.Schema{ "primary": s.Object{ "rejections": c.Int("primary_rejections"),