From e9e587b0bdbcdca947a386bc454055f78863450f Mon Sep 17 00:00:00 2001 From: Michal Pristas Date: Thu, 30 Apr 2020 15:13:09 +0200 Subject: [PATCH] [Elastic-Agent] Use /tmp for default monitoring endpoint location for libbeat (#18131) * default tmp socket * changelog * Update x-pack/elastic-agent/CHANGELOG.asciidoc Co-authored-by: Pier-Hugues Pellerin Co-authored-by: Pier-Hugues Pellerin --- x-pack/elastic-agent/CHANGELOG.asciidoc | 1 + .../pkg/core/plugin/app/monitoring/beats/monitoring.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/x-pack/elastic-agent/CHANGELOG.asciidoc b/x-pack/elastic-agent/CHANGELOG.asciidoc index bb57c61f03e..124695218bf 100644 --- a/x-pack/elastic-agent/CHANGELOG.asciidoc +++ b/x-pack/elastic-agent/CHANGELOG.asciidoc @@ -27,6 +27,7 @@ - Moved stream.* fields to top of event {pull}17858[17858] - Fix an issue where the checkin_frequency, jitter, and backoff options where not configurable. {pull}17843[17843] - Use default output by default {pull}18091[18091] +- Use /tmp for default monitoring endpoint location for libbeat {pull}18131[18131] ==== New features diff --git a/x-pack/elastic-agent/pkg/core/plugin/app/monitoring/beats/monitoring.go b/x-pack/elastic-agent/pkg/core/plugin/app/monitoring/beats/monitoring.go index 7e6b820611c..265ea4cda82 100644 --- a/x-pack/elastic-agent/pkg/core/plugin/app/monitoring/beats/monitoring.go +++ b/x-pack/elastic-agent/pkg/core/plugin/app/monitoring/beats/monitoring.go @@ -17,7 +17,7 @@ const ( logFileFormatWin = "%s\\logs\\%s\\%s" // args: pipeline name, application name - mbEndpointFileFormat = "unix://%s/run/%s/%s/%s.sock" + mbEndpointFileFormat = "unix:///tmp/elastic-agent/%s/%s/%s.sock" // args: pipeline name, application name mbEndpointFileFormatWin = `npipe:///%s-%s` ) @@ -27,7 +27,7 @@ func getMonitoringEndpoint(program, operatingSystem, pipelineID string) string { return fmt.Sprintf(mbEndpointFileFormatWin, pipelineID, program) } - return fmt.Sprintf(mbEndpointFileFormat, paths.Data(), pipelineID, program, program) + return fmt.Sprintf(mbEndpointFileFormat, pipelineID, program, program) } func getLoggingFile(program, operatingSystem, installPath, pipelineID string) string {