- Add the
node_exporter
service to your project's compose file
services:
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
ports:
- "9100"
- Deploy the project using Preevy
preevy up
Copy the URL for the node_exporter service.
Repeat this step for all your environments.
-
Customize prometheus/prometheus.yaml to add the node_exporter URLs from the deployed environments to the
targets
element. -
Run
docker compose up -d
to start the Prometheus and Grafana services on your machine. You could also use Preevy to host the services as an environment. -
Login to Grafana at http://localhost:9091 (default username/password is grafana/grafana). Under "dashboards", you should see the "Node Exporter full" dashboard.