/[monit]/monit/monit.pod
ViewVC logotype

Diff of /monit/monit.pod

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

revision 1.21 by hauk, Fri Sep 6 17:24:13 2002 UTC revision 1.22 by hauk, Sat Sep 7 12:25:59 2002 UTC
# Line 341  variables was used. If used they will be Line 341  variables was used. If used they will be
341  text with a special value:  text with a special value:
342    
343  I<$EVENT> A string describing the event that occured. The values  I<$EVENT> A string describing the event that occured. The values
344  are fixed and are, "restarted", "timed out" and "checksum error"  are fixed and are, "restarted", "timed out", "stopped and
345    "checksum error"
346    
347  I<$PROGRAM> The program entry name in monitrc  I<$PROGRAM> The program entry name in monitrc
348    
# Line 463  STOP stops the service in case the maxim Line 464  STOP stops the service in case the maxim
464  been reached. If monit stops a service it will not be checked by  been reached. If monit stops a service it will not be checked by
465  monit anymore nor restarted again later. You must explicit start  monit anymore nor restarted again later. You must explicit start
466  it again from the web interface or from the console, like: 'monit  it again from the web interface or from the console, like: 'monit
467  start apache' if you want monit to monitor the service again.  start apache' if you want the monit daemon to monitor the service
468    again.
469    
470  To calculate the cycles a counter is raised whenever the  To calculate the cycles a counter is raised whenever the
471  expression above is true and it is lowered whenever it is false  expression above is true and it is lowered whenever it is false
# Line 778  Comments begin with a '#' and extend thr Line 780  Comments begin with a '#' and extend thr
780  Otherwise the file consists of a series of program entries or  Otherwise the file consists of a series of program entries or
781  global option statements in a free-format, token-oriented syntax.  global option statements in a free-format, token-oriented syntax.
782    
   
783  There are three kinds of tokens: grammar keywords, numbers (i.e.  There are three kinds of tokens: grammar keywords, numbers (i.e.
784  decimal digit sequences) and strings. Strings can be either  decimal digit sequences) and strings. Strings can be either
785  quoted or unquoted. A quoted string is bounded by double quotes  quoted or unquoted. A quoted string is bounded by double quotes
# Line 787  string).  An unquoted string is any whit Line 788  string).  An unquoted string is any whit
788  containing characters and/or numbers.  containing characters and/or numbers.
789    
790  Each program entry consists of the keywords `check', followed by  Each program entry consists of the keywords `check', followed by
791  a descriptive name for the program, which is again followed by a  a unique descriptive name for the program, which is again
792  path to the program's pidfile. For monit to be able to start and  followed by a path to the program's pidfile. A check entry can
793  stop the program, use the following keywords, 'start and 'stop -  have a number of optional statements. These statements are
794  followed by a string specifying a path to a program for  described below and in the example section.
795  respectively starting and stopping the process. If the program  
796  listens on certain portnumbers you can state this with the  You can use the noise keywords like 'if', `and', `with(in)',
797  keyword 'port' followed by a number indicating the portnumber,  `has', `using', 'use', 'on(ly)' and `program' anywhere in an
798  one or more times.  entry to make it resemble English. They're ignored, but can make
799    entries much easier to read at a glance. The punctuation
800  You can use the noise keywords 'if', `and', `with(in)', `has',  characters ';' ',' and '=' are also ignored. Keywords are case
801  `using', 'use', 'on(ly)' and `program' anywhere in an entry to  insensitive.
 make it resemble English. They're ignored, but can make entries  
 much easier to read at a glance. The punctuation characters ';'  
 ',' and '=' are also ignored. Keywords are case insensitive.  
