-
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
elastic-agent pprof enablement defaults #29108
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
My personal preference it to turn pprof endpoints off by default if monitoring is enabled and let the user decide if these should be enabled too. If these are enabled by default, will the diagnostic command be able to enable these on demand or then this information is not available? |
If these are enabled by default, the diagnostics command will be able to collect pprof information from the agent/beats on request. |
It is unfortunate that we need to pick either one or the other but as the pprof output potentially could be a security issue, I'm leaning towards disabling it by default. If pprof is run as part of diagnostic and it was enabled, we likely need to tell the user to restart. @michel-laterman What is your recommendation? |
we can disable by default. |
The current behaviour for the elastic-agent and its underlying beats is to have all of them expose
/debug/pprof/
endpoints on the monitoring http handler.These handler are available on beats and the agent even when the policy disables monitoring.
For example, given an agent (
v7.15.2
) enrolled via fleet where monitoring is disabled in the policy:An operator is still able to access the http handler bound to a socket for the beats as well as the agent:
The http handlers are bound to local unix sockets or Windows n pipes by default (for the beats and the agent).
The agent's handler/endpoint can be configured with the
agent.monitoring.*
options, and pprof can be enabled/disabled with theagent.monitoring.pprof
option (these options are not passed to the underlying beats).Having the http handlers available in all cases should not be an issue as the (non-pprof) endpoints do not expose any confidential information, and the endpoints are also used by the
diagnostics
commands.However we need to decide if adding the
/debug/pprof/
endpoints to these handlers (by default) is acceptable.The text was updated successfully, but these errors were encountered: