Skip to content

Commit

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

* changelog entry

* make it a breaking change
  • Loading branch information
fearful-symmetry authored and melchiormoulin committed Oct 14, 2020
1 parent 34d85ee commit 0f6f0e0
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 @@ -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*

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 0f6f0e0

Please sign in to comment.