Equipment: the system configured in Exercise 1, terminal access.
(3h) Writing a disk space monitoring script: periodically checking usage percentage and triggering an alert (a message in a dedicated log) if a given threshold (e.g. 80%) is exceeded.
(3h) Extending the script to also monitor CPU load and memory usage, with separate thresholds for each resource.
(3h) Scheduling the monitoring script via cron at a regular interval (e.g. every 15 minutes).
(2h) Testing the alert trigger by artificially simulating a load or disk fill near the defined threshold.
(2h) Writing a summary sheet documenting the full automation and monitoring setup put in place over the week.
Expected structure of the monitoring script: retrieving the current value (disk percentage, CPU load, memory usage) via the appropriate system commands, comparing it against a threshold defined as a variable, writing a timestamped alert line to a dedicated log file if the threshold is exceeded.
Central teaching point: stress that this basic script-based monitoring approach is a pedagogical starting point — in a real production environment, dedicated monitoring tools (to be chosen based on what is maintained and relevant at the time of teaching) offer far more comprehensive features (history, dashboards, multi-channel alerts).
◆ SUMMARY SHEET — WEEK 10 SELF-ASSESSMENT
1. I can write the syntax of a cron entry.
2. I can write a simple shell script with basic error handling.
3. I can schedule a script's automatic execution with cron.
4. I can explain why log rotation is necessary.
5. I can monitor disk space, CPU load and memory usage from the command line.
6. I can define a reasonable alert threshold for a system resource.
7. I can trigger a basic automatic alert when a threshold is exceeded.
8. I can document an automation setup that has been put in place.