Prometheus / Grafana Dashboard
After you've created the prometheus.yml file and have deployed the docker-compose, the rest of the steps are as follows:
- Select DataSource on home page. Select Prometheus.
- Search for: "node exporter grafana dashboards" on Google
- Look for results on grafana.com
- Find ID of the dashboard you like
(This is the dashboard I like: https://grafana.com/grafana/dashboards/11074)
- Import ID in Grafana
Docker Compose
version: '3.3'
services:
node-exporter:
network_mode: host
pid: host
volumes:
- '/:/host:ro,rslave'
image: 'quay.io/prometheus/node-exporter:latest'
prometheus:
container_name: prometheus
ports:
- '9091:9090' #modify 9091 to your setup needs
volumes:
- '/volume1/Configs/Prometheus/prometheus.yml:/etc/prometheus/prometheus.yml' #modify the path for your install location
image: prom/prometheus
grafana:
container_name: grafana
ports:
- '3457:3000' #modify 3457 to your setup needs
image: grafana/grafana
prometheus.yml
global:
scrape_interval: 5s
external_labels:
monitor: 'node'
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['192.168.68.127:9090'] ## IP Address of the localhost. Match the port to your container port
- job_name: 'node-exporter'
static_configs:
- targets: ['192.168.68.127:9100'] ## IP Address of the localhost