mirror of
https://github.com/kou029w/_.git
synced 2025-01-30 22:08:02 +00:00
create prometheus
This commit is contained in:
parent
2419504468
commit
ff9a69d379
2 changed files with 34 additions and 0 deletions
27
prometheus/compose.yml
Normal file
27
prometheus/compose.yml
Normal 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:
|
7
prometheus/etc/prometheus/prometheus.yml
Normal file
7
prometheus/etc/prometheus/prometheus.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: "prometheus"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["localhost:9090"]
|
||||||
|
- job_name: "node"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["node-exporter:9100"]
|
Loading…
Add table
Reference in a new issue