Skip to content

Commit

Permalink
Move back docker event fields to it's namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Pérez-Aradros Herce committed Jan 15, 2019
1 parent 7972a7e commit 48d2295
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 29 deletions.
16 changes: 4 additions & 12 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,9 +2813,7 @@ The type of object emitting the event
*`docker.event.action`*::
+
--
type: alias
alias to: event.action
type: keyword
The type of event
Expand All @@ -2829,9 +2823,7 @@ The type of event
*`docker.event.time`*::
+
--
type: alias
alias to: event.created
type: date
Timestamp of event
Expand Down
12 changes: 4 additions & 8 deletions metricbeat/module/docker/event/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,23 @@
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
type: date
description: >
Timestamp of event
- name: actor
Expand Down
12 changes: 4 additions & 8 deletions metricbeat/module/docker/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,11 @@ 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,
"time": event.Time,
"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.

0 comments on commit 48d2295

Please sign in to comment.