scripts/wind/docker/prometheus.sh

30 lines
645 B
Bash
Raw Normal View History

2024-02-06 08:19:11 -05:00
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 9090 on pew-net
docker run \
--detach \
--name prometheus \
--restart unless-stopped \
--user 1000 \
--volume /bigdata/ha/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro \
--volume /bigdata/ha/prometheus/data:/prometheus:rw \
--network pew-net \
prom/prometheus:latest --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /prometheus --storage.tsdb.retention.time=1y
}
down () {
docker stop prometheus || true
docker rm prometheus || true
}
logs () {
docker logs --follow prometheus
}
$@