Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can you make sure that monit is always running?

At the moment it's silently falling over and leaving the server unmonitored.

Server is running on CentOS.

share|improve this question

The best thing to do is trying to know what causes it to stop unexpectedly and then fixing it.

As a temporary/complementary remedy, you can run a cron job to monitor monit process and start it when it is not running.

share|improve this answer
something like "service monit start" running every hour? – Adam Jimenez Dec 3 '11 at 20:02
Yes, it is possible. However, you have to make sure you don't start multiple monit instances. Again, it is recommended first to see what is causing this stopping. – Khaled Dec 3 '11 at 20:07

The best way to keep monit running is to use monit :) Maybe...

Since you're using CentOS, are you running the packaged version of Monit from RPMForge (versus compiling your own)? If so, you can easily add logging to your Monit instance by uncommenting the set logfile directive in following stanza of your monit.conf config file...

## Set syslog logging with the 'daemon' facility. If the FACILITY option is
## omitted, Monit will use 'user' facility by default. If you want to log to
## a standalone log file instead, specify the full path to the log file
set logfile syslog facility log_daemon

Doing so will enable syslog and will output to /var/log/messages. From here, you can examine why the daemon fails. Also consider posting your config here.

share|improve this answer
yes I am running the RPMforge version. I've uncommented the directive and see what it comes up with, thanks. – Adam Jimenez Dec 3 '11 at 20:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.