After fixing up and posting hardik's article on Monit I've setup my own system monitoring.
I'm monitoring:
Here's the /etc/monit/monitrc file I used:
check process apache with pidfile /var/run/apache2.pid start program = "/etc/init.d/apache2 start" stop program = "/etc/init.d/apache2 stop" if failed host 127.0.0.1 port 80 protocol http then restart if 5 restarts within 5 cycles then timeout check process mysql with pidfile /var/run/mysqld/mysqld.pid group database start program = "/etc/init.d/mysql start" stop program = "/etc/init.d/mysql stop" if failed host 127.0.0.1 port 3306 then restart if 5 restarts within 5 cycles then timeout check process sshd with pidfile /var/run/sshd.pid start program "/etc/init.d/ssh start" stop program "/etc/init.d/ssh stop" if failed port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout check process named with pidfile /var/run/named.pid start program = "/etc/init.d/bind start" stop program = "/etc/init.d/bind stop" if failed host 127.0.0.1 port 53 type tcp then alert if failed host 127.0.0.1 port 53 type udp then alert if 5 restarts within 5 cycles then timeout check process exim4 with pidfile /var/run/exim4/exim.pid start program = "/etc/init.d/exim4 start" stop program = "/etc/init.d/exim4 stop" if failed host 127.0.0.1 port 25 protocol smtp then alert if 5 restarts within 5 cycles then timeout check process clamavd with pidfile /var/run/clamav/clamd.pid start program = "/etc/init.d/clamav-daemon start" stop program = "/etc/init.d/clamav-daemon stop" if failed unixsocket /var/run/clamav/clamd.ctl then restart if 5 restarts within 5 cycles then timeout
I've been meaning to setup this for a while, but it is something I've never gotten around to.
[ Parent ]
Yeah I guess that's a little strange.
If SMTP is broken on port 25 then mail will not be delivered via the first mailserver - but monit can be configured to use more than one SMTP server, so all is good:
set mailserver mail.tildeslash.com, mail.foo.bar port 10025, localhost with timeout 15 secondsHere monit will first try to connect to the server ``mail.tildeslash.com'', if this server is down monit will try ``mail.foo.bar'' on port 10025 and finally ``localhost''.
(This is taken straight from the online manual.)
Steve
--
[ Parent ]
[ Parent ]
I could certainly do that on the front page for the 'Read More / Post Comments' link (along with the random links on the sidebar, and the 'next' + 'previous' articles) - is that what you mean?
Updating all the links contained in weblog engries, or comments would be a massive hand-editting job though, and wouldn't happen.
Steve
--
[ Parent ]
[ Parent ]
Just allow 127.0.0.1 and that will allow loopback connections - which should be sufficient to allow monitoring and keeping the SSH deamon secure.
[ Parent ]
[ Parent ]
[ Parent ]
[ Parent ]
With Cheers,
Hardik Dalwadi.
[ Parent ]