From 9e849a8b9dce3db005beb23f23a77f2fecefd751 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Fri, 31 May 2024 23:42:27 -0400 Subject: [PATCH] feat: set retention period, more frequent scraping, data volumes --- prometheus.yml | 2 ++ start.sh | 11 ++++++++++- stop.sh | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 stop.sh diff --git a/prometheus.yml b/prometheus.yml index 94c9a9d..941b61d 100644 --- a/prometheus.yml +++ b/prometheus.yml @@ -1,3 +1,5 @@ +global: + scrape_interval: '30s' scrape_configs: - job_name: 'bitwarden-exporter' static_configs: diff --git a/start.sh b/start.sh index 46fc7cb..a3ac30d 100755 --- a/start.sh +++ b/start.sh @@ -6,10 +6,14 @@ podman pod create \ --replace \ panopticon +podman volume create panopticon_grafana-storage +podman volume create panopticon_prometheus-storage + podman run -d \ --name=grafana \ --replace \ --pod panopticon \ + -v panopticon_grafana-storage:/var/lib/grafana \ grafana/grafana podman run \ @@ -17,4 +21,9 @@ podman run \ -d \ --replace \ --pod panopticon \ - -v ./prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus + -v panopticon_prometheus-storage:/prometheus \ + -v ./prometheus.yml:/etc/prometheus/prometheus.yml \ + prom/prometheus \ + --storage.tsdb.retention.time=60d \ + --storage.tsdb.path=/prometheus \ + --config.file=/etc/prometheus/prometheus.yml diff --git a/stop.sh b/stop.sh new file mode 100755 index 0000000..a74e78d --- /dev/null +++ b/stop.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +podman pod stop panopticon