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

Cherry-pick #13433 to 7.2: Fix conversions of events with module fields #13442

Merged
merged 3 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ https://github.com/elastic/beats/compare/v7.2.0...7.2[Check the HEAD diff]
*Metricbeat*

- Print errors that were being omitted in vSphere metricsets {pull}12816[12816]
- Fix module-level fields in Kubernetes metricsets. {pull}13433[13433]

*Packetbeat*

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/kubernetes/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (m *MetricSet) Fetch(reporter mb.ReporterV2) {
m.enricher.Enrich(events)

for _, e := range events {
reporter.Event(mb.Event{MetricSetFields: e})
reporter.Event(mb.TransformMapStrToEvent("kubernetes", e, nil))
}

return
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/kubernetes/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (m *MetricSet) Fetch(reporter mb.ReporterV2) {

m.enricher.Enrich([]common.MapStr{event})

reporter.Event(mb.Event{MetricSetFields: event})
reporter.Event(mb.TransformMapStrToEvent("kubernetes", event, nil))

return
}
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/kubernetes/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (m *MetricSet) Fetch(reporter mb.ReporterV2) {
m.enricher.Enrich(events)

for _, e := range events {
reporter.Event(mb.Event{MetricSetFields: e})
reporter.Event(mb.TransformMapStrToEvent("kubernetes", e, nil))
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/kubernetes/system/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (m *MetricSet) Fetch(reporter mb.ReporterV2) {
}

for _, e := range events {
reporter.Event(mb.Event{MetricSetFields: e})
reporter.Event(mb.TransformMapStrToEvent("kubernetes", e, nil))
}
return
}
2 changes: 1 addition & 1 deletion metricbeat/module/kubernetes/volume/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (m *MetricSet) Fetch(reporter mb.ReporterV2) {

events, err := eventMapping(body)
for _, e := range events {
reporter.Event(mb.Event{MetricSetFields: e})
reporter.Event(mb.TransformMapStrToEvent("kubernetes", e, nil))
}

return
Expand Down