Prometheus: What Is Monitoring?
Monitoring is watching a system so you know it is broken before your users tell you. It turns a silent failure into a visible signal.
The pager at 3am
A shop stops taking orders at 3am. Nobody is awake to notice.
shop down at 03:00 -> nobody notices
shop down at 03:00 -> monitor notices in secondsWhat a monitor reports
A monitor reports facts, not feelings. Each fact is a number with a time.
orders per minute: 0
free disk space: 412 MB
response time: 8.4 secondsExample
curl -s http://127.0.0.1:18101/metrics | grep shopsentry_upKey points
- Monitoring: watching a running system and recording how it behaves over time.
- A monitor checks health again and again, not just once at launch.
- A good monitor answers two questions: is it working, and how well is it working?
- Monitoring catches slow harm too, like a disk filling up over days.
- Without monitoring, the first warning is often an angry user message.
In this example, the demo shop service ShopSentry answers a health check with the number 1. The number 1 means the shop is serving normally. A monitor reads this number again and again, so a change to 0 would be spotted within seconds.
Note
Monitoring watches the system but does not fix it by itself.
Try it Yourself
Edit the code, then press Run.
Running is simulated Β· Rust Playground
Exercise
What is the main job of monitoring?