forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Metricbeat] Add a system/users metricset (elastic#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
- Loading branch information
1 parent
a9a2779
commit a034a92
Showing
60 changed files
with
6,923 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//// | ||
This file is generated! See scripts/mage/docs_collector.go | ||
//// | ||
|
||
[[metricbeat-metricset-system-users]] | ||
=== System users metricset | ||
|
||
beta[] | ||
|
||
include::../../../module/system/users/_meta/docs.asciidoc[] | ||
|
||
|
||
==== Fields | ||
|
||
For a description of each field in the metricset, see the | ||
<<exported-fields-system,exported fields>> section. | ||
|
||
Here is an example document generated by this metricset: | ||
|
||
[source,json] | ||
---- | ||
include::../../../module/system/users/_meta/data.json[] | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"@timestamp": "2017-10-12T08:05:34.853Z", | ||
"event": { | ||
"dataset": "system.users", | ||
"duration": 115000, | ||
"module": "system" | ||
}, | ||
"metricset": { | ||
"name": "users", | ||
"period": 10000 | ||
}, | ||
"process": { | ||
"pid": 10786 | ||
}, | ||
"service": { | ||
"type": "system" | ||
}, | ||
"source": { | ||
"ip": "192.168.1.86" | ||
}, | ||
"system": { | ||
"users": { | ||
"id": 6, | ||
"leader": 10786, | ||
"path": "/org/freedesktop/login1/session/_36", | ||
"remote": true, | ||
"remote_host": "192.168.1.86", | ||
"scope": "session-6.scope", | ||
"seat": "", | ||
"service": "sshd", | ||
"state": "active", | ||
"type": "tty" | ||
} | ||
}, | ||
"user": { | ||
"id": 1000, | ||
"name": "alexk" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
The system/users metricset reports logged in users and associated sessions via dbus and logind, which is a systemd component. By default, the metricset will look in `/var/run/dbus/` for a system socket, although a new path can be selected with `DBUS_SYSTEM_BUS_ADDRESS`. | ||
|
||
This metricset is available on: | ||
|
||
- Linux | ||
[float] | ||
=== Configuration | ||
|
||
There are no configuration options for this metricset. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
- name: users | ||
type: group | ||
release: beta | ||
description: > | ||
Logged-in user session data | ||
fields: | ||
- name: id | ||
type: keyword | ||
description: > | ||
The ID of the session | ||
- name: seat | ||
type: keyword | ||
description: > | ||
An associated logind seat | ||
- name: path | ||
type: keyword | ||
description: > | ||
The DBus object path of the session | ||
- name: type | ||
type: keyword | ||
description: > | ||
The type of the user session | ||
- name: service | ||
type: keyword | ||
description: > | ||
A session associated with the service | ||
- name: remote | ||
type: boolean | ||
description: > | ||
A bool indicating a remote session | ||
- name: state | ||
type: keyword | ||
description: > | ||
The current state of the session | ||
- name: scope | ||
type: keyword | ||
description: > | ||
The associated systemd scope | ||
- name: leader | ||
type: long | ||
description: > | ||
The root PID of the session | ||
- name: remote_host | ||
type: keyword | ||
description: > | ||
A remote host address for the session | ||
Oops, something went wrong.