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.4: Fix conversions of events with module fields #13440

Merged
merged 3 commits into from
Aug 31, 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
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fix redis key metricset dashboard references to index pattern. {pull}13303[13303]
- Check if fields in DBInstance is nil in rds metricset. {pull}13294[13294] {issue}13037[13037]
- Fix silent failures in kafka and prometheus module. {pull}13353[13353] {issue}13252[13252]
- Fix module-level fields in Kubernetes metricsets. {pull}13433[13433]
- Fix panic in Redis Key metricset when collecting information from a removed key. {pull}13426[13426]

*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