-
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
Disable monitoring during fleetserver bootstrap process #27222
Disable monitoring during fleetserver bootstrap process #27222
Conversation
Set the monitoring.enabled flag to false during the fleet-server bootstrap process in order to ensure that no data is sent to an elasticsearch instance running on the same host.
cfg.Settings.MonitoringConfig.Enabled = false | ||
} else { | ||
cfg.Settings.MonitoringConfig = &monitoringCfg.MonitoringConfig{Enabled: false} | ||
} | ||
monitor, err := monitoring.NewMonitor(cfg.Settings) |
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 attempted to replace the monitor with the noop monitor, but the agent was not able to bootstap correctly.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
Pinging @elastic/agent (Team:Agent) |
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.
Looks good.
* Disable monitoring during fleetserver bootstrap process Set the monitoring.enabled flag to false during the fleet-server bootstrap process in order to ensure that no data is sent to an elasticsearch instance running on the same host. * Add CHANGELOG entry
Hi @EricDavisX Observations:
Build details:
Please let us know if anything else is required from our end. |
What does this PR do?
Set the monitoring.enabled flag to false during the fleet-server
bootstrap process in order to ensure that no data is sent to an
elasticsearch instance running on the same host.
Why is it important?
In a self-hosted scenario fleet will show that some data-streams have stopped in certain cases (such as after the fleet-server restarts). However these datastreams are incorrectly sent by the agent during the bootstrapping processes when the default credentials for output match Elasticsearch's credentials.
Checklist
I have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Run ES + fleet locally (
elastic-package
can do this), view the datastreams tab in the fleet-ui, theelastic_agent.metricsbeat
andelastic_agent.filebeat
streams should not generate.Related issues