From c99e9201841ea26ae8cd217ccc80d370a672058f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 14 Dec 2021 17:44:51 +0100 Subject: [PATCH] [8.0](backport #29094) Add `beat` field back to beat.stats (#29100) --- metricbeat/docs/fields.asciidoc | 36 +++++++++++++++++++ metricbeat/module/beat/fields.go | 2 +- metricbeat/module/beat/stats/_meta/fields.yml | 13 +++++++ .../system => module/beat}/test_beat.py | 0 4 files changed, 50 insertions(+), 1 deletion(-) rename metricbeat/{tests/system => module/beat}/test_beat.py (100%) diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index 2950337fcf0..9cc6092980e 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -8309,6 +8309,42 @@ type: keyword -- +*`beat.stats.beat.name`*:: ++ +-- +type: keyword + +-- + +*`beat.stats.beat.host`*:: ++ +-- +type: keyword + +-- + +*`beat.stats.beat.type`*:: ++ +-- +type: keyword + +-- + +*`beat.stats.beat.uuid`*:: ++ +-- +type: keyword + +-- + +*`beat.stats.beat.version`*:: ++ +-- +type: keyword + +-- + + *`beat.stats.system.cpu.cores`*:: + -- diff --git a/metricbeat/module/beat/fields.go b/metricbeat/module/beat/fields.go index b8ee153217a..03105135aaa 100644 --- a/metricbeat/module/beat/fields.go +++ b/metricbeat/module/beat/fields.go @@ -32,5 +32,5 @@ func init() { // AssetBeat returns asset data. // This is the base64 encoded zlib format compressed contents of module/beat. func AssetBeat() string { - return "eJzsXU1v5LgRvftXED5nBOxhLz4kQZAE2EsCBAvkEAQGrWZ3E5ZIDUl54v31gaRutT5YrJJEqnt3x5cZjEfvPRbJYvGzvrB38fnC3gR3T4w56Qrxwp7/Irh7fmLsIGxuZOWkVi/sj0+MMdb8ipX6UBfiiTEjCsGteGEn/sSYFc5JdbIv7D/P1hbPf2DPZ+eq5/82vztr415zrY7y9MKOvLDN90cpioN9aZG/MMVL0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E+xM7A2yEghHklk8/PzZzW4HpjSlREF/a1huZ7kh9ji5lFB9vmJwtlopO6M1QhQ+lshDqd4KVZSyO2ow1U8WH0npl1JZlhUQdSxbFsTWJyd5Y52tZQcMTGH9m1iI2dxSaHUac0acmrX2jD2r1L6c8PH1MSy4QBAeDdcWMxR4F+CH4JLY9QRILQYwZLWfMscMtbiM6YpVDb6QvxXiW16ldS1/u+G5DdR7Y25XODYyAPUfFujUwGhv/w/AAD//1Cnw20=" } diff --git a/metricbeat/module/beat/stats/_meta/fields.yml b/metricbeat/module/beat/stats/_meta/fields.yml index 19c0f75d715..56b598c7d05 100644 --- a/metricbeat/module/beat/stats/_meta/fields.yml +++ b/metricbeat/module/beat/stats/_meta/fields.yml @@ -232,6 +232,19 @@ type: keyword - name: version type: keyword + - name: beat + type: group + fields: + - name: name + type: keyword + - name: host + type: keyword + - name: type + type: keyword + - name: uuid + type: keyword + - name: version + type: keyword - name: system type: group fields: diff --git a/metricbeat/tests/system/test_beat.py b/metricbeat/module/beat/test_beat.py similarity index 100% rename from metricbeat/tests/system/test_beat.py rename to metricbeat/module/beat/test_beat.py