mirror of
https://github.com/aykhans/my-self-host-services.git
synced 2026-01-13 19:31:21 +00:00
docker-compose.yml -> docker-compose.yaml
This commit is contained in:
61
prometheus/docker-compose.yaml
Normal file
61
prometheus/docker-compose.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
networks:
|
||||
prometheus:
|
||||
external: false
|
||||
grafana:
|
||||
name: grafana
|
||||
driver: bridge
|
||||
external: true
|
||||
caddy:
|
||||
name: caddy
|
||||
driver: bridge
|
||||
external: true
|
||||
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:v3.7.2
|
||||
container_name: prometheus
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- prometheus
|
||||
- grafana
|
||||
- caddy
|
||||
command: "--config.file=/etc/prometheus/prometheus.yaml --storage.tsdb.retention.time=10d --storage.tsdb.retention.size=15GB"
|
||||
volumes:
|
||||
- ./data/config/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
|
||||
- prometheus-data:/prometheus
|
||||
|
||||
node_exporter:
|
||||
image: quay.io/prometheus/node-exporter:v1.10.0
|
||||
container_name: node_exporter
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- prometheus
|
||||
command:
|
||||
- "--path.rootfs=/host"
|
||||
pid: host
|
||||
volumes:
|
||||
- "/:/host:ro,rslave"
|
||||
|
||||
cadvisor:
|
||||
image: gcr.io/cadvisor/cadvisor:v0.52.1
|
||||
container_name: cadvisor
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- prometheus
|
||||
volumes:
|
||||
- "/:/rootfs:ro"
|
||||
- "/var/run:/var/run:ro"
|
||||
- "/sys:/sys:ro"
|
||||
- "/var/lib/docker/:/var/lib/docker:ro"
|
||||
- "/dev/disk/:/dev/disk:ro"
|
||||
privileged: true
|
||||
devices:
|
||||
- "/dev/kmsg:/dev/kmsg"
|
||||
command:
|
||||
- -disable_metrics=advtcp,app,cpuLoad,cpu_topology,cpuset,disk,diskIO,hugetlb,memory_numa,network,oom_event,percpu,perf_event,pressure,process,referenced_memory,resctrl,sched,tcp,udp
|
||||
- -housekeeping_interval=3s
|
||||
- -storage_duration=2m
|
||||
- -docker_only
|
||||
|
||||
volumes:
|
||||
prometheus-data:
|
||||
Reference in New Issue
Block a user