30 lines
645 B
Bash
Executable File
30 lines
645 B
Bash
Executable File
#!/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
|
|
}
|
|
|
|
$@
|