I’m currently trying to check the ingester ring status in my Loki setup via the /ring
endpoint as documented. However, I’m encountering a 502 Bad Gateway error when making a request to:
https://loki.domain.com/ring?tokens=false
While https://loki.domain.com/distributor/ring?tokens=false
and https://loki.domain.com/indexgateway/ring?tokens=false
work completely fine.
Context:
- Loki is running in scalable mode with zone-aware replication enabled.
- The
/ring
endpoint configuration is dynamically set in the Loki Helm chart’s_helpers.tpl
file. loki/production/helm/loki/templates/_helpers.tpl at main · grafana/loki · GitHub
# Ring
location = /ring {
proxy_pass {{ $ingesterUrl }}$request_uri;
}
The value of $ingesterUrl
is defined in the Helm chart as:
{{- $ingesterUrl := printf "%s://%s.%s.svc.%s:%s" $httpSchema $ingesterHost .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }}
Accessing the /ring
endpoint results in a 502 Bad Gateway error:
- Request URL:
https://loki.domain.com/ring?tokens=false
- Status Code: 502 Bad Gateway
I suspect the issue might be related to zone-awareness since replication is enabled. It’s possible that the /ring
endpoint is not routing correctly to the ingester service or that additional configuration is required for zone-aware setups.
Questions:
- Are there additional configurations needed in the Helm chart or NGINX to make the
/ring
endpoint work? - Could the issue be due to a mismatch between
$ingesterUrl
and the actual ingester service URLs?