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

Change docker container field names to match ECS #10826

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add changelog
kaiyan-sheng committed Feb 19, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit f11f6ebaf9eb234f12e9ddef05b485b733d94565
2 changes: 1 addition & 1 deletion CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
@@ -292,7 +292,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Release AWS module as GA. {pull}10345[10345]
- Add overview dashboard to Zookeeper Metricbeat module {pull}10379[10379]
- Add Consul Metricbeat module with Agent Metricset {pull}8631[8631]
- Adjust docker container fields to ECS.
- Adjust docker container fields to ECS. {pull}10826[10826]

*Packetbeat*

4 changes: 3 additions & 1 deletion metricbeat/module/docker/container/container.go
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ package container

import (
"context"
"github.com/pkg/errors"

"github.com/elastic/beats/libbeat/logp"

@@ -45,7 +46,7 @@ type MetricSet struct {

// New creates a new instance of the docker container MetricSet.
func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
logger := logp.NewLogger("docker")
logger := logp.NewLogger("docker.container")
config := docker.DefaultConfig()
if err := base.Module().UnpackConfig(&config); err != nil {
return nil, err
@@ -70,6 +71,7 @@ func (m *MetricSet) Fetch(report mb.ReporterV2) {
// Fetch a list of all containers.
containers, err := m.dockerClient.ContainerList(context.Background(), types.ContainerListOptions{})
if err != nil {
err = errors.Wrap(err, "DockerClient ContainerList failed")
m.logger.Error(err.Error())
report.Error(err)
}