Monit » History » Version 2

Anonymous, 08/19/2008 05:47 PM
Installation Guide: Update Monit

1 1 Anonymous
= Monit: Monitoring of Services =
2 1 Anonymous
You can find more about Monit at [http://mon.wiki.kernel.org/].
3 1 Anonymous
4 1 Anonymous
== Installation ==
5 1 Anonymous
 * Add the DAG repository on the ''master node'' and ''slave nodes''. Enter at the command line as ''root'':
6 1 Anonymous
{{{
7 1 Anonymous
 wget http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
8 1 Anonymous
 rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
9 1 Anonymous
}}}
10 1 Anonymous
11 1 Anonymous
 * Install Monit on the ''master node'' and ''slave nodes''. Enter at the command line as ''root'':
12 1 Anonymous
{{{
13 1 Anonymous
 yum install monit
14 1 Anonymous
}}}
15 1 Anonymous
16 1 Anonymous
== Configuration ==
17 1 Anonymous
 
18 1 Anonymous
=== Master node ===
19 1 Anonymous
 * Download the [source:Externals/Cluster/procksi_monit.tgz configuration files] from the repository and extract the files. Enter at the command line:
20 1 Anonymous
{{{
21 1 Anonymous
tar -xvzf procksi_monit.tgz
22 1 Anonymous
}}}
23 1 Anonymous
24 2 Anonymous
 * Copy the files in ''./monit/master'' to the appropriate directories (''/etc/'', ''/etc/monit.d/'', ''/home/procksi/monit/'').
25 1 Anonymous
26 1 Anonymous
 * Change permissions of the monit token file. Enter at the command line:
27 1 Anonymous
{{{
28 1 Anonymous
chown -R procksi.procksi_dev /home/procksi/monit/token
29 1 Anonymous
}}}
30 1 Anonymous
31 1 Anonymous
 * Edit the Apache configuration file ''/etc/httpd/conf/httpd.conf'':
32 1 Anonymous
{{{
33 1 Anonymous
#General Aliases for Monitoring and Testing
34 1 Anonymous
Alias /monit/    "/home/procksi/monit/"
35 1 Anonymous
Alias /ganglia/  "/usr/local/ganglia/html/"
36 1 Anonymous
Alias /trees/    "/home/procksi/trees/"
37 1 Anonymous
38 1 Anonymous
#Conditional Logging: Don't log Ganglia and Monit requests
39 1 Anonymous
SetEnvIf Request_URI "ganglia" dontlog
40 1 Anonymous
SetEnvIf Request_URI "^\/monit\/token$" dontlog
41 1 Anonymous
}}}
42 1 Anonymous
43 1 Anonymous
 * Restart the Apache server. Enter at the command line as ''root'':
44 1 Anonymous
{{{
45 1 Anonymous
/sbin/service httpd restart
46 1 Anonymous
}}}
47 1 Anonymous
48 1 Anonymous
 * Make the Monit daemon start at bootup. Enter at the command line as ''root'':
49 1 Anonymous
{{{
50 1 Anonymous
/sbin/chkconfig  monit  on
51 1 Anonymous
}}}
52 1 Anonymous
53 1 Anonymous
 * Start the Monit daemon. Enter at the command line as ''root'':
54 1 Anonymous
{{{
55 1 Anonymous
/sbin/service  monit  start
56 1 Anonymous
}}}
57 1 Anonymous
58 1 Anonymous
59 1 Anonymous
=== Slave nodes ===
60 1 Anonymous
 * Download the [source:Externals/Cluster/procksi_monit.tgz configuration files] from the repository and extract the files. Enter at the command line:
61 1 Anonymous
{{{
62 1 Anonymous
tar -xvzf procksi_monit.tgz
63 1 Anonymous
}}}
64 1 Anonymous
65 2 Anonymous
 * Copy a the files in ''./monit/slave'' to the appropriate directories (''/etc/'', ''/etc/monit.d/'').
66 1 Anonymous
67 1 Anonymous
 * Edit ''/etc/monit.d/system'' and set the correct host name for each slave node.
68 1 Anonymous
69 1 Anonymous
 * Make the Monit daemon start at bootup. Enter at the command line as ''root'':
70 1 Anonymous
{{{
71 1 Anonymous
/sbin/chkconfig  monit  on
72 1 Anonymous
}}}
73 1 Anonymous
74 1 Anonymous
 * Start the Monit daemon. Enter at the command line as ''root'':
75 1 Anonymous
{{{
76 1 Anonymous
/sbin/service  monit  start
77 1 Anonymous
}}}
78 1 Anonymous
79 1 Anonymous
80 1 Anonymous
== Online Monitoring ==
81 1 Anonymous
82 1 Anonymous
The status of each monitored service, process, file, etc. is available with the Monit's integrated webserver at port 2812 from ''localhost'' and selected machines. Username and password can be found at the secret [[wiki:secretAuthentication authentication]] page.
83 1 Anonymous
84 1 Anonymous
 || master01 || [http://procksi0.cs.nott.ac.uk:2812]
85 1 Anonymous
 || slave01  || [http://procksi1.cs.nott.ac.uk:2812]
86 1 Anonymous
 || slave02  || [http://procksi2.cs.nott.ac.uk:2812]
87 1 Anonymous
 || slave03  || [http://procksi3.cs.nott.ac.uk:2812]
88 1 Anonymous
 || slave04  || [http://procksi4.cs.nott.ac.uk:2812]
89 1 Anonymous
90 1 Anonymous
91 1 Anonymous
== Offline Monitoring ==
92 1 Anonymous
93 1 Anonymous
Monit sends alerts to "procksi@cs.nott.ac.uk" if services are unavailable, have been restarted, or similar events.