Linux Server Health Monitoring & Scheduled Reporting

I wrote a Bash health check that runs from Cron. It checks memory, disk space and services and returns a clear exit code.

Overview

I built a server health check in Bash that runs on its own with Cron. It checks memory, disk space and important services and reports the overall health of the server.

What I set out to do

  • Run routine server health checks automatically and report a clear result.

What I did

  • I checked the Cron setup.
  • I ran the script by hand to see the report.
  • I scheduled it with Cron.

Screenshots

They are in the same order as in my repository. Click one to see it full size.

How I tested it

  • Cron ran the script on schedule and created the report.
  • Memory, disk and service checks returned OK with an overall healthy result.
  • When I simulated a failure the script caught it and returned a warning.
  • The script returned exit code 0 when the server was healthy.

Repository

My full notes and the original screenshots are on GitHub: linux-projects/13-linux-server-health-monitoring