Difference between revisions of "Website:Monitoring services"
(New page: = Overview = Load-balancing and automatic failover mechanisms are essential components of a high-availability system. Equally important is efficient detection of failing services and ser...) |
|||
Line 9: | Line 9: | ||
Monit is simple to install. | Monit is simple to install. | ||
− | cd ~/build | + | todd> cd ~/build |
− | tar xzf ../src/monit*.tar.gz | + | todd> tar xzf ../src/monit*.tar.gz |
− | cd monit* | + | todd> cd monit* |
− | ./configure | + | todd> ./configure |
− | make | + | todd> make |
− | sudo make install | + | todd> sudo make install |
= Configuring monit = | = Configuring monit = | ||
monit uses a fun free-text configuration file-format. Multiple instances of monit can be launched, each pointing to its own configuration file. | monit uses a fun free-text configuration file-format. Multiple instances of monit can be launched, each pointing to its own configuration file. | ||
+ | |||
+ | monit configuration files live at: | ||
+ | /usr/local/wb/admin/conf/monit | ||
+ | |||
+ | == 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 |
Revision as of 15:08, 3 October 2007
Contents
Overview
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.
Installing monit
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
Configuring monit
monit uses a fun free-text configuration file-format. Multiple instances of monit can be launched, each pointing to its own configuration file.
monit configuration files live at:
/usr/local/wb/admin/conf/monit
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