[stable/redis-ha] HAProxy exporter endpoint not configured
Describe the bug
When using haproxy.exporter.enabled=true the only exported metric is uptime. This is because the default HAProxy configuration does not include a stats uri as described here.
Version of Helm and Kubernetes: All
Which chart: stable/redis-ha
What happened: prometheus only gathers uptime metric
What you expected to happen:
A stats endpoint should be configured in HAProxy when the exporter is enabled. It should not be expected that the user has configured the stats endpoint appropriately using haproxy.customConfig.
How to reproduce it (as minimally and precisely as possible):
helm install --set haproxy.exporter.enabled=true stable/redis-ha
Anything else we need to know: I have also filed a feature request to remove the sidecar exporter (#16861) which is now deprecated. HAProxy now has an official prometheus exporter. However, I'm keeping this issue separate since we may want to maintian sidecar functionality for users on HAProxy 1.x who have to use the sidecar in which case it should work as expected out of the box.
@Raab70
I'll need to test this further, but the deployment spec does have annotations defined for metrics, and the appropriate Unix socket defined as the stats-uri:
command: ["haproxy_exporter",
"--haproxy.scrape-uri=unix:/run/haproxy/admin.sock"
That's exposed on the service via TCP over whatever the port is defined as.
I am seeing the same as what you've said though, so I'll look at improving this. It may be better to avoid this entirely, as technically this does not fundamentally work and HAProxy is new to the chart, we should be OK moving to the exporter into the official endpoint that comes with HAProxy.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.
This issue is being automatically closed due to inactivity.
@DandyDeveloper Can we reopen? I haven't seen a fix for this.
The same issue here on the latest chart version
@DandyDeveloper May you please review my PR #18166 as I'm blocked by this issue with exporter and want to move forward with new embedded metrics
@VLZZZ I will be soon, I'm sorry this hasn't been merged/reviewed by me yet. Lots of work stuff going on so I haven't had much time to contribute this month.