The disk that filled up overnight
On Monday morning, the school mail server is down. The disk filled up over the weekend. Nobody knew, because nobody was watching.
The disk had been growing for months. A graph would have shown it running out. An alert would have sent a message three weeks ago.
Watching, recording and planning is the work of monitoring, logging and capacity management.
Key words
| Word | What it means |
|---|---|
| Monitoring | watching a system all the time and measuring how it is doing |
| Metric | one measured number, such as how many requests a server has had |
| Alert | a message sent when a metric goes past a limit |
| Threshold | the limit that, when passed, makes an alert |
| Log | a file where a program writes what happened, with the time |
| Capacity management | making sure a system always has enough room and power, now and later |
| Load | how much work a server is doing at one time |
| CPU | the main processor of a computer |
| RAM | the short term memory of a computer |
| Network | computers and devices joined together so they can share data |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can explain monitoring, logging and capacity management, read real server numbers and work out when a disk will fill.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Monitoring and alerts
Monitoring measures a system all the time. Each measure is a metric: CPU use, free disk space, how many users are connected.
A graph of a metric shows trends. A threshold turns it into an alert. For example: if free disk space falls below a set amount, send an email to the technician.
Alerts mean nobody has to stare at a screen.
Logging: the record of events
A log records what happened and when. A web server logs every request. A switch logs when a port goes down. A login system logs every failed password.
Logs help in three ways: to find the cause of a fault, to spot an attack, and to prove what happened. Keep logs safe and in time order. Big firms send logs from every device to one place.
See real numbers
The lab has a small web server called app. A helper program reads its status page and turns it into metrics.
Press Start the lab, then press Run on each command in turn.
Read the web server status page
curl -s http://app:8081/stub_statusA command for the lesson’s lab terminal. It is shown here and not run.
How to read it
Note
"Active connections" is how many people are connected now. The three numbers under "server accepts handled requests" are connections accepted, connections handled and total requests. "Reading, Writing, Waiting" shows what each connection is doing.