| |
Append following line:
mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc
Now start monit:
# inittab -q
You can verify that monit is started from /var/log/message log file:
# tail -f /var/log/messageOutput:
Nov 21 04:39:21 server monit[8759]: Starting monit daemon Nov 21 04:39:21 server monit[8759]: Monit started
If lighttpd died, you will see something as follows in log file:
Nov 21 04:45:13 server monit[8759]: 'lighttpd' process is not running Nov 21 04:45:13 server monit[8759]: 'lighttpd' trying to restart Nov 21 04:45:13 server monit[8759]: 'lighttpd' start: /etc/init.d/lighttpd
You may use monit to monitor daemon processes or similar programs running on localhost or started from /etc/init.d/ location such as
=> Apache Web Server
=> SSH Server
=> Postfix/Sendmail MTA
=> MySQL etc
Further readings
monit man page
monit official web site and documenation |
|