Description
Describe the enhancement:
Currently remote output health is reported (when updateState
is called) in the policy-self monitor:
fleet-server/internal/pkg/policy/self.go
Lines 262 to 264 in cf41f38
This creates a document in the primary ES instance with the output health status:
fleet-server/internal/pkg/dl/output_health.go
Lines 17 to 41 in cf41f38
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 #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.