github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/docs/configuration/prometheus-frontend.md (about) 1 --- 2 title: "Prometheus Frontend" 3 linkTitle: "Prometheus Frontend" 4 weight: 3 5 slug: prometheus-frontend 6 --- 7 8 You can use the Cortex query frontend with any Prometheus-API compatible 9 service, including Prometheus and Thanos. Use this config file to get 10 the benefits of query parallelisation and caching. 11 12 ```yaml 13 # Disable the requirement that every request to Cortex has a 14 # X-Scope-OrgID header. `fake` will be substituted in instead. 15 auth_enabled: false 16 17 # We only want to run the query-frontend module. 18 target: query-frontend 19 20 # We don't want the usual /api/prom prefix. 21 http_prefix: 22 23 server: 24 http_listen_port: 9091 25 26 query_range: 27 split_queries_by_interval: 24h 28 align_queries_with_step: true 29 cache_results: true 30 31 results_cache: 32 cache: 33 34 # We're going to use the in-process "FIFO" cache, but you can enable 35 # memcached below. 36 enable_fifocache: true 37 fifocache: 38 size: 1024 39 validity: 24h 40 41 # If you want to use a memcached cluster, you can either configure a 42 # headless service in Kubernetes and Cortex will discover the individual 43 # instances using a SRV DNS query (host) or list comma separated 44 # memcached addresses. 45 # host + service: this is the config you should set when you use the 46 # SRV DNS (this is considered stable) 47 # addresses: this is experimental and supports service discovery 48 # (https://cortexmetrics.io/docs/configuration/arguments/#dns-service-discovery) 49 # so it could either be a list of single addresses, or a SRV record 50 # prefixed with dnssrvnoa+. Cortex will then do client-side hashing to 51 # spread the load evenly. 52 53 # memcached: 54 # expiration : 24h 55 # memcached_client: 56 # host: memcached.default.svc.cluster.local 57 # service: memcached 58 # addresses: "" 59 # consistent_hash: true 60 61 frontend: 62 log_queries_longer_than: 1s 63 compress_responses: true 64 65 # The Prometheus URL to which the query-frontend should connect to. 66 downstream_url: http://prometheus.mydomain.com 67 ```