-
Notifications
You must be signed in to change notification settings - Fork 8.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
Add flag/config option to set root directory for UI #519
Comments
@juliusv You are more familiar with the web part. Is that doable? |
@yorik Would your suggestion simply require making paths relative in the frontend (in links, AJAX calls, etc.), or would you actually require the Prometheus server to respond on |
Any way would work for me, but probably adding /mycustomroot will be easier On 11 February 2015 at 13:07, juliusv notifications@github.com wrote:
With best regards, |
This makes all URLs relative instead of absolute to enable people to run Prometheus behind a Proxy with a different path (like http://myproxy/prometheus/). The caveat is that this now codifies assumptions for the relative path depths for all pages. For example, consoles templates are now always assumed to be one path level from the root (because the common header and console library adds '../' to all their URLs). Currently we don't have example consoles in subdirectories of "consoles", but this would disallow that for the future (or we could add later support for detecting somehow what the right depth is based on the console file we're loading). This fixes #519
@yorik See #528 - this works for me behind an nginx with a custom root. The one caveat for you would be that the Prometheus itself would have no idea that it's behind a proxy, so when it sends alerts to alertmanager (if you're using that at all), it would send its normal local URL to alertmanager for any rule introspection backlinks. That means that in Alertmanager, the "Generated By" column would not contain the URL through your proxy, but the one that Prometheus thinks it has. This could be made configurable in the future too, I guess... |
@juliusv, thank you so much! It works for me now. I haven't try On 14 February 2015 at 18:00, juliusv notifications@github.com wrote:
With best regards, |
This makes all URLs relative instead of absolute to enable people to run Prometheus behind a Proxy with a different path (like http://myproxy/prometheus/). The caveat is that this now codifies assumptions for the relative path depths for all pages. For example, consoles templates are now always assumed to be one path level from the root (because the common header and console library adds '../' to all their URLs). Currently we don't have example consoles in subdirectories of "consoles", but this would disallow that for the future (or we could add later support for detecting somehow what the right depth is based on the console file we're loading). This fixes #519
This is resolved with #614 and |
…ons-formatting Revert "Added docs for toLower and toUpper formatting"
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Right now it's impossible to hide prometheus under nginx in some directory because all the links and JS are referenced to /... It would be very good if it would be possible to add some common directory via config or flag so it would be accessible via
http://<host>/<dir>/
The text was updated successfully, but these errors were encountered: