PrometheusGrafana
Monitoring and logs
Know when something breaks: metrics, logs, alerts, uptime checks and dashboards.
- 10 lessons
- 4h 10m estimated time
- 3 hands-on labs
- 3 animated diagrams
- 10 quizzes
2 beginner, 8 intermediate. Start at the top or pick a chapter below.
0 of 10 done
Saved in this browser as you finish lessons.
More
Further lessons in this track.
01 Up next What to monitor first on a small server Monitor a small server by watching the four golden signals (latency, traffic, errors, saturation) through a short list of checks: uptime from outside, disk, memory, error rate, certificate expiry and backups. 10 min Beginner 02 Up next Uptime checks with a bash script and a systemd timer An uptime check is a script on a different machine that requests your URL on a schedule, checks the status and body, and sends a webhook alert only when the state changes. 25 min Intermediate Lab 03 Up next Log basics on Linux: journald, journalctl and logrotate Services write logs to stdout, which journald stores, or to files, which logrotate rotates; cap both so logs never fill the disk and read them with journalctl. 20 min Beginner Lab 04 Up next Centralize logs with rsyslog or Loki Centralizing logs means shipping them from each server to one searchable place, either with rsyslog forwarding over TCP or with a collector that pushes to Grafana Loki. 30 min Intermediate Diagram 05 Up next Prometheus and node_exporter basics for a Linux server Prometheus pulls metrics over HTTP from exporters such as node_exporter on port 9100, stores them as time series and lets you query them with PromQL. 30 min Intermediate Diagram 06 Up next Grafana dashboards for CPU, memory and disk Grafana draws Prometheus data as graphs: add Prometheus as a data source, write one PromQL query per panel, add an instance variable and keep Grafana behind HTTPS with a changed admin password. 30 min Intermediate 07 Up next Alerting without alert fatigue: Prometheus and Alertmanager Good alerting fires only on symptoms a human must act on, waits with a for duration to avoid blips, separates pages from tickets and uses Alertmanager to group, inhibit and silence notifications. 25 min Intermediate Diagram 08 Up next Disk, memory and CPU alerts that matter (Prometheus rules) The alerts worth having on a server are disk predicted to fill, low filesystem space, low available memory, OOM kills, sustained CPU and load, heavy swap and a node that stopped reporting, each with thresholds you tune. 25 min Intermediate 09 Up next Container metrics with cAdvisor and docker stats docker stats shows live per-container CPU and memory in the terminal, while cAdvisor exports the same data as Prometheus metrics so you can graph and alert on each container. 25 min Intermediate Lab 10 Up next Build a public status page for your service A public status page tells users whether your service works right now; host it separately from the service it reports on and update it from a check script or a self-hosted status tool. 30 min Intermediate