Infrastructure Monitoring.
Write eight independent Python helpers that validate monitoring policies, classify evidence, track failure streaks and recoveries, compare baselines, compute bounded schedules and prepare accurate handoffs.
Real Python, simulated monitoring: Your code runs against fictional device records and monitoring samples inside the isolated browser runtime. No network probes, scheduled background tasks, credential access, live tickets or service changes occur. The written lesson includes a separate, optional offline project.
Write it. Run it. Understand it.
Real Python execution, a variable trace and feedback against the requirements. You write the code—answers aren't revealed up front.
Validate a scheduled monitor's complete policy
Write monitor_policy(raw). Require a dictionary with exactly host, check, interval_s and timeout_s. host/check must be nonblank strings without newline or carriage-return characters, with check one of https, dns or backup after trimming and lowering. interval_s must be an actual int from 10 through 3600; timeout_s an actual int from 1 through 30 and strictly less than interval_s. Return a NEW dict with uppercase trimmed host, lowercase check, and unchanged numeric values. Return None for any invalid data, extra keys or bool values. Print the normalized host for the fictional sample.
APP-01Try solving it before asking for help. Hints never show a completed program.
Your printed output and errors will appear here.
Run the code, then step through the executed lines to watch variable values change.
When you finish Practice, use the shared Continue Your Learning Path panel below to mark this milestone complete. Continue to Lesson 05, Safe Remediation & Recovery, through that panel after completing the monitoring clinic; the integrated capstone remains in development.
