Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
About Grafana Mimir IP address logging of a reverse proxy
If a reverse proxy is used in front of Mimir, it might be difficult to troubleshoot errors.
You can use the following settings to log the IP address passed along by the reverse proxy in headers such as X-Forwarded-For
.
-server.log-source-ips-enabled
Set this to
true
to add IP address logging when aForwarded
,X-Real-IP
, orX-Forwarded-For
header is used. A field calledsourceIPs
is added to error logs when data is pushed into Grafana Mimir.-server.log-source-ips-header
The header field stores the source IP addresses and is used only if
-server.log-source-ips-enabled
istrue
, and if-server.log-source-ips-regex
is set. If you do not set these flags, the defaultForwarded
,X-Real-IP
, orX-Forwarded-For
headers are searched.-server.log-source-ips-regex
A regular expression that is used to match the source IPs. The regular expression must contain at least one capturing group, the first of which is returned. This flag is used only if
-server.log-source-ips-enabled
istrue
and if-server.log-source-ips-header
is set.
Was this page helpful?
Related resources from Grafana Labs
![Intro to metrics with Grafana: Prometheus, Grafana Mimir, and beyond](/media/webinar/introtometrics_V2_notxt.png?w=200 200w, /media/webinar/introtometrics_V2_notxt.png?w=400 400w)
![Scaling and securing your Prometheus metrics in Grafana Cloud](/static/assets/featured/scaling-and-securing-your-prometheus-metrics-amer-featured.png?w=200 200w, /static/assets/featured/scaling-and-securing-your-prometheus-metrics-amer-featured.png?w=400 400w)
![Less is more: How Grafana Mimir queries run faster and more cost efficiently with fewer indexes](/media/blog/mimir-store-gateway-faster-queries/grafana-mimir-faster-queries-meta.png?w=200 200w, /media/blog/mimir-store-gateway-faster-queries/grafana-mimir-faster-queries-meta.png?w=400 400w)