802    
803   Here are the legal global keywords:   Here are the legal global keywords:
804    
# Line 809  much easier to read at a glance. The pun Line 807  much easier to read at a glance. The pun
807   set daemon      Set a background poll interval in seconds   set daemon      Set a background poll interval in seconds
808   set init        Set monit to run from init   set init        Set monit to run from init
809   set logfile     Name of a file to dump error- and status-   set logfile     Name of a file to dump error- and status-
810                   messages to.                   messages to. If syslog is specified as the
811                     file, monit will utilize the syslog daemon
812                     for logging messages.
813   set mailserver  The mailserver used for sending alert   set mailserver  The mailserver used for sending alert
814                   notifications. If the mailserver is not                   notifications. If the mailserver is not
815                   defined, monit will try to use 'localhost'                   defined, monit will try to use 'localhost'
# Line 869  much easier to read at a glance. The pun Line 869  much easier to read at a glance. The pun
869                   You're welcome to write new protocol test                   You're welcome to write new protocol test
870                   modules. If no protocol is specified monit                   modules. If no protocol is specified monit
871                   will use a default test which in most cases                   will use a default test which in most cases
872                   is good enough.                   are good enough.
873   request         Specifies a server request and must come   request         Specifies a server request and must come
874                   after the protocol keyword mentioned above.                   after the protocol keyword mentioned above.
875                    - for http it can contain an URI and an                    - for http it can contain an URI and an
# Line 885  much easier to read at a glance. The pun Line 885  much easier to read at a glance. The pun
885                   is the cycle interval to test restarts.                   is the cycle interval to test restarts.
886                   This statement is optional                   This statement is optional
887   alert           Specifies an email address for notification   alert           Specifies an email address for notification
888                   if checksum, timeout or restart occurs.                   if checksum, timeout, stop or restart occurs.
889                   Alert can also be postfixed, to only send a                   Alert can also be postfixed, to only send a
890                   message for certain events. See the examples                   message for certain events. See the examples
891                   above. This statement is also optional.                   above. More than one alert statement is allowed
892                     in an entry. This statement is also optional.
893   mail-format     Specifies a mail format for an alert message   mail-format     Specifies a mail format for an alert message
894                   This statement is an optional part of the                   This statement is an optional part of the
895                   alert statement.                   alert statement.
# Line 1053  if it is not running: Line 1054  if it is not running:
1054     alert bofh@foo.bar     alert bofh@foo.bar
1055     group database     group database
1056    
1057  Here is an example to show the usage resource checks.  It will  Here is an example to show the usage of the resource checks. It
1058  send an alert when the CPU usage of the http daemon and it's  will send an alert when the CPU usage of the http daemon and it's
1059  child processes raises beyond 60% for over two cycles.  It  child processes raises beyond 60% for over two cycles.  It is
1060  is restarted when the CPU usage it over 80% for five cycles,  restarted when the CPU usage it over 80% for five cycles, the
1061  the memory usage over 100MiBfor five cycles  or the load average  memory usage over 100MiBfor five cycles or the load average is
1062  is beyond 10 for 8 cycles:  beyond 10 for 8 cycles:
1063    
1064   check apache with pidfile /var/run/httpd.pid   check apache with pidfile /var/run/httpd.pid
1065     start program = "/etc/init.d/httpd start"     start program = "/etc/init.d/httpd start"
# Line 1100  Finally an example with all statements: Line 1101  Finally an example with all statements:
1101      and expect the sum 8f7f419955cefa0b33a2ba316cba3659      and expect the sum 8f7f419955cefa0b33a2ba316cba3659
1102     host www.sol.no     port 80  type tcp protocol http     host www.sol.no     port 80  type tcp protocol http
1103     host kvasir.sol.no  port 80  type tcp protocol http     host kvasir.sol.no  port 80  type tcp protocol http
1104        and use the request "/login.html"        and use the request "/login.cgi"
1105     host shop.sol.no    port 443 type tcp # default protocol test     host shop.sol.no    port 443 type tcp # default protocol test
1106     timeout (2,3)     timeout (2,3)
1107     if cpuusage is greater than 60.0 for 2 cycles then alert     if cpuusage is greater than 60.0 for 2 cycles then alert

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

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