Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

haproxy metrics not working #18

Open
goposky opened this issue Dec 28, 2017 · 3 comments
Open

haproxy metrics not working #18

goposky opened this issue Dec 28, 2017 · 3 comments

Comments

@goposky
Copy link

goposky commented Dec 28, 2017

Hi, Thanks for this very useful setup. However, I wasnt able to get haproxy metrics directly by following this document. Prometheus is unable to scrap the metrics url and I see the below error:
level=warn ts=2017-12-28T12:49:06.486711654Z caller=scrape.go:673 component="target manager" scrape_pool=openshift-routers target=http://router-ota.default.svc.cluster.local:1936/metrics msg ="append failed" err="no token found"
PS: The official prometheus document suggests we must use the haproxy_exporter (https://prometheus.io/docs/instrumenting/exporters/).

@wkulhanek
Copy link
Owner

Are you looking at the “right” scrape? Prometheus also auto discovers the router but can not scrape it because it’s missing the authentication. You can see that under /targets. There is a second entry for the router at the bottom.

@goposky
Copy link
Author

goposky commented Dec 28, 2017

Yes, if you mean the following stanza I do have it.

`- job_name: 'openshift-routers'
metrics_path: '/metrics'
scheme: http
basic_auth:
username: admin
password: *********
static_configs:

  • targets: ['router-ota.default.svc.cluster.local:1936']`

@charlysan
Copy link

charlysan commented Oct 30, 2018

I'm having the same problem. Have you been able to solve this @goposky?
I've checked that the authentication is working properly by hitting the target using curl + user/pwd from prometheus pod.

openshift v3.5.5.31.67
kubernetes v1.5.2+43a9be4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants