-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Central management for hb #9254
Conversation
1558941
to
bcbf5a5
Compare
bcbf5a5
to
2e1f4de
Compare
This patch adds support for CM features and documents them as well.
2e1f4de
to
556f986
Compare
@@ -82,6 +84,10 @@ func (bt *Heartbeat) Run(b *beat.Beat) error { | |||
return err | |||
} | |||
|
|||
if b.ConfigManager.Enabled() { | |||
bt.RunCentralMgmtMonitors(b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not registering these always? I'm wondering if there could be a timing issue here, something like:
- Central Management fetches configs and calls reload,
heartbeat.monitors
is not yet registered - This code registers the reloadable after that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I just copied from https://github.com/elastic/beats/blob/master/metricbeat/beater/metricbeat.go#L109 but if it isn't necessary I'm glad to remove the conditional.
Is that safe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked how it's done in Metricbeat and it could have the same issue, I'm guessing that even in the improbable case of this happening, it would be fixed by the next pass on config apply. 👍 to leave it like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM but see comment from @exekias
Let's make sure we test this manually as soon as KB PR is also merged.
@exekias @ruflin I've added another commit that removes the CM docs from this patch. Thinking about it, Heartbeat will be administered from a dedicated Uptime UI, not CM, so those docs don't apply. Documenting this is premature. For now, I believe, we should leave the UI experience undocumented till we're further along. Perhaps we should only merge this into master now until we have a story there. |
Pinging @elastic/uptime |
Adds central management to heartbeat. Works together with elastic/kibana#26219