Loki Ingester /ring Endpoint in Distributed Mode

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:

# 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:

  1. Are there additional configurations needed in the Helm chart or NGINX to make the /ring endpoint work?
  2. Could the issue be due to a mismatch between $ingesterUrl and the actual ingester service URLs?