Bash – Lightweight script for monitoring disk space, ports, etc.

bashdisk-space-utilizationmonitoringscripting

If I want to monitor some machines that I'm not the primary maintainer of (ie, I don't have access to install packages), are there any lightweight alternatives to things like Nagios? I'm looking for a script (bash, Perl, PHP, etc.) that does basic monitoring of Linux servers and services (disk space, web server, maybe cpu usage, etc.) and sends alerts when necessary.

I've found a few one-off scripts, but I'm surprised there isn't something slightly more comprehensive.

Best Answer

You can use Monit: http://www.ubuntugeek.com/monitoring-ubuntu-services-using-monit.html

It's lighter weight than Nagios, and it will do alerts and service mending. The drawback is that it's not as flexible as Nagios, and you may need something to monitor Monit (i.e., if it dies, you won't be doing any monitoring, as opposed to Nagios, which can do active checks against NRPE hosts).