Cherry-pick #9856 to 6.x: Add docker event metricset#9962
Merged
exekias merged 4 commits intoelastic:6.xfrom Jan 22, 2019
Merged
Cherry-pick #9856 to 6.x: Add docker event metricset#9962exekias merged 4 commits intoelastic:6.xfrom
event metricset#9962exekias merged 4 commits intoelastic:6.xfrom
Conversation
Contributor
Author
|
tests are failing because some ECS fields are not present in 6.x, currently investigating |
Contributor
Author
|
I will remove aliases from this change for the backport |
Contributor
|
@exekias Great. After thinking a bit more about this I suggest to also open a PR against master and remove them there too. |
* Add docker `event` metricset
This metricset will retrieve events coming from the Docker events
API [0].
Example output:
```
"docker": {
"event": {
"id": "8c229155b039c2adcb4fab1f987f35a0d1f913dfaa95f3113ed6e4f91eb5398c",
"from": "busybox",
"type": "container",
"action": "die",
"actor": {
"id": "8c229155b039c2adcb4fab1f987f35a0d1f913dfaa95f3113ed6e4f91eb5398c",
"attributes": {
"image": "busybox",
"name": "distracted_lichterman",
"exitCode": "0"
}
},
"time": "2019-01-02T22:41:02.000Z",
"status": "die"
}
}
```
Actor attributes will container labels in the case of container
events, the module will perform dedotting (if enabled) on them.
[0] https://docs.docker.com/engine/api/v1.37/#operation/SystemEvents
* Add tests
* Update changelog
* Add missing header
* Add missing file
* Adapt to ECS
* Use a cheaper event for tests
* Close docker client on module shutdown
* Update data
* clean created container
* fix image pull
(cherry picked from commit eef102d)
* Move back docker event fields to it's namespace
55e2a2e to
7cf5981
Compare
Contributor
Author
|
updated to include #10073 |
ruflin
approved these changes
Jan 21, 2019
Contributor
|
jenkins, test this |
Contributor
Author
|
jenkins, test this please |
ruflin
approved these changes
Jan 22, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cherry-pick of PR #9856 to 6.x branch. Original message:
This metricset will retrieve events coming from the Docker events
API [0].
Example output:
Actor attributes will contain labels in the case of container
events, the module will perform dedotting (if enabled) on them.
[0] https://docs.docker.com/engine/api/v1.37/#operation/SystemEvents
closes #6799