Skip to content
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

Merged
merged 3 commits into from
Jan 18, 2019

Conversation

exekias
Copy link
Contributor

@exekias exekias commented Jan 15, 2019

Follow-up of #9856. We realized changing the event format from the original one may mislead users

@exekias exekias added review needs_backport PR is waiting to be backported to other branches. labels Jan 15, 2019
@exekias exekias requested a review from ruflin January 15, 2019 11:00
@exekias exekias requested review from a team as code owners January 15, 2019 11:00
"id": event.ID,
"type": event.Type,
"action": event.Action,
"time": event.Time,
Copy link
Contributor

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?

Copy link
Contributor Author

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:

?

Copy link
Member

@jsoriano jsoriano left a 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?

@exekias
Copy link
Contributor Author

exekias commented Jan 16, 2019

ouch, done!

},
"from": "busybox",
Copy link
Member

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?

Copy link
Contributor Author

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

@exekias exekias merged commit f0e0864 into elastic:master Jan 18, 2019
exekias added a commit to exekias/beats that referenced this pull request Jan 18, 2019
* Move back docker event fields to it's namespace
exekias added a commit that referenced this pull request Jan 22, 2019
* 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
@exekias exekias removed the needs_backport PR is waiting to be backported to other branches. label Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants