Project: Grafana Loki (Observability and Analysis / Observability)
File: overrides-exporter.md

title: Overrides exporter menuTitle: description: Describes how the Overrides Exporter module exposes tenant limits as Prometheus metrics. weight: Loki is a multi-tenant system that supports applying limits to each tenant as a mechanism for resource management. The `overrides-exporter` module exposes these limits as Prometheus metrics in order to help operators better understand tenant behavior. Configuration updates to tenant limits can be applied to Loki without restart via the feature. The `overrides-exporter` module is disabled by default. We recommend running a single instance per cluster to avoid issues with metric cardinality. The `overrides-exporter` creates one metric for every scalar field in the limits configuration under the metric `lokioverridesdefaults` with the default value for that field after loading the Loki configuration. It also exposes another metric for every differing field for every tenant. Using an example `runtime.yaml`: ```yaml overrides: "tenant_1": ingestionratemb: 10 maxstreamsper_user: 100000 maxchunksper_query: 100000 ``` Launch an instance of the `overrides-exporter`: ```shell loki -target=overrides-exporter -runtime-config.file=runtime.yaml -config.file=basicschemaconfig.yaml -server.http-listen-port=8080 ``` To inspect the tenant limit overrides: ```shell $ curl -sq localhost:8080/metrics | grep override lokioverrides{limitname="ingestionratemb",user="tenant_1"} 10 lokioverrides{limitname="maxchunksperquery",user="tenant1"} 100000 lokioverrides{limitname="maxstreamsperuser",user="tenant1"} 100000 lokioverridesdefaults{limitname="cardinalitylimit"} 100000 lokioverridesdefaults{limitname="creationgrace_period"} 6e+11 lokioverridesdefaults{limitname="ingestionburstsizemb"} 6 lokioverridesdefaults{limitname="ingestionrate_mb"} 4 lokioverridesdefaults{limitname="maxcachefreshnessper_query"} 6e+10 lokioverridesdefaults{limitname="maxchunksperquery"} 2e+06 lokioverridesdefaults{limitname="maxconcurrenttailrequests"} 10 lokioverridesdefaults{limitname="maxentrieslimitper_query"} 5000 lokioverridesdefaults{limitname="maxglobalstreamsper_user"} 5000 lokioverridesdefaults{limitname="maxlabelnamelength"} 1024 lokioverridesdefaults{limitname="maxlabelnamesper_series"} 30 lokioverridesdefaults{limitname="maxlabelvaluelength"} 2048 lokioverridesdefaults{limitname="maxline_size"} 0 lokioverridesdefaults{limitname="maxquerierspertenant"} 0 lokioverridesdefaults{limitname="maxquery_length"} 2.5956e+15 lokioverridesdefaults{limitname="maxquery_lookback"} 0 lokioverridesdefaults{limitname="maxquery_parallelism"} 32 lokioverridesdefaults{limitname="maxquery_series"} 500 lokioverridesdefaults{limitname="maxstreamsmatchersper_query"} 1000 lokioverridesdefaults{limitname="maxstreamsperuser"} 0 lokioverridesdefaults{limitname="minsharding_lookback"} 0 lokioverridesdefaults{limitname="perstreamratelimit"} 3.145728e+06 lokioverridesdefaults{limitname="perstreamratelimit_burst"} 1.572864e+07 lokioverridesdefaults{limitname="pertenantoverrideperiod"} 1e+10 lokioverridesdefaults{limitname="rejectoldsamplesmax_age"} 1.2096e+15 lokioverridesdefaults{limitname="retentionperiod"} 2.6784e+15 lokioverridesdefaults{limitname="rulerevaluationdelayduration"} 0 lokioverridesdefaults{limitname="rulermaxrulegroupspertenant"} 0 lokioverridesdefaults{limitname="rulermaxrulesperrulegroup"} 0 lokioverridesdefaults{limitname="rulerremotewritequeuebatchsend_deadline"} 0 lokioverridesdefaults{limitname="rulerremotewritequeue_capacity"} 0 lokioverridesdefaults{limitname="rulerremotewritequeuemaxbackoff"} 0 lokioverridesdefaults{limitname="rulerremotewritequeuemaxsamplespersend"} 0 lokioverridesdefaults{limitname="rulerremotewritequeuemaxshards"} 0 lokioverridesdefaults{limitname="rulerremotewritequeueminbackoff"} 0 lokioverridesdefaults{limitname="rulerremotewritequeueminshards"} 0 lokioverridesdefaults{limitname="rulerremotewritetimeout"} 0 lokioverridesdefaults{limitname="splitqueriesbyinterval"} 0 ``` Alerts can be created based on these metrics to inform operators when tenants are close to hitting their limits allowing for increases to be applied before the tenant limits are exceeded.