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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2783,9 +2783,7 @@ Event status
*`docker.event.id`*::
+
--
type: alias

alias to: event.id
type: keyword

Event id when available

Expand All @@ -2805,9 +2803,7 @@ Event source
*`docker.event.type`*::
+
--
type: alias

alias to: event.kind
type: keyword

The type of object emitting the event

Expand All @@ -2817,25 +2813,11 @@ The type of object emitting the event
*`docker.event.action`*::
+
--
type: alias

alias to: event.action
type: keyword

The type of event


--

*`docker.event.time`*::
+
--
type: alias

alias to: event.created

Timestamp of event


--

[float]
Expand Down
16 changes: 7 additions & 9 deletions metricbeat/module/docker/event/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@
},
"docker": {
"event": {
"action": "pull",
"actor": {
"attributes": {
"image": "busybox",
"name": "wizardly_knuth"
"name": "busybox"
},
"id": "9d4c3af1d4a0268940205aad04a3c6bf434b32f45e0784dec5c283201ef299fc"
"id": "busybox:latest"
},
"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

"status": "create"
"from": "",
"id": "busybox:latest",
"status": "pull",
"type": "image"
}
},
"event": {
"action": "create",
"created": "2019-01-03T12:44:52+01:00",
"dataset": "event",
"id": "9d4c3af1d4a0268940205aad04a3c6bf434b32f45e0784dec5c283201ef299fc",
"kind": "container",
"module": "docker"
},
"service": {
Expand Down
14 changes: 3 additions & 11 deletions metricbeat/module/docker/event/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,21 @@
description: >
Event status
- name: id
type: alias
path: event.id
type: keyword
description: >
Event id when available
- name: from
type: keyword
description: >
Event source
- name: type
type: alias
path: event.kind
type: keyword
description: >
The type of object emitting the event
- name: action
type: alias
path: event.action
type: keyword
description: >
The type of event
- name: time
type: alias
path: event.created
description: >
Timestamp of event
- name: actor
type: group
description: >
Expand Down
11 changes: 3 additions & 8 deletions metricbeat/module/docker/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,10 @@ func (m *MetricSet) reportEvent(reporter mb.PushReporterV2, event events.Message

reporter.Event(mb.Event{
Timestamp: time,
RootFields: common.MapStr{
"event": common.MapStr{
"kind": event.Type,
"action": event.Action,
"created": time,
"id": event.ID,
},
},
MetricSetFields: common.MapStr{
"id": event.ID,
"type": event.Type,
"action": event.Action,
"status": event.Status,
"from": event.From,
"actor": common.MapStr{
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/docker/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.