From 8e79b19101b3983db4dd68cd00045b8348e3e6c0 Mon Sep 17 00:00:00 2001 From: sinavir Date: Sun, 14 Apr 2024 01:08:49 +0200 Subject: [PATCH] fix(prometheus): Provide retention and scraping policy --- machines/storage01/prometheus.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/machines/storage01/prometheus.nix b/machines/storage01/prometheus.nix index a58bd96..bcf5cfc 100644 --- a/machines/storage01/prometheus.nix +++ b/machines/storage01/prometheus.nix @@ -20,6 +20,14 @@ in webExternalUrl = "https://${host}"; + retentionTime = "6m"; + + extraFlags = [ "--storage.tsdb.retention.size=20GB" ]; + + globalConfig = { + scrape_interval = "15s"; # if you change this settings, please do it in grafana also + }; + scrapeConfigs = [ { job_name = "prometheus";