wkulhanek / openshift-prometheus

Repository for all things related to Prometheus on OpenShift
51 stars 41 forks source link

haproxy metrics not working #18

Open goposky opened 6 years ago

goposky commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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:

charlysan commented 5 years ago

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