diff --git a/prometheus/compose.yml b/prometheus/compose.yml new file mode 100644 index 0000000..3d09cdd --- /dev/null +++ b/prometheus/compose.yml @@ -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: diff --git a/prometheus/etc/prometheus/prometheus.yml b/prometheus/etc/prometheus/prometheus.yml new file mode 100644 index 0000000..f3b5197 --- /dev/null +++ b/prometheus/etc/prometheus/prometheus.yml @@ -0,0 +1,7 @@ +scrape_configs: + - job_name: "prometheus" + static_configs: + - targets: ["localhost:9090"] + - job_name: "node" + static_configs: + - targets: ["node-exporter:9100"]