Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 29, 2025

Proposed commit message

** For filebeatreceiver only **

Add a unique per filebeat receiver path variable. All other beats will use the global paths.Paths provided by elastic-agent-libs/paths

This is necessary for each filebeat receiver to have it's own registry in a separate directory.

This is not a complete fix for #44903 . The following paths still need to migrated to use the unique per beat path variable.

  • auditbeat/datastore/datastore.go
  • filebeat/autodiscover/builder/hints/logs.go
  • filebeat/cmd/generate.go
  • libbeat/processors/cache/cache.go
  • libbeat/processors/cache/file_store.go
  • libbeat/processors/script/javascript/javascript.go
  • libbeat/publisher/queue/diskqueue/config.go
  • metricbeat/beater/metricbeat.go
  • winlogbeat/beater/winlogbeat.go
  • x-pack/libbeat/persistentcache/persistentcache.go
  • x-pack/metricbeat/module/openai/usage/usage.go

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Unit Test

cd x-pack/filebeat/fbreceiver
go test . -run TestMultipleReceivers -count 1

By hand

  1. Build elastic-agent with this PR for beats dependency
  2. configure multiple filebeat receivers with different path.home
  3. restart multiple times
  4. verify that each filebeat receiver has it's own registry

Related issues

Use cases

Screenshots

Logs


This is an automatic backport of pull request #46779 done by [Mergify](https://mergify.com).

partial fix of global paths for filebeat receiver

(cherry picked from commit e55e0be)

# Conflicts:
#	filebeat/beater/diagnostics.go
#	filebeat/beater/filebeat.go
#	libbeat/cfgfile/reload_integration_test.go
#	libbeat/cmd/instance/beat.go
@mergify mergify bot added the backport label Sep 29, 2025
@mergify mergify bot requested a review from a team as a code owner September 29, 2025 15:54
@mergify mergify bot added the conflicts There is a conflict in the backported pull request label Sep 29, 2025
@mergify mergify bot requested a review from a team as a code owner September 29, 2025 15:54
@mergify mergify bot requested review from faec and khushijain21 and removed request for a team September 29, 2025 15:54
Copy link
Contributor Author

mergify bot commented Sep 29, 2025

Cherry-pick of e55e0be has failed:

On branch mergify/bp/9.1/pr-46779
Your branch is up to date with 'origin/9.1'.

You are currently cherry-picking commit e55e0bedd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   filebeat/autodiscover/builder/hints/logs.go
	modified:   filebeat/beater/crawler.go
	modified:   filebeat/beater/store.go
	modified:   filebeat/fileset/config.go
	modified:   filebeat/fileset/factory.go
	modified:   filebeat/fileset/fileset.go
	modified:   filebeat/fileset/fileset_test.go
	modified:   filebeat/fileset/modules.go
	modified:   filebeat/fileset/modules_integration_test.go
	modified:   filebeat/fileset/modules_test.go
	modified:   filebeat/fileset/setup.go
	modified:   filebeat/registrar/migrate.go
	modified:   heartbeat/beater/heartbeat.go
	modified:   libbeat/beat/beat.go
	modified:   libbeat/cfgfile/reload.go
	modified:   libbeat/cmd/export/ilm_policy.go
	modified:   libbeat/cmd/export/template.go
	modified:   libbeat/cmd/instance/keystore_fips.go
	modified:   libbeat/cmd/instance/keystore_fips_test.go
	modified:   libbeat/cmd/instance/keystore_nofips.go
	modified:   libbeat/cmd/instance/locks/lock.go
	modified:   libbeat/cmd/instance/locks/lock_test.go
	modified:   libbeat/idxmgmt/client_handler.go
	modified:   libbeat/otelbeat/oteltest/oteltest.go
	modified:   libbeat/template/load.go
	modified:   libbeat/template/load_integration_test.go
	modified:   libbeat/template/load_test.go
	modified:   metricbeat/beater/metricbeat.go
	modified:   x-pack/filebeat/fbreceiver/receiver_test.go
	modified:   x-pack/libbeat/cmd/instance/beat.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   filebeat/beater/diagnostics.go
	both modified:   filebeat/beater/filebeat.go
	both modified:   libbeat/cfgfile/reload_integration_test.go
	both modified:   libbeat/cmd/instance/beat.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 29, 2025
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions github-actions bot added Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Sep 29, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 29, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

Copy link
Contributor Author

mergify bot commented Oct 6, 2025

This pull request has not been merged yet. Could you please review and merge it @leehinman? 🙏

@leehinman
Copy link
Contributor

closing since #46402 did not get backported as well as others that would

@leehinman leehinman closed this Oct 6, 2025
@mergify mergify bot deleted the mergify/bp/9.1/pr-46779 branch October 6, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants