Install Grafana on AlmaLinux 9
Step 1 – Install
cat > /etc/yum.repos.d/grafana.repo <<EOF
[grafana]
name=grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://rpm.grafana.com/gpg.key
EOF
dnf install -y grafana
systemctl enable --now grafana-server
Step 2 – Access
http://your-server:3000 — default admin / admin (change immediately).
Step 3 – Add Prometheus data source
- Configuration → Data Sources → Add data source
- Select Prometheus, URL:
http://localhost:9090 - Save & Test
Step 4 – Import dashboards
| Dashboard | ID |
|---|---|
| Node Exporter Full | 1860 |
| Nginx | 9614 |
| MySQL Overview | 7362 |
| PostgreSQL Statistics | 9628 |
Dashboards → Import → enter ID → select Prometheus source.
Step 5 – SMTP alerts (/etc/grafana/grafana.ini)
[smtp]
enabled = true
host = smtp.example.com:587
user = [email protected]
password = SmtpPass!
from_address = [email protected]
systemctl restart grafana-server