Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Dec 1, 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/crawler.go
#	libbeat/cfgfile/reload_test.go
#	libbeat/cmd/instance/beat.go
#	libbeat/otelbeat/oteltest/oteltest.go
#	x-pack/filebeat/fbreceiver/receiver_test.go
@mergify mergify bot requested a review from a team as a code owner December 1, 2025 14:57
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Dec 1, 2025
@mergify mergify bot requested a review from a team as a code owner December 1, 2025 14:57
@mergify mergify bot requested review from andrzej-stencel and khushijain21 and removed request for a team December 1, 2025 14:57
@mergify
Copy link
Contributor Author

mergify bot commented Dec 1, 2025

Cherry-pick of e55e0be has failed:

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

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/diagnostics.go
	modified:   filebeat/beater/filebeat.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/template/load.go
	modified:   libbeat/template/load_integration_test.go
	modified:   libbeat/template/load_test.go
	modified:   metricbeat/beater/metricbeat.go
	modified:   x-pack/libbeat/cmd/instance/beat.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   filebeat/beater/crawler.go
	both modified:   libbeat/cfgfile/reload_test.go
	both modified:   libbeat/cmd/instance/beat.go
	both modified:   libbeat/otelbeat/oteltest/oteltest.go
	both modified:   x-pack/filebeat/fbreceiver/receiver_test.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 Dec 1, 2025
@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 Dec 1, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 1, 2025
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@mauri870
Copy link
Member

mauri870 commented Dec 3, 2025

/test

@swiatekm swiatekm self-requested a review December 3, 2025 15:59
@mauri870
Copy link
Member

mauri870 commented Dec 3, 2025

I fixed the conflicts with the PR, appreciate if I can get a secondary code review before merging.

@swiatekm swiatekm requested a review from leehinman December 3, 2025 16:35
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.

4 participants