Skip to content

Commit

Permalink
Make user.id a string in system/users, in line with ECS (#19019) (#19204
Browse files Browse the repository at this point in the history
)

* user.id must be a string

* changelog entry

* make it a breaking change

(cherry picked from commit de57f06)
  • Loading branch information
fearful-symmetry authored Jun 30, 2020
1 parent 3350512 commit 415c6d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ field. You can revert this change by configuring tags for the module and omittin
- Update cloudwatch metricset mapping for both metrics and dimensions. {pull}15245[15245]
- Make use of secure port when accessing Kubelet API {pull}16063[16063]
- 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*

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/system/users/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
},
"user": {
"id": 1000,
"id": "1000",
"name": "alexk"
}
}
3 changes: 2 additions & 1 deletion metricbeat/module/system/users/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package users

import (
"net"
"strconv"

"github.com/godbus/dbus"
"github.com/pkg/errors"
Expand Down Expand Up @@ -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)),
},
}

Expand Down

0 comments on commit 415c6d1

Please sign in to comment.