In this video I show you how to setup Prometheus, Grafana and the Node Exporter so that you can monitor your server.
Join Discord: https://discord.gg/aj5FhGhcMy
0:00 - Intro
0:46 - Prometheus Configuration
5:13 - Node Exporter Configuration
6:41 - Firewall Configuration
8:17 - Grafana Configuration
11:42 - Grafana Dashboard
15:35 - Thank You for watching!
###### Prometheus Docker Compose ######
version: "3"
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- 909
0:9090
volumes:
- ./prometheus:/etc/prometheus
- ./prometheus-data:/prometheus
command: "--config.file=/etc/prometheus/prometheus.yml"
restart: unless-stopped
##################################
###### Prometheus YML ######
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'Node Exporter'
scrape_interval: 5s
static_configs:
- targets: ['192.168.0.2
01:9100']
##################################
###### Node Exporter Docker Compose ######
version: '3.8'
services:
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
- '--collector.systemd'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
-'/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro'
##################################
###### Firewall Configuration #######
firewall-cmd --get-default-zone
firewall-cmd --list-all
firewall-cmd --zone=public --permanent --add-port=9100/tcp
firewall-cmd --reload
#############################
###### Grafana Docker Compose #######
version: "3"
services:
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
ports:
- "30
00:3000"
volumes:
- ./grafana-data:/var/lib/grafana
restart: unless-stopped
#############################
For business inqueries or consultation send me an email to:
[email protected]
#prometheus #grafana #devops #devopstutorial #rockylinux #redhat #linux #linux_tutorial #homeserver