-
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
Move back docker event fields to it's namespace #10073
Conversation
"id": event.ID, | ||
"type": event.Type, | ||
"action": event.Action, | ||
"time": event.Time, |
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.
time
is probably the one I would move to ECS. I wonder if this should even be @timestamp
?
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, I will just remove it from here, as it's already reported under @timestamp here:
beats/metricbeat/module/docker/event/event.go
Line 124 in 48d2295
Timestamp: time, |
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.
LGTM, could you also update data.json
?
ouch, done! |
}, | ||
"from": "busybox", |
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.
The description of this field is Event source
, but here it seemed to contain an image on create 🤔
Can it be the image used when creating a container or building an image?
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, it takes many forms, you also get events when creating a network, so this field is not always a image
* Move back docker event fields to it's namespace
* Add docker `event` metricset (#9856) * 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) * Disable migration in docker event fields (#9947) * Move back docker event fields to it's namespace (#10073) * Move back docker event fields to it's namespace
Follow-up of #9856. We realized changing the event format from the original one may mislead users