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