Hands-on guide series
Metrics & Monitoring with Prometheus: A Hands-On Guide
A four-part, hands-on guide to seeing inside your server: node_exporter metrics, Prometheus collecting and storing them, PromQL to ask real questions, and alert rules that page you before users notice. Every command tested on a live server.
What you will build
Security is layers, not a switch. Each part closes a different category of attack, from the automated sweep that finds a brand-new server, to the day one gets in anyway. Read them in order, or jump to what you need.
- 1
Metrics from Your Servernode_exporter reads your Ubuntu server's CPU, memory, disk, and load, then publishes them as Prometheus metrics. Install it and read the raw numbers yourself.7 min - 2
Collecting with PrometheusPrometheus scrapes your exporters every few seconds and stores the history. Write the scrape config, point it at your targets, and confirm both report up.7 min - 3
Asking Questions with PromQLPromQL turns raw metrics into answers: memory used, disk full, CPU busy. Learn the rate() and aggregation queries you will reach for constantly.7 min - 4
Alerting Before Users NoticeTurn PromQL queries into Prometheus alerting rules that page you before an outage, then route them through Alertmanager with two habits that beat noise.7 min