Cherry-pick #8023 to 6.x: Heartbeat Automatic Reload#8315
Merged
andrewvc merged 1 commit intoelastic:6.xfrom Sep 17, 2018
Merged
Cherry-pick #8023 to 6.x: Heartbeat Automatic Reload#8315andrewvc merged 1 commit intoelastic:6.xfrom
andrewvc merged 1 commit intoelastic:6.xfrom
Conversation
Add automatic reloading for heartbeat config files. This deprecates the `watch.poll_file` options. This patch also fixes a potential source of races in code using `cfgfile/Runner` by making that interface implement `Stringer`, the reason being that by default `cfgfile/Runner` can recursively print the backing structure, which can trigger a race. (cherry picked from commit 037a4f2)
houndci-bot
reviewed
Sep 14, 2018
| return fmt.Sprintf("Monitor not loaded, plugin is disabled") | ||
| } | ||
|
|
||
| type MonitorPluginInfo struct { |
There was a problem hiding this comment.
exported type MonitorPluginInfo should have comment or be unexported
| "github.com/elastic/beats/libbeat/common" | ||
| ) | ||
|
|
||
| type PluginDisabledError struct{} |
There was a problem hiding this comment.
exported type PluginDisabledError should have comment or be unexported
| } | ||
| } | ||
|
|
||
| func (m *Monitor) Stop() { |
There was a problem hiding this comment.
exported method Monitor.Stop should have comment or be unexported
| return nil | ||
| } | ||
|
|
||
| func (m *Monitor) Start() { |
There was a problem hiding this comment.
exported method Monitor.Start should have comment or be unexported
Contributor
Author
|
Hmmm, I don't know why these hound errors weren't in the original PR. I'd prefer to merge this as is to keep the diff as close to #8023 as possible, and fix these issues in a subsequent PR. |
Contributor
Author
|
Created a PR with those changes in #8316 |
exekias
approved these changes
Sep 17, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #8023 to 6.x branch. Original message:
This WIP patch brings heartbeat automatic reloading in-line with other Beats, using the standard reload feature. It is not yet ready for any sort of review. I'm mostly posting this to get CI running on it. This patch:
monitors.configurationoption, that enables reloading individualmonitorYAML blocks from a directory (monitors.d/*.ymlby default).poll_filefunctionalityThis is currently a WIP, it definitely needs a good number more tests.
This will be a significant breaking change due to the removal of poll file functionality, but since heartbeat is still in beta, we can and should do this due to the non-standard nature of the
poll_file.