Move back docker event fields to it's namespace#10073
Move back docker event fields to it's namespace#10073exekias merged 3 commits intoelastic:masterfrom
Conversation
| "id": event.ID, | ||
| "type": event.Type, | ||
| "action": event.Action, | ||
| "time": event.Time, |
There was a problem hiding this comment.
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.
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
jsoriano
left a comment
There was a problem hiding this comment.
LGTM, could you also update data.json?
|
ouch, done! |
| "id": "9d4c3af1d4a0268940205aad04a3c6bf434b32f45e0784dec5c283201ef299fc" | ||
| "id": "busybox:latest" | ||
| }, | ||
| "from": "busybox", |
There was a problem hiding this comment.
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.
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