- 1 Overview
- 2 Installing monit
- 3 Configuring monit
- 4 Starting and stopping monit
- 5 Configuring the system to run monit under init
- 6 What WormBase monitors
Load-balancing and automatic failover mechanisms are essential components of a high-availability system. Equally important is efficient detection of failing services and servers that may not fall under the auspices of the failover protocol. This may include monitoring the size of log files, the amount of disk space available, memory race conditions, and the availaibility of secondary services.
We use monit at WormBase to handle these tasks and more.
Monit is simple to install.
todd> cd ~/build todd> tar xzf ../src/monit*.tar.gz todd> cd monit* todd> ./configure todd> make todd> sudo make install
monit uses a fun free-text configuration file-format. Multiple instances of monit can be launched, each pointing to its own configuration file. By fun, I mean that it is much more fun that writing init scripts.
monit configuration files live at:
Test the monit configuration file
todd> monit -t -c /path/to/monitrc
Starting and stopping monit
Start monit by:
todd> monit -c /path/to/monitrc
Stop monit by:
todd> monit -c /path/to/monitrc quit
Configuring the system to run monit under init
We configure monit to run under init. To do this edit /etc/inittab with entries for each of the WormBase monitrc files:
todd> sudo nano /etc/inittab
// Add the following line as an example mo:2345:respawn:/usr/local/bin/monit -Ic /home/todd/monitrc
Force init to re-read the configuration file by
todd> sudo /sbin/telinit q
What WormBase monitors
Nothing can bring down a server faster than logs that eat up all available disk space or that grow to behemoth proportions. This is particularly true of the sgifaceserver log serverlog.wrm, a file that grows so fast it makes my head spin. If this file hits 2GB in size, sgifaceserver will crash.
The Squid Cache on fe.wormbase.org
The Cache Manager CGI
The Cache Manager CGI is only available from fe.wormbase.org:81. Note you must be "on localhost" in order to use this statistics viewer. You can access this CGI by tunneling port 81 traffic to fe.wormbase.org and then accessing the following URL:
CacheHost ¬†: fe.wormbase.org CachePort ¬†: 80 Managername¬†: [LSs canine] Password ¬†: [none required]
RRD Tool / real-time graphical analysis
You can also monitor squid performance in real-time graphically using RRDTools. Again, these tools are located behind the firewall on port fe.wormbase.org:81.
1 day statistics: http://localhost:81/squid-monitor/1day.cgi
1 week statistics: http://localhost:81/squid-monitor/1week.cgi
Select IP addresses can monitor httpd at:
I tend to disable this except when I am troubleshooting server load since it causes apache to unnecessarily keep track of lots of things.
Select IP addresses can also use my Apache::VMonitor script:
-- IN PROGRESS - it currently only works on apache2 --