Configure the Grafana Mimir query-frontend to work with Prometheus
Open source
Configure the Grafana Mimir query-frontend to work with Prometheus
You can use the Grafana Mimir query-frontend with any Prometheus-API compatible service, including Prometheus and Thanos. Use this configuration file to benefit from query parallelization and caching.
yml
# You can use the Mimir query frontend with any Prometheus-API compatible
# service, including Prometheus and Thanos. Use this config file to get
# the benefits of query parallelisation and caching.
# Disable the requirement that every request to Mimir has a
# X-Scope-OrgID header. `anonymous` will be substituted in instead.
multitenancy_enabled: false
# We only want to run the query-frontend module.
target: query-frontend
# We don't want the default /api/prom or /prometheus prefixes on endpoints.
api:
prometheus_http_prefix: '/'
server:
http_listen_port: 9091
frontend:
split_queries_by_interval: 24h
align_queries_with_step: true
cache_results: true
results_cache:
backend: "memcached"
memcached:
# You can either configure a headless service in Kubernetes and Mimir will discover the individual
# instances using a SRV DNS query (host) or list comma separated memcached addresses.
addresses: "dnssrvnoa+memcached.mimir.svc.cluster.local:11211"
log_queries_longer_than: 1s
# The Prometheus URL to which the query-frontend should connect to.
downstream_url: http://prometheus.mydomain.com
Was this page helpful?
Related documentation
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
07 May

Mimir 3.0 preview: Major improvements to stability, performance, cost, and scalability
In this session, Mimir team members will preview the new features in the upcoming Grafana Mimir 3.0 major release.
07 May

Prometheus 3.0: Everything you need to know
3.0 is the first major version of Prometheus in seven years — and we're celebrating the milestone. With a brand-new user interface, and offering new features such as UTF-8 character support, this release also enabled many small improvements that were previously behind feature flags.
Blog post

Less is more: How Grafana Mimir queries run faster and more cost efficiently with fewer indexes
By avoiding inverted index lookups in the Prometheus TSDB, Mimir's memory usage was reduced by up to 64%.