elastic / elastic/fleet-server
Remote output health improvements
- Dominant language
- Go
- Stars
- 113
- Forks
- 117
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 112
Description
**Describe the enhancement:**
Currently remote output health is reported (when `updateState` is called) in the policy-self monitor:
https://github.com/elastic/fleet-server/blob/cf41f38c419921dd19ef6b0087e5abc0826a34f0/internal/pkg/policy/self.go#L262-L264
This creates a document in the primary ES instance with the output health status:
https://github.com/elastic/fleet-server/blob/cf41f38c419921dd19ef6b0087e5abc0826a34f0/internal/pkg/dl/output_health.go#L17-L41.
However policy self monitor may not be a good place to have these updates as the output bulker health signal is not actually used by the monitor.
Additionally gathering a reference to all bulkers may cause some concurrency issues as seen in https://github.com/elastic/fleet-server/issues/4170.
We may want to have remote bulkers start a heartbeat goroutine that would use the primary bulker to write their status directly; This would address both issues.
Contributor guide
Assessment
This issue has not been assessed yet.