1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00

create prometheus

This commit is contained in:
Nebel 2022-05-29 22:59:28 +09:00
parent 2419504468
commit ff9a69d379
2 changed files with 34 additions and 0 deletions

27
prometheus/compose.yml Normal file
View file

@ -0,0 +1,27 @@
services:
node-exporter:
image: prom/node-exporter
expose: ["9100"]
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
prometheus:
image: prom/prometheus
expose: ["9090"]
volumes:
- ./etc/prometheus:/etc/prometheus
- prometheus_data:/prometheus
grafana:
image: grafana/grafana-oss
ports: ["3000:3000"]
volumes:
- grafana_data:/var/lib/grafana
volumes:
prometheus_data:
grafana_data:

View file

@ -0,0 +1,7 @@
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "node"
static_configs:
- targets: ["node-exporter:9100"]