1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00

prometheus

This commit is contained in:
kev 2022-02-23 15:46:18 +08:00
parent 044e909e64
commit a2224729b6

@ -3,7 +3,7 @@ version: "3.8"
services: services:
prometheus: prometheus:
image: prom/prometheus:v2.31.1 image: prom/prometheus:v2.33.4
command: command:
- "--config.file=/etc/prometheus/prometheus.yml" - "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/var/lib/prometheus" - "--storage.tsdb.path=/var/lib/prometheus"
@ -11,11 +11,25 @@ services:
- "--web.console.templates=/usr/share/prometheus/consoles" - "--web.console.templates=/usr/share/prometheus/consoles"
- "--web.external-url=http://127.0.0.1:9090" - "--web.external-url=http://127.0.0.1:9090"
- "--storage.tsdb.retention.time=1y" - "--storage.tsdb.retention.time=1y"
- "--web.enable-lifecycle"
ports: ports:
- "9090:9090" - "9090:9090"
volumes: volumes:
- ./data/etc:/etc/prometheus - ./data/prometheus/etc:/etc/prometheus
- ./data/var:/var/lib/prometheus - ./data/prometheus/var:/var/lib/prometheus
restart: unless-stopped
alertmanager:
image: prom/alertmanager:v0.23.0
command:
- "--config.file=/etc/alertmanager/alertmanager.yml"
- "--storage.path=/var/lib/alertmanager"
- "--web.external-url=http://127.0.0.1:9093"
ports:
- "9093:9093"
volumes:
- ./data/alertmanager/etc:/etc/alertmanager
- ./data/alertmanager/var:/var/lib/alertmanager
restart: unless-stopped restart: unless-stopped
graphite: graphite: