/[monit]/monit/monitrc
ViewVC logotype

Diff of /monit/monitrc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by chopp, Fri Jun 6 09:31:16 2003 UTC revision 1.34 by martinp, Mon Jun 9 19:33:42 2003 UTC
# Line 5  Line 5 
5  # insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'  # insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'
6  #  #
7  # Legal keywords are  # Legal keywords are
8  #   check          -- Must be followed by a descriptive name for the  #   check          -- Must be followed by type of monitored service
9  #                     program.  #                     {device|directory|file|process} and descriptive
10  #                      #                     name for the service.
11  #   pidfile        -- Must be followed by a path to the programs pidfile.  #
12    #   pidfile        -- Must be followed by a path to the process's pidfile.
13  #                     Such a file should contain only one entry, a number  #                     Such a file should contain only one entry, a number
14  #                     representing the process's pid. (See the apache pid  #                     representing the process's pid. (See the apache pid
15  #                     file for an example)  #                     file for an example)
16  #  #
17  #   group          -- Must be followed by a descriptive name for a process  #   path           -- Must be followed by a path to the block special file
18  #                     group. This statement can be used to group together  #                     for filesystem (device), regular file, directory or
19  #                     several processes. Monit can start/stop/restart a  #                     process's pidfile.
20  #                     group of processes.  #
21    #   group          -- Must be followed by a descriptive name for a monitored
22    #                     services group. This statement can be used to group together
23    #                     several services. Monit can start/stop/restart a
24    #                     group of services.
25  #                      #                    
26  #   start          -- Must be followed by a full path to a program for  #   start          -- Must be followed by a full path to a program for
27  #                     starting the process. If you need to specify arguments  #                     starting the service. If you need to specify arguments
28  #                     to the program, enclose the program and arguments in  #                     to the program, enclose the program and arguments in
29  #                     quotes - like: "/local/bin/program -i start".  #                     quotes - like: "/local/bin/program -i start".
30  #                     This entry is optional.  #                     This entry is optional.
31  #  #
32  #   stop           -- Must be followed by a full path to a program for  #   stop           -- Must be followed by a full path to a program for
33  #                     stopping the process. If you need to specify arguments  #                     stopping the service. If you need to specify arguments
34  #                     to the program, enclose the program and arguments in  #                     to the program, enclose the program and arguments in
35  #                     quotes - like: "/local/bin/program -i stop".  #                     quotes - like: "/local/bin/program -i stop".
36  #                     This entry is optional.  #                     This entry is optional.
# Line 85  Line 90 
90  #                     poll-cycles. This statement is optional.  #                     poll-cycles. This statement is optional.
91  #  #
92  #   alert          -- Specifies an email address for notification if a  #   alert          -- Specifies an email address for notification if a
93  #                     process timed out or restarted. This statement is  #                     service timed out or restarted. This statement is
94  #                     optional. More than one alert statement is allowed.  #                     optional. More than one alert statement is allowed.
95  #  #
96  #   checksum       -- Must be followed by a list of files with an absolute  #   checksum       -- Must be followed by a list of files with an absolute
# Line 101  Line 106 
106  #                     unit and action. This statement is optional. More than  #                     unit and action. This statement is optional. More than
107  #                     one timestamp statement is allowed.  #                     one timestamp statement is allowed.
108  #    #  
109  #   every          -- Only check the program at every n cycles. Optional.  #   every          -- Only check the service at every n cycles. Optional.
110  #  #
111  #   mode           -- Must be followed either by the keyword active, passive  #   mode           -- Must be followed either by the keyword active, passive
112  #                     or manual. If active, monit will restart the program  #                     or manual. If active, monit will restart the service
113  #                     if it is not running (this is the default behaviour).  #                     if it is not running (this is the default behaviour).
114  #                     If passive, monit will only monitor and send alerts  #                     If passive, monit will only monitor and send alerts
115  #                     (resource related restart and stop options are ignored  #                     (resource related restart and stop options are ignored
# Line 116  Line 121 
121  #                     point number, optionally a maximum number of cycles  #                     point number, optionally a maximum number of cycles
122  #                     and an action.  This statement is used to check the  #                     and an action.  This statement is used to check the
123  #                     cpu usage in percent of a process with it's children  #                     cpu usage in percent of a process with it's children
124  #                     over a number of cylces.  If the compare expression  #                     over a number of cycles.  If the compare expression
125  #                     matches the action (restart, alert or stop) is used.  #                     matches the action (restart, alert or stop) is used.
126  #  #
127  #   memusage       -- The equivalent to cpuusage for memory of a process  #   memusage       -- The equivalent to cpuusage for memory of a process
# Line 137  Line 142 
142  #                     operator, a floating point number, optionally a  #                     operator, a floating point number, optionally a
143  #                     maximum number of cycles and an action.  This statement  #                     maximum number of cycles and an action.  This statement
144  #                     is used to check the system load average over a number  #                     is used to check the system load average over a number
145  #                     of cylces.  If the compare expression matches the action  #                     of cycles.  If the compare expression matches the action
146  #                     (restart, alert or stop) is used.  #                     (restart, alert or stop) is used.
147  #  #
148  #   depends        -- Must be followed by the name of a process or a list of  #   depends        -- Must be followed by the name of a service or a list of
149  #                     processes *this* process depends on to run  #                     services *this* service depends on to run
150  #                     before it starts. The list of depend processes  #                     before it starts. The list of depend services
151  #                     will be stopped before the current process is started  #                     will be stopped before the current service is started
152  #                     and started again after.  #                     and started again after.
153  #    #  
154    #   space          -- Must be followed by a compare operator, integer number,
155    #                     unit {B|KB|MB|GB|%|byte|kilobyte|megabyte|gigabyte|percent}
156    #                     and action.
157    #  
158    #   inode(s)       -- Must be followed by a compare operator, integer number,
159    #                     optionaly by percent sign (if not, the limit is absolute)
160    #                     and action (required).
161    #
162    #   perm(ission)   -- Must be followed by an octal number describing permissions.
163    #  
164  # Legal global option statements are  # Legal global option statements are
165  #  #
166  #   set daemon     -- Must be followed by a number (in seconds)  #   set daemon     -- Must be followed by a number (in seconds)
# Line 197  Line 212 
212  #  #
213  #  #
214  # The noise keywords `if', `and', `the', `with', `has', `using', `use',  # The noise keywords `if', `and', `the', `with', `has', `using', `use',
215  # `on(ly)', `for',  `than`, `then` and `program(s)' are ignored anywhere  # `on(ly)', `for',  `than`, `then`, `usage` and `program(s)' are ignored anywhere
216  # in an entry; they can be used to make  it resemble English.  The  # in an entry; they can be used to make  it resemble English.  The
217  # punctuation characters `,' `;' and '=' are also ignored.  # punctuation characters `,' `;' and '=' are also ignored.
218  #  #
219  #  #
220  # Here's an example for monitoring an apache web-server on port  # Here's an example for monitoring an apache web-server on port
221  # HTTP and HTTPS and a Sybase Database Server:  # HTTP and HTTPS, Sybase Database Server and filesystems:
222  #  #
223  # [NB! Check and edit for your system and uncomment below]  # [NB! Check and edit for your system and uncomment below]
224  #  #
# Line 217  Line 232 
232  #     allow localhost       # allow localhost to connect to the server and  #     allow localhost       # allow localhost to connect to the server and
233  #     allow hauk:monit      # user 'hauk' with password 'monit'  #     allow hauk:monit      # user 'hauk' with password 'monit'
234  #  #
235  #  check apache with pidfile /usr/local/apache/logs/httpd.pid  #  check process apache with pidfile /usr/local/apache/logs/httpd.pid
236  #    start program = "/etc/init.d/httpd start"  #    start program = "/etc/init.d/httpd start"
237  #    stop program  = "/etc/init.d/httpd stop"  #    stop program  = "/etc/init.d/httpd stop"
238  #    host www.tildeslash.com port 80 protocol http  #    host www.tildeslash.com port 80 protocol http
# Line 238  Line 253 
253  #    depends on sybase  #    depends on sybase
254  #      #    
255  #  #
256  #  check sybase with pidfile /var/run/sybase.pid  #  check process sybase with pidfile /var/run/sybase.pid
257  #    start program = "/etc/init.d/sybase start"  #    start program = "/etc/init.d/sybase start"
258  #    stop program  = "/etc/init.d/sybase stop"  #    stop program  = "/etc/init.d/sybase stop"
259  #    mode passive  #    mode passive
260  #    port 4001  #    port 4001
261  #    timeout if 2 restarts within 3 cycles  #    timeout if 2 restarts within 3 cycles
262  #    alert foo@bar  #    alert foo@bar
263    #    depends on datafs
264    #    group database
265    #
266    #
267    #  check device datafs with path /dev/sdb1
268    #    start program  = "/bin/mount /data"
269    #    stop program  = "/bin/umount /data"
270    #    if space usage > 80 % then alert
271    #    if space usage > 99 % then stop
272    #    if inode usage > 80 % then alert
273    #    if inode usage > 99 % then stop
274    #    alert root@localhost
275  #    group database  #    group database
276    #
277    #
278    #  check device rootfs with path /dev/sda1
279    #    if space usage > 3 GB then alert
280    #    if inode usage > 30000 then alert
281    #    mode passive
282    #    alert root@localhost
283    #
284    #
285    #  check file su with path /bin/su
286    #    perm 4755
287    #    alert root@localhost
288    #
289    #
290    #  check directory bin with path /bin
291    #    perm 755
292    #    alert root@localhost

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26