WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit a38d38f

Browse files
set path.home for beat receivers to be components dir (#11726) (#11735)
(cherry picked from commit 7096b95) Co-authored-by: Lee E Hinman <[email protected]>
1 parent 83cde33 commit a38d38f

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# REQUIRED
2+
# Kind can be one of:
3+
# - breaking-change: a change to previously-documented behavior
4+
# - deprecation: functionality that is being removed in a later release
5+
# - bug-fix: fixes a problem in a previous version
6+
# - enhancement: extends functionality but does not break or fix existing behavior
7+
# - feature: new functionality
8+
# - known-issue: problems that we are aware of in a given version
9+
# - security: impacts on the security of a product or a user’s deployment.
10+
# - upgrade: important information for someone upgrading from a prior version
11+
# - other: does not fit into any of the other categories
12+
kind: bug-fix
13+
14+
# REQUIRED for all kinds
15+
# Change summary; a 80ish characters long description of the change.
16+
summary: set path.home for beat receivers to components directory
17+
18+
# REQUIRED for breaking-change, deprecation, known-issue
19+
# Long description; in case the summary is not enough to describe the change
20+
# this field accommodate a description without length limits.
21+
# description:
22+
23+
# REQUIRED for breaking-change, deprecation, known-issue
24+
# impact:
25+
26+
# REQUIRED for breaking-change, deprecation, known-issue
27+
# action:
28+
29+
# REQUIRED for all kinds
30+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
31+
component: elastic-agent
32+
33+
# AUTOMATED
34+
# OPTIONAL to manually add other PR URLs
35+
# PR URL: A link the PR that added the changeset.
36+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
37+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
38+
# Please provide it if you are adding a fragment for a different PR.
39+
# pr: https://github.com/owner/repo/1234
40+
pr: https://github.com/elastic/elastic-agent/pull/11726
41+
42+
# AUTOMATED
43+
# OPTIONAL to manually add other issue URLs
44+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
45+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
46+
# issue: https://github.com/owner/repo/1234
47+
issue: https://github.com/elastic/beats/issues/48010

internal/pkg/otel/translate/otelconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ func getReceiversConfigForComponent(
305305
},
306306
// just like we do for beats processes, each receiver needs its own data path
307307
"path": map[string]any{
308+
"home": paths.Components(),
308309
"data": BeatDataPath(comp.ID),
309310
},
310311
// adds additional context on logs emitted by beatreceivers to uniquely identify per component logs
@@ -647,7 +648,6 @@ func BeatDataPath(componentId string) string {
647648
// getBeatsAuthExtensionConfig sets http transport settings on beatsauth
648649
// currently this is only supported for elasticsearch output
649650
func getBeatsAuthExtensionConfig(outputCfg *config.C) (map[string]any, error) {
650-
651651
authSettings := beatsauthextension.BeatsAuthConfig{
652652
Transport: elasticsearch.ESDefaultTransportSettings(),
653653
}

internal/pkg/otel/translate/otelconfig_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ func TestGetOtelConfig(t *testing.T) {
411411
"otelconsumer": map[string]any{},
412412
},
413413
"path": map[string]any{
414+
"home": paths.Components(),
414415
"data": filepath.Join(paths.Run(), id),
415416
},
416417
"queue": map[string]any{
@@ -747,6 +748,7 @@ func TestGetOtelConfig(t *testing.T) {
747748
"otelconsumer": map[string]any{},
748749
},
749750
"path": map[string]any{
751+
"home": paths.Components(),
750752
"data": filepath.Join(paths.Run(), "beat-metrics-monitoring"),
751753
},
752754
"queue": map[string]any{
@@ -858,6 +860,7 @@ func TestGetOtelConfig(t *testing.T) {
858860
"otelconsumer": map[string]any{},
859861
},
860862
"path": map[string]any{
863+
"home": paths.Components(),
861864
"data": filepath.Join(paths.Run(), "system-metrics"),
862865
},
863866
"queue": map[string]any{

0 commit comments

Comments
 (0)