mapletree/lxc1/p4-monitor/prometheus.yml
admin 09c70e5e8c
Some checks are pending
PVE2 Infrastructure Deploy / terraform (push) Waiting to run
split p3 into agent and monitor components
2026-02-06 09:50:03 -07:00

33 lines
No EOL
1.1 KiB
YAML

services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
user: "1000:1000"
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=2h'
- '--storage.tsdb.min-block-duration=2h'
- '--storage.tsdb.max-block-duration=2h'
- '--web.enable-lifecycle'
volumes:
- /docker/monitoring/prometheus/config:/etc/prometheus
- /docker/monitoring/prometheus/data:/prometheus
ports:
- "9090:9090"
thanos-sidecar:
image: thanosio/thanos:v0.34.0
container_name: thanos-sidecar
user: "1000:1000"
environment:
- OBJSTORE_CONFIG={"type":"${THANOS_STOR_TYPE}","config":{"bucket":"THANOS_S3_BUCKET","endpoint":"$THANOS_S3_ENDPOINT","access_key":"${S3_KEY}","secret_key":"${S3_SECRET}","insecure":${THANOS_S3_INSECURE}}}
command:
- 'sidecar'
- '--tsdb.path=/prometheus'
- '--prometheus.url=$PROMETHEUS_URL'
- '--objstore.config=$$(OBJSTORE_CONFIG)'
volumes:
- /docker/monitoring/prometheus/data:/prometheus
ports:
- "10901:10901"