Posts Tagged ‘munit’
Monitoring with Monit
Sunday, August 3rd, 2008
There are two types of Linux Administrator; those that have discovered monit and those that have not. monit is a daemon that sits in the background keeping an eye on everything that’s running on your server and reporting back to you if things crash. Not only that, it can produce a pretty (more functional than pretty) status screen for you to view, with lots of reassuring green text for everything that is running:
Once you’ve set it up by either reading the manual or by reading a couple of the tutorials online it requires very little maintenance. Be careful if you are running apache2 as it needs a slightly different setup. If a process fails or restarts monit will email you.
But the real power of monit is that not only does it report if a service fails, it can take action to correct the problem, and it can even take action before the problem causes a crash. It can monitor CPU and Memory usage of a service so if they are using too much, or a process has crashed using 100% CPU it can be automatically restarted. It will of course restart crashed services.
The best thing about monit is it saves having to write a set of shell scripts to keep an eye on each individual service, saving you significant time in administration.
If you just can’t get enough of monitoring you server Its close relative munit which is extremely easy to setup on Debian is good for long term monitoring as it produces some very pretty historical graphs, even up to a year back. You have no excuse for not realising your hard disk will run out of space in 2 months time. But you might forget to check so monit can be set to send you an email when you are approaching 95%.
We employ both monit and munit on our web servers to ensure maximum uptime.


