-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Customize URL prefix on alerts #805
Comments
This is how parts of the externally exposed URL are configured right now:
The last two points are problematic and need to be configurable. Now I started a PR to be able to configure the scheme, but then noticed the thing about the port as well. I thought it might be better to just allow setting the entire Prometheus URL externally as one string. We would still need the hostname and path prefix flags though, as the former is used to substitute /cc @fabxc |
For me the hostname I'd display is different (and a lot shorter) than the full hostname that you need to get to the prometheus server. If anything I'd like to be able to determine links automagically from the labels for all targets (in my case it's a simple concatenation), maybe we need a |
For that, you'd still need to be able to configure what the default externally visible hostname is, so this sounds like an orthogonal issue. Granted, just configuring the hostname might not be enough, as the external scheme, port, and endpoint of targets (if they are reachable through an LB at all) could be all different as well. That would then have to be configurable via some display relabeling options, but I see that as an orthogonal issue (and maybe too much feature bloat to put it into Prometheus TBH). |
Besides fixing #805 by making the entire externally reachable server URL configurable, this adds tests for the "globalURL" template function and makes it easier to test other such functions in the future. This breaks the `web.Hostname` flag (and introduces `web.external-url`). This flag is likely only used by few users, so I hope that's justifiable. Fixes #805
…metheus#805) * clarify gce sd config when meta data is returning urls as values * examples has been removed
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. |
While -web.hostname allows to set the hostname part of http://$host:$port, the scheme and $port is not settable per se.
The problem I'm having is that for the operator the Prometheus frontend is behind a proxy and needs to be accessed through this proxy. Currently the url is http://host:9090/prefix while I need it to be https://my.longer.hostname/prefix/
The text was updated successfully, but these errors were encountered: