From 1f27f2ef9de229718fa479aab12d920a8a37a235 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Fri, 5 Jun 2020 12:50:28 -0700 Subject: [PATCH 1/3] user.id must be a string --- metricbeat/module/system/users/_meta/data.json | 2 +- metricbeat/module/system/users/users.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/metricbeat/module/system/users/_meta/data.json b/metricbeat/module/system/users/_meta/data.json index 5b96b10ba81..9db1f432d14 100644 --- a/metricbeat/module/system/users/_meta/data.json +++ b/metricbeat/module/system/users/_meta/data.json @@ -33,7 +33,7 @@ } }, "user": { - "id": 1000, + "id": "1000", "name": "alexk" } } \ No newline at end of file diff --git a/metricbeat/module/system/users/users.go b/metricbeat/module/system/users/users.go index ff6ad38fa70..11064c67eb0 100644 --- a/metricbeat/module/system/users/users.go +++ b/metricbeat/module/system/users/users.go @@ -21,6 +21,7 @@ package users import ( "net" + "strconv" "github.com/godbus/dbus" "github.com/pkg/errors" @@ -107,7 +108,7 @@ func eventMapping(conn *dbus.Conn, sessions []loginSession, report mb.ReporterV2 }, "user": common.MapStr{ "name": session.User, - "id": session.UID, + "id": strconv.Itoa(int(session.UID)), }, } From 7550f39e2f5dc1746924f45d02c19ab9dcf047c2 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Fri, 5 Jun 2020 13:17:30 -0700 Subject: [PATCH 2/3] changelog entry --- CHANGELOG.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 532faa78410..41b1cb7686f 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -227,6 +227,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix panic on `metricbeat test modules` when modules are configured in `metricbeat.modules`. {issue}18789[18789] {pull}18797[18797] - Fix getting gcp compute instance metadata with partial zone/region in config. {pull}18757[18757] - Add missing network.sent_packets_count metric into compute metricset in googlecloud module. {pull}18802[18802] +- Fix ECS compliance of user.id field in system/users metricset {pull}19019[19019] *Packetbeat* From f5b704a2e81e0d8b940c3435f29fe96b01ba4cc0 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Mon, 8 Jun 2020 09:30:15 -0700 Subject: [PATCH 3/3] make it a breaking change --- CHANGELOG.next.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 41b1cb7686f..dd191f0223e 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -58,6 +58,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Make use of secure port when accessing Kubelet API {pull}16063[16063] - Add Tomcat overview dashboard {pull}14026[14026] - Move service config under metrics and simplify metric types. {pull}18691[18691] +- Fix ECS compliance of user.id field in system/users metricset {pull}19019[19019] *Packetbeat* @@ -227,7 +228,6 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix panic on `metricbeat test modules` when modules are configured in `metricbeat.modules`. {issue}18789[18789] {pull}18797[18797] - Fix getting gcp compute instance metadata with partial zone/region in config. {pull}18757[18757] - Add missing network.sent_packets_count metric into compute metricset in googlecloud module. {pull}18802[18802] -- Fix ECS compliance of user.id field in system/users metricset {pull}19019[19019] *Packetbeat*