Skip to content

Commit 6f0b907

Browse files
Fix docker provider add_fields processors (#1420) (#1432)
The Docker provider was using a wrong key when defining the `add_fields` processor, this causes Filebeat not to start the input and stay on a unhealthy state. This commig fixes it. Fixes elastic/beats#29030 (cherry picked from commit 2223138) Co-authored-by: Tiago Queiroz <[email protected]>
1 parent 81c508c commit 6f0b907

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: bug-fix
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Fix docker provider add_fields processors
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
#description:
19+
20+
# Affected component; a word indicating the component this changeset affects.
21+
component: providers
22+
23+
# PR number; optional; the PR number that added the changeset.
24+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
25+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
26+
# Please provide it if you are adding a fragment for a different PR.
27+
#pr: 1234
28+
29+
# Issue number; optional; the GitHub issue related to this changeset (either closes or is part of).
30+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
31+
#issue: 1234

internal/pkg/composable/providers/docker/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func generateData(event bus.Event) (*dockerContainerData, error) {
149149
"image": container.Image,
150150
"labels": processorLabelMap,
151151
},
152-
"to": "container",
152+
"target": "container",
153153
},
154154
},
155155
},

internal/pkg/composable/providers/docker/docker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestGenerateData(t *testing.T) {
5353
"co_elastic_logs/disable": "true",
5454
},
5555
},
56-
"to": "container",
56+
"target": "container",
5757
},
5858
},
5959
}

0 commit comments

Comments
 (0)