From 06a488190acdce4ce664e1e635afa0434816cb14 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Tue, 22 Aug 2023 22:18:47 -0400 Subject: [PATCH] move Prometheus retention to startup --- docker-compose.monitoring.yml | 1 + docs/source/reference/monitoring/index.rst | 3 +-- prometheus/prometheus.yml | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docker-compose.monitoring.yml b/docker-compose.monitoring.yml index 9bbcdf15..9053bbb7 100644 --- a/docker-compose.monitoring.yml +++ b/docker-compose.monitoring.yml @@ -58,6 +58,7 @@ services: - prometheus-data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' + - '--storage.tsdb.retention.time=10d' # cadvisor to monitor our containers! cadvisor: image: gcr.io/cadvisor/cadvisor:v0.45.0 diff --git a/docs/source/reference/monitoring/index.rst b/docs/source/reference/monitoring/index.rst index c6f6ed6a..4b7bf5fb 100644 --- a/docs/source/reference/monitoring/index.rst +++ b/docs/source/reference/monitoring/index.rst @@ -25,8 +25,7 @@ wis2box also analyzes prometheus metrics from MinIO. For more information see the `list of supported MinIO metrics `_ -The default retention period for Prometheus metrics is 10 days. -This value can be modified in the Prometheus configuration at ``prometheus/prometheus.yml``. +The default retention period for Prometheus metrics is 10 days. This value can be modified in the Prometheus startup flag ``--storage.tsdb.retention.time`` in ``docker-compose.monitoring.yml``. Loki logging ------------ diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index 9a553fc9..10ae797f 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -11,11 +11,6 @@ alerting: - targets: # - alertmanager:9093 -storage: - tsdb: - retention: - time: 240h - scrape_configs: - job_name: minio-job metrics_path: /minio/v2/metrics/cluster