GitLab exporter does not connect redis via sentinels when using redis sentinels
Summary
A potential bug under the gitlab-exporter
component (ffi: https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/charts/gitlab/charts/gitlab-exporter), deployed together with the GitLab Helm chart prevents this component to connect redis via sentinels. It connects always redis via service regardless of using redis with/without sentinel.
Steps to reproduce
Just to check out gitlab-exporter
logs, like:
kubectl logs gitlab-exporter-xxx
Current behavior
gitlab-exporter
does not connect redis via sentinel when using sentinel, in a similar way sidekiq
or any other component does.
Expected behavior
gitlab-exporter
to connect redis via sentinels (when sentinels are used), otherwise to default to redis.
Versions
- Chart:
6.2.5
- Platform:
- Self-hosted:
Kubernetes
- Self-hosted:
Relevant logs
n.b: gitlab-redis
is the master name for sentinel.
# kubectl logs gitlab-exporter-xxx
E, [2022-08-26T06:43:17.001442 #1] ERROR -- : Error connecting to the Redis: Error connecting to Redis on gitlab-redis:6379 (SocketError)10.100.52.105 - - [26/Aug/2022:06:43:16 UTC] "GET /metrics HTTP/1.1" 200 6596- -> /metrics
Actionable analysis
See #3813 (comment 1782066338)
Actionable
-
GitLab Exporter does not currently support the ability to collect metrics behind Sentinels, and needs to be extended to support this. -
GitLab Helm chart needs to support configuration of GitLab Exporter with Redis Sentinels for the Sidekiq probes. - TBD MR link
-
GitLab Helm chart should support enable / disable of probes - Feature parity to Omnibus GitLab, via
probe_sidekiq
- TBD MR link
- Feature parity to Omnibus GitLab, via
-
Omnibus GitLab needs to support configuration of GitLab Exporter with Redis Sentinels for the Sidekiq probes. - TBD MR link
Edited by Jason Plum