-
Notifications
You must be signed in to change notification settings - Fork 205
Ensure monitoring the Otel collector never runs in a beat process #11204
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
Conversation
|
This pull request does not have a backport label. Could you fix it @swiatekm? 🙏
|
7070c29 to
8bf8c48
Compare
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
e65d38b to
d52cfcd
Compare
d52cfcd to
0c87598
Compare
pchila
left a comment
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.
Couple of questions, nothing major
💛 Build succeeded, but was flaky
Failed CI StepsHistory
cc @swiatekm |
…astic#11204) * Ensure monitoring the Otel collector never runs in a beat process * Add changelog entry * Move log lines to constants
…1204) * Ensure monitoring the Otel collector never runs in a beat process * Add changelog entry * Move log lines to constants
What does this PR do?
It ensures that the prometheus metrics input we use to monitor the otel collector always runs in said otel collector. The reason this has to be the case is that the input relies on an environment variable we only inject into the otel collector process, and not into the metricbeat process.
The fix is quite hacky, but I think this is acceptable for two reasons:
Why is it important?
If a user has a monitoring output which isn't supported by the otel runtime, their agent will become unhealthy for no good reason.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works./changelog/fragmentsusing the changelog toolHow to test this PR locally
Build agent locally and run it using the following configuration, which falls back to the process runtime, as the
indicessetting on the elasticsearch output isn't supported for otel:You should see a log line about the
prometheus/metrics-monitoringoutput being skipped, and it shouldn't show up in status.Related issues