Skip to content
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/modify route-prefix and external-url flags to work the same as for the Prometheus server #190

Closed
beorn7 opened this issue Jul 3, 2018 · 4 comments · Fixed by #239
Closed

Comments

@beorn7
Copy link
Member

beorn7 commented Jul 3, 2018

Details are discussed in #149 . This issue is meant to track the (more urgent) user-facing behavior (in contrast to implementation details of the routing).

In short: --web.route-prefix should work in the same way as for the Prometheus server. --web.external-url should be added with the same semantics as for the Prometheus server.

@clausa20
Copy link

clausa20 commented Nov 6, 2018

+1

1 similar comment
@shinhwagk
Copy link

+1

@kinghuang
Copy link

kinghuang commented Mar 3, 2019

Is the --web.route-prefix option on pushgateway 0.7.0 supposed to work? I've configured it like I do for Prometheus, but it's not serving up CSS and JS resources correctly.

I currently have --web.route-prefix=/pushgateway. The main page returned by pushgateway reflects this in the CSS and JS paths. But, it's returning 404 for all of them.

<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Prometheus Pushgateway</title>
    <script src="/pushgateway/static/jquery-2.1.4.min.js"></script>
    <link rel="stylesheet" href="/pushgateway/static/bootstrap-3.3.4-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/pushgateway/static/bootstrap-3.3.4-dist/css/bootstrap-theme.min.css">
    <script src="/pushgateway/static/bootstrap-3.3.4-dist/js/bootstrap.min.js"></script>
    <script src="/pushgateway/static/functions.js"></script>
    …

@beorn7 beorn7 added the bug label Mar 5, 2019
@beorn7
Copy link
Member Author

beorn7 commented Mar 5, 2019

That seems messed up, too. I'll declare this now to be a bug, too. :o(

apghero added a commit to apghero/pushgateway that referenced this issue Mar 27, 2019
Pass in the prefix to the Static handler such that it can be removed
from the Path looked up to serve files relative to the FileSystem's
root.
apghero added a commit to apghero/pushgateway that referenced this issue Mar 27, 2019
Pass in the prefix to the Static handler such that it can be removed
from the Path looked up to serve files relative to the FileSystem's
root.

Signed-off-by: Andrew G10z <[email protected]>
beorn7 pushed a commit that referenced this issue Apr 2, 2019
Addresses route-prefix bug described in #190

Pass in the prefix to the Static handler such that it can be removed
from the Path looked up to serve files relative to the FileSystem's
root.

* Provide support for --web.external-url

This works in conjunction with the `--web.route-prefix` flag to
provide resources at the provided external URL, with the properly
munged `route-prefix`. If an external URL is provided, but a
`route-prefix` is not, this change takes the external URL's Path
and uses that as the `route-prefix`.

Includes a simple test checking for the presence of a known
external-url in the body of the Status handler.

Signed-off-by: Andrew G10z <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants