Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metricbeat] Add a system/users metricset #16569

Merged
merged 25 commits into from
Mar 6, 2020

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Feb 25, 2020

What is this?

This PR adds a new metricset, system/users, that uses login1 and dbus to report on user sessions, complete with remote IPs, user IDs, and root PIDs.

How do I test it?

  • After you pull down and build, just run on a modern linux distro that uses systemd to manage user sessions.

TODO

  • Clean up dependencies
  • Figure out testing

@fearful-symmetry fearful-symmetry added the Team:Integrations Label for the Integrations team label Feb 25, 2020
@fearful-symmetry fearful-symmetry requested a review from a team February 25, 2020 16:20
@fearful-symmetry fearful-symmetry self-assigned this Feb 25, 2020
@fearful-symmetry fearful-symmetry added the needs_backport PR is waiting to be backported to other branches. label Feb 25, 2020
@fearful-symmetry
Copy link
Contributor Author

jenkins, test this

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Tested it out on Ubuntu 19.10, works as described.

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but there are some small things we could fix before merging.

metricbeat/module/system/users/_meta/docs.asciidoc Outdated Show resolved Hide resolved
metricbeat/module/system/users/users.go Outdated Show resolved Hide resolved
metricbeat/module/system/users/users.go Outdated Show resolved Hide resolved
metricbeat/module/system/users/dbus.go Outdated Show resolved Hide resolved
metricbeat/module/system/users/dbus.go Outdated Show resolved Hide resolved
metricbeat/module/system/users/dbus.go Show resolved Hide resolved
@fearful-symmetry fearful-symmetry requested review from a team as code owners March 5, 2020 14:58
@fearful-symmetry fearful-symmetry removed request for a team March 5, 2020 14:59
@fearful-symmetry fearful-symmetry force-pushed the users-metricset branch 2 times, most recently from 1453622 to 7df7184 Compare March 5, 2020 15:13
@fearful-symmetry fearful-symmetry merged commit a034a92 into elastic:master Mar 6, 2020
fearful-symmetry added a commit to fearful-symmetry/beats that referenced this pull request Mar 9, 2020
* fix file check bug, deal with logging

* init commit of users metricset

* vendor new sub-systemd dep

* refactor dbus calling code

* Revert "vendor new sub-systemd dep"

This reverts commit a1ddc9e.

* make fmt

* cleanup, fix tests

* fix cross-compile issues

* update docs

* code quality cleanup

* make update

* fix deps, update vendor

* update notice

* add changelog

* fix changelog, add example config

(cherry picked from commit a034a92)
@fearful-symmetry fearful-symmetry added v7.7.0 and removed needs_backport PR is waiting to be backported to other branches. labels Mar 9, 2020
fearful-symmetry added a commit that referenced this pull request Mar 10, 2020
…16905)

* [Metricbeat] Add a system/users metricset (#16569)

* fix file check bug, deal with logging

* init commit of users metricset

* vendor new sub-systemd dep

* refactor dbus calling code

* Revert "vendor new sub-systemd dep"

This reverts commit a1ddc9e.

* make fmt

* cleanup, fix tests

* fix cross-compile issues

* update docs

* code quality cleanup

* make update

* fix deps, update vendor

* update notice

* add changelog

* fix changelog, add example config

(cherry picked from commit a034a92)

* make update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Integrations Label for the Integrations team v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants