From aab03cbc7d0029ef69b7b57780c1ec740d4c7e07 Mon Sep 17 00:00:00 2001 From: Kushal Shukla Date: Tue, 19 Nov 2024 15:23:08 +0530 Subject: [PATCH] Added --storage.tsdb.retention.size to retain data for certain size. Signed-off-by: Kushal Shukla --- prombench/docs/kind.md | 4 ++++ .../prombench/benchmark/3b_prometheus-test_deployment.yaml | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/prombench/docs/kind.md b/prombench/docs/kind.md index 7a77bad79..42d267b8b 100644 --- a/prombench/docs/kind.md +++ b/prombench/docs/kind.md @@ -140,6 +140,10 @@ metadata: type: Opaque stringData: object-config.yml: + +Regardless of the option chosen, data stored in Prometheus will only be retained based on the configured retention settings (`--storage.tsdb.retention.size`). + +> **⚠️ Warning:** The benchmark will change its basis when the retention size limit is reached and older downloaded blocks are deleted. Ensure that you have sufficient retention settings configured to avoid data loss that could affect benchmarking results. 3. Deploy the Kubernetes objects: > **_Note:_** If you encounter a `too many files open` error caused by promtail, increase the default value of `/proc/sys/fs/inotify/max_user_instances` from 128 to 512: diff --git a/prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml b/prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml index 4994b4b31..7355b6f8f 100644 --- a/prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml +++ b/prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml @@ -81,7 +81,8 @@ spec: "--web.external-url=http://{{ .DOMAIN_NAME }}/{{ .PR_NUMBER }}/prometheus-pr", "--storage.tsdb.path=/prometheus", "--config.file=/etc/prometheus/prometheus.yml", - "--log.level=debug" + "--log.level=debug", + "--storage.tsdb.retention.size=5GB" ] volumeMounts: - name: config-volume @@ -199,7 +200,8 @@ spec: "--web.external-url=http://{{ .DOMAIN_NAME }}/{{ .PR_NUMBER }}/prometheus-release", "--storage.tsdb.path=/prometheus", "--config.file=/etc/prometheus/prometheus.yml", - "--log.level=debug" + "--log.level=debug", + "--storage.tsdb.retention.size=5GB" ] volumeMounts: - name: config-volume