-
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
Make http.enabled: true
the default?
#12918
Comments
Pinging @elastic/beats and @elastic/apm-server. |
Pinging @elastic/stack-monitoring |
It's too bad we (apm) didn't lobby to get this moved under I don't see a problem enabling this by default given the default listener is only on localhost. Did you plan to update the official docker image to expose this port as well? I see making the default |
In playing with this, I have a few concerns:
TBH, I'm very hesitant about this from a security perspective. While I appreciate that this would make the setup experience easier, I believe that running a webserver locally should be something that is explicitly enabled by users and not the default behavior. |
What sort of authentication are you thinking of here? Also, what is the concern with calling these non-side-effecting APIs unauthenticated?
The user would need to change the
It looks like we suggest running Beats as root. So I can understand your concern here. Given the security concerns, I'm okay with not enabling the HTTP server by default. It would need to be an additional and explicit step performed by the user. |
@ycombinator @cachedout Did you consider allowing beats to listen over a unix socket (I believe windows has name pipe under windows?) For the agent team, this looks more and more to be a must-have. Because let's say that agent starts X number of beats, it means that it also needs to open X number of ports. Since unix socket is a file we can set permission on it to limit who can access the monitoring information. |
I'm good with the unix socket / windows named pipe approach. I'd like to test the Metricbeat @cachedout WDYT? Would this address the security concerns you raised? |
A UNIX socket would address my concerns. That's a 👍 from me. |
I don't follow the security issue raised here. The stats endpoint uses the stdlib's default mux with some straightforward handlers. The usability tradeoff against a bug in the standard library/these handlers doesn't seem worth it, especially considering that not all beats run as root by default, like apm-server. |
One thing that concerns me is that the server is labeled as
I don't feel particularly comfortable setting a default which produces a warning message about an experimental feature listening on a TCP port. Do we know when and if Beats HTTP servers are scheduled to move from being an experimental feature to being GA? |
@cachedout, To be honest, the HTTP server in beats is in for a very long time, I believe we could mark it GA. My understanding of the presence of the experimental warnings was to give us the flexibility to change the output format without notice. The metric endpoint on the beats was used in the past for debugging purpose like getting the current rates of events. So depending on the stability of the API we could change the feature level.
Not sure I understand exactly what you mean here @graphaelli, my proposal of having the option to listen to a UNIX socket was to make sure we don't consume port on the local machine and we don't have to either detect or keep track of used ports. Of course, related to the fact that the agent will starts multiples instances of the beats. |
That's my understanding as well.
We'll still have to track the domain socket paths though. The process also needs perms to create them somewhere which is less simple for non-root processes but not impossible. I think it would be simpler to message that going from local monitoring to remote monitoring is changing |
adding a small summary here, I did a 1:1 with @graphaelli concerning how the agent handle monitoring and we discussed the specific cases of APM-Server, where APM-Server doesn't run by default as root. There are a few things we can do here:
I still think a UNIX socket is a preferable way to go since processes are colocated next to each other for the agent. @cachedout @ycombinator Do you prefer we create specific issues to add support for UNIX socket when configuring the monitoring endpoint? I just to make sure we can track that change on our side. Another point that @graphaelli pointed out in our discussion is to use the same strategy as APM-Server to identify if I need to answer on a port or a unix socket. |
If we go the UNIX socket route then, yes, I think a separate issue to track that work and discussion would be good. |
@cachedout I've created #13577 and assigned to both of you feel free to adjust that. |
Now that we can listen to a unix socket or a named pipe under windows, what if we enable the options by default. comment from @ycombinator
I think for the unix socket the following would make sense |
It was a concern brought up by @cachedout in #12918 (comment). |
Correct but the concern is more a problem when you are using TCP, where all the beats listen on the same socket with the move to the unix socket the file can be different and use the name of the beat to separate concern. |
Ah yes, good point. The use case of running two instances of the same beat on the same host should be fairly uncommon, I assume. One other thought, what about placing the default socket file under |
What if we go with the path that @ph proposed but make the path configurable. If two FB instances are started up, the second one will complain because the socket file already exists. @ycombinator Not sure as a user I would look under |
I am not sure about using the If we look at the FSF document They seems to recommend Note that named pipe have a similar problem. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue doesn't have a |
Describe the enhancement:
Currently any Beat (or APM server) starts with
http.enabled
set tofalse
as the default behavior.With the introduction of the
beat
Metricbeat module, should we now default to havinghttp.enabled
set totrue
instead? The module works by periodically calling various Beats APIs.Describe a specific use case for the enhancement or feature:
Stack Monitoring users will soon be using Metricbeat's
beat
module to collect Beats' (and APM server) monitoring data for visualizing in the Stack Monitoring app in Kibana. In order to use this module, users will first need to be told to sethttp.enabled
totrue
in their Beat or APM server instances that need to be monitored. By defaultinghttp.enabled
totrue
going forward, we can reduce this extra setup step for the user.FWIW, Logstash nodes start up with their HTTP server enabled by default.
The text was updated successfully, but these errors were encountered: