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

Clicking the logo incorrectly references ${DOMAIN}/prometheus/prometheus/ #2817

Closed
andrewhowdencom opened this Issue Jun 7, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@andrewhowdencom
Copy link

andrewhowdencom commented Jun 7, 2017

What did you do?

Clicked on the logo (the Prometheus bit) in the UI

What did you expect to see?

The graph

What did you see instead? Under which circumstances?

404 not found. Url was like /prometheus/prometheus/graph

Environment

https://hub.docker.com/r/prom/prometheus/

1.7 tag

  • System information:
Linux 4.4.35+ x86_64
  • Prometheus version:
prometheus -version
prometheus, version 1.7.0 (branch: master, revision: bfa37c8ee39d11078662dce16c162a61dccf616c)
  build user:       root@7a6329cc02bb
  build date:       20170607-09:43:48
  go version:       go1.8.3
  • Alertmanager version:
alertmanager -version
/bin/sh: alertmanager: not found # lol yeah it's a container.
  • Prometheus configuration file:

This contains lots of sensitive data. At this point, I'm not going to attach it. While I appreciate this is annoying, I'm reasonably confident this bug isn't related. Instead, see the following

1 root       0:12 /bin/prometheus -config.file=/etc/config/prometheus.yml -alertmanager.url=http://localhost:9093/alertmanager -storage.local.path=/data -web.console.libraries=/etc/prometheus/console_libraries -web.console.templates=/etc/prometheus/consoles -web.external-url=https://${TOTALLY_LEGIT_DOMAIN}/prometheus/

That has been sanitized.

  • Logs:
time="2017-06-07T10:57:35Z" level=info msg="Starting prometheus (version=1.7.0, branch=master, revision=bfa37c8ee39d11078662dce16c162a61dccf616c)" source="main.go:88" 
time="2017-06-07T10:57:35Z" level=info msg="Build context (go=go1.8.3, user=root@7a6329cc02bb, date=20170607-09:43:48)" source="main.go:89" 
time="2017-06-07T10:57:35Z" level=info msg="Host details (Linux 4.4.35+ #1 SMP Wed Apr 5 13:00:57 PDT 2017 x86_64 prometheus-prometheus-2020732588-x9dqb (none))" source="main.go:90" 
time="2017-06-07T10:57:35Z" level=info msg="Loading configuration file /etc/config/prometheus.yml" source="main.go:252" 
time="2017-06-07T10:57:37Z" level=info msg="Loading series map and head chunks..." source="storage.go:428" 
time="2017-06-07T10:57:38Z" level=info msg="12471 series loaded." source="storage.go:439" 
time="2017-06-07T10:57:38Z" level=info msg="Starting target manager..." source="targetmanager.go:63" 
time="2017-06-07T10:57:38Z" level=info msg="Listening on :9090" source="web.go:259" 
time="2017-06-07T10:57:38Z" level=info msg="Using pod service account via in-cluster config" source="kubernetes.go:104" 
time="2017-06-07T10:57:38Z" level=info msg="Using pod service account via in-cluster config" source="kubernetes.go:104" 
time="2017-06-07T10:57:38Z" level=info msg="Using pod service account via in-cluster config" source="kubernetes.go:104" 
time="2017-06-07T11:02:38Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:633" 
time="2017-06-07T11:02:39Z" level=info msg="Done checkpointing in-memory metrics and chunks in 1.383904916s." source="persistence.go:665" 

@andrewhowdencom andrewhowdencom changed the title Clicking the logo redirects to ${DOMAIN}/prometheus/prometheus/ Clicking the logo incorrectly references ${DOMAIN}/prometheus/prometheus/ Jun 7, 2017

@zerthimon

This comment has been minimized.

Copy link

zerthimon commented Jun 7, 2017

I'm having the same issue.

# docker exec -it prometheus-server prometheus -version
prometheus, version 1.7.0 (branch: master, revision: bfa37c8ee39d11078662dce16c162a61dccf616c)
  build user:       root@7a6329cc02bb
  build date:       20170607-09:43:48
  go version:       go1.8.3

After connecting to URL specified as -web.external-url=https://example.com/prometheus/ I get redirect to https://example.com/prometheus/prometheus/graph which results in 404.

Connecting to https://example.com/prometheus/graph works fine.

nginx config:

    location /prometheus/ {
        auth_basic "Prometheus Auth";
        auth_basic_user_file htpasswd_prometheus;

        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_read_timeout 60s;
        proxy_connect_timeout 1s;
        proxy_redirect off;

        proxy_pass http://127.0.0.1:9090;
    }

The same config works fine with older prometheus version.

@zerthimon

This comment has been minimized.

Copy link

zerthimon commented Jun 8, 2017

I've checked this further and the issue doesn't exists in the 1.6.3 version:

# docker exec -it prometheus-server prometheus -version
prometheus, version 1.6.3 (branch: master, revision: c580b60c67f2c5f6b638c3322161bcdf6d68d7fc)
  build user:       root@a6410e65f5c7
  build date:       20170522-09:15:06
  go version:       go1.8.1

This commit may be causing the problem: ad22606

@brancz

This comment has been minimized.

Copy link
Member

brancz commented Jun 12, 2017

Closed by #2832

@brancz brancz closed this Jun 12, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

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.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.