From 8a523c0afdec6e9a6cd196d73751f12b13a44ce9 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 22 Jan 2018 08:33:13 -0600 Subject: [PATCH] Tune prometheus default intervals and block durations This increases the default scrape and evaluation intervals to match those of the prometheus service upstream with the aim to reduce prometheus's resource consumption. It also adds configuration parameters for the min and max block durations that series can span Change-Id: I7f9352413a273fbf680b892ba26e30cf27bae232 --- prometheus/templates/bin/_prometheus.sh.tpl | 2 ++ prometheus/values.yaml | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/prometheus/templates/bin/_prometheus.sh.tpl b/prometheus/templates/bin/_prometheus.sh.tpl index 972a8225..ad0d75c1 100644 --- a/prometheus/templates/bin/_prometheus.sh.tpl +++ b/prometheus/templates/bin/_prometheus.sh.tpl @@ -26,6 +26,8 @@ function start () { --query.max-concurrency={{ .Values.conf.prometheus.query.max_concurrency }} \ --storage.tsdb.path={{ .Values.conf.prometheus.storage.tsdb.path }} \ --storage.tsdb.retention={{ .Values.conf.prometheus.storage.tsdb.retention }} \ + --storage.tsdb.min-block-duration={{ .Values.conf.prometheus.storage.tsdb.min_block_duration }} \ + --storage.tsdb.max-block-duration={{ .Values.conf.prometheus.storage.tsdb.max_block_duration }} \ {{ if .Values.conf.prometheus.web_admin_api.enabled }} --web.enable-admin-api \ {{ end }} diff --git a/prometheus/values.yaml b/prometheus/values.yaml index c607c16d..2cbbce35 100644 --- a/prometheus/values.yaml +++ b/prometheus/values.yaml @@ -189,6 +189,8 @@ conf: tsdb: path: /var/lib/prometheus/data retention: 7d + min_block_duration: 2h + max_block_duration: 6h log: format: logger:stdout?json=true level: info @@ -199,8 +201,8 @@ conf: enabled: false scrape_configs: global: - scrape_interval: 25s - evaluation_interval: 10s + scrape_interval: 60s + evaluation_interval: 60s rule_files: - /etc/config/rules/alertmanager.rules - /etc/config/rules/etcd3.rules