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

Prometheus gets 503 when scraping target behind haproxy #1741

Closed
quolix opened this Issue Jun 15, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@quolix
Copy link

quolix commented Jun 15, 2016

What did you do?
What did you expect to see?
What did you see instead? Under which circumstances?

We run pushgateway on mesos, and put it behind haproxy. curl and chrome can fetch the URL http://pushgateway.corp.quobyte.com:80/metrics with no problems (that's the one displayed in /targets), but prometheus shows a "server returned HTTP status 503 Service Unavailable" in /targets.

I'll dig deeper when I find time, but I thought I'll document the issue for others.

Environment

  • System information:

    Linux 3.10.0-327.18.2.el7.x86_64 x86_64

  • Prometheus version:

    0.19.2 / 23ca13c

  • Prometheus configuration file:

scrape_configs:
  - job_name: "pushgateway"
    target_groups:
      - targets:
        - pushgateway.corp.quobyte.com
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here
@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Jun 15, 2016

Can you als curl the URL from the Prometheus node?

@matthiasr

This comment has been minimized.

Copy link
Contributor

matthiasr commented Jun 15, 2016

@quolix

This comment has been minimized.

Copy link
Author

quolix commented Jun 15, 2016

@matthiasr yes, this yields a 503. Adding an addtional URL with :80 in the Mesos label fixes it then:

 "labels": {
    "HAPROXY_GROUP": "external",
    "HAPROXY_0_VHOST": "pushgateway.corp.quobyte.com,pushgateway.corp.quobyte.com:80"
  },

Thank you very much for the hint! I hope this helps others if they run into the same issue.

@quolix quolix closed this Jun 15, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 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 24, 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.