-
Notifications
You must be signed in to change notification settings - Fork 148
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
[Feature] Start/stop monitoring server based on monitoring config #3492
[Feature] Start/stop monitoring server based on monitoring config #3492
Conversation
seems cloud does not disable monitoring |
🌐 Coverage report
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
# - security: impacts on the security of a product or a user’s deployment. | ||
# - upgrade: important information for someone upgrading from a prior version | ||
# - other: does not fit into any of the other categories | ||
kind: feature |
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 think strictly speaking this should be an enhancement
since it's not completely new functionality :)
coord.runLoopIteration(ctx) | ||
assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change") | ||
|
||
// server is started by default |
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.
Comment should be changed?
coord.runLoopIteration(ctx) | ||
assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change") | ||
|
||
// server is started by default |
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.
Comment should be changed since we are explicitly enabling monitoring in the policy now (as opposed to it being enabled by default)?
coord.runLoopIteration(ctx) | ||
assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change") | ||
|
||
// server is started by default |
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.
Comment should be changed?
Just tested this PR and I'm not sure it's working as expected. Or maybe I'm doing something wrong in my test?
|
@ycombinator have you changed the config? by default monitoring is enabled edit: i see you change it upfront. |
…rt-server-when-mon-enabled
Yes, I changed the config to explicitly disable monitoring. See the third command in my test output. |
can you check indentation or if value is not commented out in a config. i cannot repro |
I tried and I'm getting the same behavior as before. 😞
Can you try with the same configuration as mine? If you still can't reproduce, maybe we should ask someone else to break the tie or we could get on Zoom next week to sort this out (I'm on PTO tomorrow and Monday). |
i see what's wrong |
Yup, that was it! 🤦
|
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.
LGTM.
…rt-server-when-mon-enabled
…rt-server-when-mon-enabled
SonarQube Quality Gate |
What does this PR do?
Adds a capability to turn off monitoring server in case monitoring metrics is disabled.
Why is it important?
Up until now monitoring server was always turned on listening on a monitoring port even though monitoring was not enabled.
TODO: check with cloud they have monitoring enabled in a config
Checklist
./changelog/fragments
using the changelog toolHow to test
agent.monitoring.enabled
andagent.monitoring.metrics
flagssudo lsof -i :6791
. for server stopped no output, for server running LISTEN and metricbeat connecting to itFixes #2734