-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add docker event
metricset
#9856
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6e8ed83
Add docker `event` metricset
be75f8b
Add tests
8f647ab
Update changelog
a9b753e
Add missing header
820c7b1
Add missing file
9366732
Adapt to ECS
6bb547f
Use a cheaper event for tests
1eea2a7
Close docker client on module shutdown
ed19c9e
Update data
a819932
clean created container
8a490c8
fix image pull
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//// | ||
This file is generated! See scripts/docs_collector.py | ||
//// | ||
|
||
[[metricbeat-metricset-docker-event]] | ||
=== Docker event metricset | ||
|
||
include::../../../module/docker/event/_meta/docs.asciidoc[] | ||
|
||
|
||
==== Fields | ||
|
||
For a description of each field in the metricset, see the | ||
<<exported-fields-docker,exported fields>> section. | ||
|
||
Here is an example document generated by this metricset: | ||
|
||
[source,json] | ||
---- | ||
include::../../../module/docker/event/_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
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
- "container" | ||
- "cpu" | ||
- "diskio" | ||
- "event" | ||
- "healthcheck" | ||
- "info" | ||
#- "image" | ||
|
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
# - container | ||
# - cpu | ||
# - diskio | ||
# - event | ||
# - healthcheck | ||
# - info | ||
# - memory | ||
|
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,31 @@ | ||
{ | ||
"@timestamp": "2017-10-12T08:05:34.853Z", | ||
"agent": { | ||
"hostname": "host.example.com", | ||
"name": "host.example.com" | ||
}, | ||
"docker": { | ||
"event": { | ||
"actor": { | ||
"attributes": { | ||
"image": "busybox", | ||
"name": "wizardly_knuth" | ||
}, | ||
"id": "9d4c3af1d4a0268940205aad04a3c6bf434b32f45e0784dec5c283201ef299fc" | ||
}, | ||
"from": "busybox", | ||
"status": "create" | ||
} | ||
}, | ||
"event": { | ||
"action": "create", | ||
"created": "2019-01-03T12:44:52+01:00", | ||
"dataset": "event", | ||
"id": "9d4c3af1d4a0268940205aad04a3c6bf434b32f45e0784dec5c283201ef299fc", | ||
"kind": "container", | ||
"module": "docker" | ||
}, | ||
"service": { | ||
"type": "docker" | ||
} | ||
} |
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 @@ | ||
This is the event metricset of the module docker. |
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,52 @@ | ||
- name: event | ||
type: group | ||
description: > | ||
Docker event | ||
release: ga | ||
fields: | ||
- name: status | ||
type: keyword | ||
description: > | ||
Event status | ||
- name: id | ||
type: alias | ||
path: event.id | ||
migration: true | ||
description: > | ||
Event id when available | ||
- name: from | ||
type: keyword | ||
description: > | ||
Event source | ||
- name: type | ||
type: alias | ||
path: event.kind | ||
migration: true | ||
description: > | ||
The type of object emitting the event | ||
- name: action | ||
type: alias | ||
path: event.action | ||
migration: true | ||
description: > | ||
The type of event | ||
- name: time | ||
type: alias | ||
path: event.created | ||
migration: true | ||
description: > | ||
Timestamp of event | ||
- name: actor | ||
type: group | ||
description: > | ||
Actor | ||
fields: | ||
- name: id | ||
type: keyword | ||
description: > | ||
The ID of the object emitting the event | ||
- name: attributes | ||
type: object | ||
object_type: keyword | ||
description: > | ||
Various key/value attributes of the object, depending on its type |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You set migration: true here. Is this an alias we only want to be enabled if migration is enabled or have it always? Same for the other aliases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want it to stay, I'm guessing I should not have put migration there 😇 ? I can open a PR to remove them 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, otherwise they will disappear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@exekias BTW this is a more general discussion if we want to have fields in ECS only or also the "original" name around.