Menu

Linux Server Monitoring with Prometheus, Grafana and Alertmanager (Docker Compose, Alerts That Matter)
📰

Linux Server Monitoring with Prometheus, Grafana and Alertmanager (Docker Compose, Alerts That Matter)

DEV Community: docker·parsa shahmohammadi·18 days ago
#YCVApE7z
#devtodocker#devto#dev#prometheus#alert
Long article (1149 words) — no AI summary yet.
Reading 0:00
15s threshold

Most servers get monitored after the first outage. By then you're reading logs to find out what happened, when an alert could have told you an hour earlier that the disk was filling up.

This guide sets up a small monitoring stack in one Docker Compose file : node_exporter collects host metrics, Prometheus stores them and evaluates alert rules, Alertmanager sends the alerts (Telegram or email), and Grafana draws the dashboards. Then it adds the five alert rules worth starting with, and leaves out the rest.

You need a Linux server with Docker Engine and the Compose plugin ( docker compose version should work).

The layout

monitoring/ ├── docker-compose.yml ├── prometheus/ │ ├── prometheus.yml │ └── alerts.yml └── alertmanager/ └── alertmanager.yml

Enter fullscreen mode

Exit fullscreen mode

Step 1: docker-compose.yml

services : prometheus : image : prom/prometheus:v2.53.0 volumes : - ./prometheus:/etc/prometheus:ro - prometheus-data:/prometheus command : - --config.file=/etc/prometheus/prometheus.yml -…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.