-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Allow toggling auth for prometheus metrics #5870
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Equivalent to jupyterhub/jupyterhub#2224 Prometheus metrics can potentially leak information about the user, so they should be kept behind auth by default. However, for many JupyterHub deployments, they would need to be scraped by a centralized Prometheus instance that can not really authenticate separately to each user notebook without a lot of work. Admins can use this setting to allow unauthenticated access to the /metrics endpoint.
Happy to make an equivalent PR in jupyter_server repo as well - but would really love to see this land here :) |
yuvipanda
added a commit
to yuvipanda/datahub-old-fork
that referenced
this pull request
Nov 17, 2020
Brings in jupyter/notebook#5870, working towards getting notebook request metrics into prometheus.
Zsailer
approved these changes
Nov 17, 2020
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.
Makes sense to me. Thanks, @yuvipanda.
yuvipanda
added a commit
to yuvipanda/datahub-old-fork
that referenced
this pull request
Nov 18, 2020
- /metrics now responds with prometheus metrics, rather than nbresuse metrics (jupyter-server/jupyter-resource-usage#68) - Notebook Server's /metrics endpoint is now available without authentication, so prometheus can scrape those metrics (jupyter/notebook#5870) - Annotations are set up on the user pods to tell prometheus the port and path to scrape. - NetworkPolicy is set up to allow prometheus server to hit the singleuser server and the hub pods. Note that this required manually editing netpol in prometheus - should add that feature to the prometheus chart.
yuvipanda
added a commit
to yuvipanda/datahub-old-fork
that referenced
this pull request
Mar 19, 2021
jupyter/notebook#5870 has been merged, and we weren't actually using it anyway. Ref #2252
This was referenced Mar 19, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Equivalent to jupyterhub/jupyterhub#2224
Prometheus metrics can potentially leak information about
the user, so they should be kept behind auth by default.
However, for many JupyterHub deployments, they would need
to be scraped by a centralized Prometheus instance that can not
really authenticate separately to each user notebook without
a lot of work. Admins can use this setting to allow unauthenticated
access to the /metrics endpoint.