Commit 2d5dafa6 authored by godog's avatar godog

thanos: add query-frontend in-memory cache

parent 86763354
Pipeline #9730 passed with stage
in 2 minutes and 32 seconds
......@@ -19,3 +19,5 @@ alert_playbook_url: "https://playbooks"
# Custom blackbox probes.
prometheus_custom_blackbox_probes: {}
thanos_query_frontend_cache_size: '50MB'
......@@ -32,3 +32,9 @@
name: docker-prometheus-karma.service
state: restarted
listen: "reload karma"
- name: restart thanos
systemd:
name: docker-prometheus-thanos.service
state: restarted
listen: "reload thanos"
......@@ -70,3 +70,9 @@
src: karma.yml.j2
dest: "/etc/karma/float.yml"
notify: "reload karma"
- name: Install Thanos query-frontend cache configuration
template:
src: query-frontend-cache.yml.j2
dest: "/etc/thanos/query-frontend-cache.yml"
notify: "reload thanos"
type: IN-MEMORY
config:
max_size: "{{ thanos_query_frontend_cache_size }}"
......@@ -149,7 +149,7 @@ prometheus:
env:
QUERY_FLAGS: "--query.replica-label=monitor {% for h in groups['prometheus']|sort %} --store={{ h }}.prometheus.{{ domain }}:10901{% endfor %}"
SIDECAR_FLAGS: ""
QUERY_FRONTEND_FLAGS: ""
QUERY_FRONTEND_FLAGS: "--query-range.response-cache-config-file=/etc/thanos/query-frontend-cache.yml"
volumes:
- /etc/thanos: /etc/thanos
- name: karma
......
......@@ -96,7 +96,7 @@ prometheus:
env:
QUERY_FLAGS: "--query.replica-label=monitor {% for h in groups['prometheus']|sort %} --store={{ h }}.prometheus.{{ domain }}:10901{% endfor %}"
SIDECAR_FLAGS: ""
QUERY_FRONTEND_FLAGS: ""
QUERY_FRONTEND_FLAGS: "--query-range.response-cache-config-file=/etc/thanos/query-frontend-cache.yml"
volumes:
- /etc/thanos: /etc/thanos
- name: karma
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment