Monit » History » Version 3

Anonymous, 08/19/2008 05:57 PM
Installation Guide: 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 3 Anonymous
On the master node, the following services will be monitore:
20 3 Anonymous
apache, cron, devices (/ & /home), mysql, nfs, ntp, pbs_mom, pbs_sched, pbs_server, postfix, ssh, system, ypbind, yppasswd, ypserv
21 3 Anonymous
The monitoring of pbs_maui is switched off in favour of pbs_sched.
22 3 Anonymous
23 1 Anonymous
 * Download the [source:Externals/Cluster/procksi_monit.tgz configuration files] from the repository and extract the files. Enter at the command line:
24 1 Anonymous
{{{
25 1 Anonymous
tar -xvzf procksi_monit.tgz
26 1 Anonymous
}}}
27 1 Anonymous
28 2 Anonymous
 * Copy the files in ''./monit/master'' to the appropriate directories (''/etc/'', ''/etc/monit.d/'', ''/home/procksi/monit/'').
29 1 Anonymous
30 1 Anonymous
 * Change permissions of the monit token file. Enter at the command line:
31 1 Anonymous
{{{
32 1 Anonymous
chown -R procksi.procksi_dev /home/procksi/monit/token
33 1 Anonymous
}}}
34 1 Anonymous
35 1 Anonymous
 * Edit the Apache configuration file ''/etc/httpd/conf/httpd.conf'':
36 1 Anonymous
{{{
37 1 Anonymous
#General Aliases for Monitoring and Testing
38 1 Anonymous
Alias /monit/    "/home/procksi/monit/"
39 1 Anonymous
Alias /ganglia/  "/usr/local/ganglia/html/"
40 1 Anonymous
Alias /trees/    "/home/procksi/trees/"
41 1 Anonymous
42 1 Anonymous
#Conditional Logging: Don't log Ganglia and Monit requests
43 1 Anonymous
SetEnvIf Request_URI "ganglia" dontlog
44 1 Anonymous
SetEnvIf Request_URI "^\/monit\/token$" dontlog
45 1 Anonymous
}}}
46 1 Anonymous
47 1 Anonymous
 * Restart the Apache server. Enter at the command line as ''root'':
48 1 Anonymous
{{{
49 1 Anonymous
/sbin/service httpd restart
50 1 Anonymous
}}}
51 1 Anonymous
52 1 Anonymous
 * Make the Monit daemon start at bootup. Enter at the command line as ''root'':
53 1 Anonymous
{{{
54 1 Anonymous
/sbin/chkconfig  monit  on
55 1 Anonymous
}}}
56 1 Anonymous
57 1 Anonymous
 * Start the Monit daemon. Enter at the command line as ''root'':
58 1 Anonymous
{{{
59 1 Anonymous
/sbin/service  monit  start
60 1 Anonymous
}}}
61 1 Anonymous
62 1 Anonymous
63 1 Anonymous
=== Slave nodes ===
64 3 Anonymous
On the master node, the following services will be monitore:
65 3 Anonymous
devices (/ and /scratch), nfs, ntp, pbs_mom, ssh, system, ypbind
66 3 Anonymous
67 1 Anonymous
 * Download the [source:Externals/Cluster/procksi_monit.tgz configuration files] from the repository and extract the files. Enter at the command line:
68 1 Anonymous
{{{
69 1 Anonymous
tar -xvzf procksi_monit.tgz
70 1 Anonymous
}}}
71 1 Anonymous
72 2 Anonymous
 * Copy a the files in ''./monit/slave'' to the appropriate directories (''/etc/'', ''/etc/monit.d/'').
73 1 Anonymous
74 1 Anonymous
 * Edit ''/etc/monit.d/system'' and set the correct host name for each slave node.
75 1 Anonymous
76 1 Anonymous
 * Make the Monit daemon start at bootup. Enter at the command line as ''root'':
77 1 Anonymous
{{{
78 1 Anonymous
/sbin/chkconfig  monit  on
79 1 Anonymous
}}}
80 1 Anonymous
81 1 Anonymous
 * Start the Monit daemon. Enter at the command line as ''root'':
82 1 Anonymous
{{{
83 1 Anonymous
/sbin/service  monit  start
84 1 Anonymous
}}}
85 1 Anonymous
86 1 Anonymous
87 1 Anonymous
== Online Monitoring ==
88 1 Anonymous
89 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.
90 1 Anonymous
91 1 Anonymous
 || master01 || [http://procksi0.cs.nott.ac.uk:2812]
92 1 Anonymous
 || slave01  || [http://procksi1.cs.nott.ac.uk:2812]
93 1 Anonymous
 || slave02  || [http://procksi2.cs.nott.ac.uk:2812]
94 1 Anonymous
 || slave03  || [http://procksi3.cs.nott.ac.uk:2812]
95 1 Anonymous
 || slave04  || [http://procksi4.cs.nott.ac.uk:2812]
96 1 Anonymous
97 1 Anonymous
98 1 Anonymous
== Offline Monitoring ==
99 1 Anonymous
100 1 Anonymous
Monit sends alerts to "procksi@cs.nott.ac.uk" if services are unavailable, have been restarted, or similar events.