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.
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.
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.
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.