/[monit]/monit/UPGRADE.txt
ViewVC logotype

Diff of /monit/UPGRADE.txt

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

revision 1.8 by martinp, Thu Aug 28 15:49:15 2003 UTC revision 1.9 by hauk, Sat Sep 6 00:18:14 2003 UTC
# Line 9  in CHANGES.txt. Line 9  in CHANGES.txt.
9  From monit 3.2 to monit 4.0:  From monit 3.2 to monit 4.0:
10  ===========================  ===========================
11    
12    Monit 4.0 supports file, device, directory and host checks in addition
13    to process checks. Thus, the CHECK statement has changed:
14    
15  * Checksum statement is now restricted to new file monitoring service     Old syntax: CHECK servicename
   type only. Usage of this statements in process check service is obsolete  
   from this release. To test checksum for process asociated files,  
   you should use file check service and define dependency of the  
   process on this check. In addition the syntax changed:  
   
    Old syntax: CHECKSUM path [EXPECT checksum] [path [EXPECT checksum]]+  
   
    New syntax: IF FAILED CHECKSUM [EXPECT checksum] THEN action  
   
   Old syntax example:  
   
    #  check process apache with pidfile /usr/local/apache/logs/httpd.pid  
    #    start program = "/etc/init.d/httpd start"  
    #    stop program  = "/etc/init.d/httpd stop"  
    #    host www.tildeslash.com port 80 protocol http  
    #        and request "/monit/next.html"  
    #    checksum /usr/local/apache/bin/httpd  
    #      and expect 8f7f419955cefa0b33a2ba316cba3659  
   
   New syntax example:  
     
    #  check process apache with pidfile /usr/local/apache/logs/httpd.pid  
    #    start program = "/etc/init.d/httpd start"  
    #    stop program  = "/etc/init.d/httpd stop"  
    #    if failed host www.tildeslash.com port 80 protocol http  
    #       and request "/monit/next.html"  
    #       then restart  
    #    alert sysadm@foo.bar  
    #    depends on httpd_bin  
    #  
    #  check file httpd_bin with path /usr/local/apache/bin/httpd  
    #    if failed checksum and expect 8f7f419955cefa0b33a2ba316cba3659  
    #       then unmonitor  
   
   
   
 * Timestamp statement is now restricted to new file and directory monitoring  
   service types only. Usage of this statements in process check service is  
   obsolete from this release. To test checksum for process asociated files or  
   directory you should use file or directory check service and define  
   dependency of the process on this check. In addition the syntax changed:  
   
    Old syntax: if TIMESTAMP path [operator] value [unit] then action  
   
    New syntax: if TIMESTAMP [operator] value [unit] then action  
   
                or  
   
                if TIMESTAMP CHANGED then action  
   
   Old syntax example:  
   
    #  check process apache with pidfile /usr/local/apache/logs/httpd.pid  
    #    start program = "/etc/init.d/httpd start"  
    #    stop program  = "/etc/init.d/httpd stop"  
    #    host www.tildeslash.com port 80 protocol http  
    #        and request "/monit/next.html"  
    #    if timestamp /usr/local/etc/httpd.conf < 1 hour then restart  
   
   New syntax example:  
     
    #  check process apache with pidfile /usr/local/apache/logs/httpd.pid  
    #    start program = "/etc/init.d/httpd start"  
    #    stop program  = "/etc/init.d/httpd stop"  
    #    host www.tildeslash.com port 80 protocol http  
    #        and request "/monit/next.html"  
    #    alert sysadm@foo.bar  
    #    depends on httpd_conf  
    #  
    #  check file httpd_conf with path /usr/local/etc/httpd.conf  
    #    if timestamp changed then restart  
   
   
   
 * The PORT statement has changed and now requires that an explicit  
   action is specified if the connection test should fail. The old  
   statement would blindly restart the service if a port connection  
   test failed, the new version allows you to choose an action from  
   the set, ALERT, STOP, RESTART or EXEC.  
16    
17     Old syntax:  [HOST hostname] PORT number [TYPE {...}]     New syntax: CHECK [PROCESS|DEVICE|DIRECTORY|FILE|HOST] servicename
                 [PROTO(COL) {name} [REQUEST {"/path"}]]  
18    
19     New syntax:  [if] [failed] [HOST hostname] PORT number [TYPE {...}]  The old CHECK syntax without "PROCESS" token is still usable but
20                   [PROTO(COL) {name} [REQUEST {"/path"}]]  depreciated. Future versions might not support this.
                  [with TIMEOUT x SECONDS]  
                 then action  
21    
22    ------------------------------------------------------------------------------
23    
24  * The DEPENDS statement has changed.  The services are from now on  The CHECKSUM statement can now only be used in a check file
25    comma separated:  entry. Usage of this statements in a check process service entry is
26    obsolete from this release. In addition, the syntax has changed:
27    
28     Old syntax: DEPENDS service [service [...]]   Old syntax: CHECKSUM path [EXPECT checksum] [path [EXPECT checksum]]+
29    
30     New syntax: DEPENDS service[, service [,...]]   New syntax: IF FAILED CHECKSUM [EXPECT checksum] THEN action
   
31    
32    
33  * Monit 4.0 supports file, device and directory checks in addition to   Old syntax example:
   process checks. Thus, the CHECK statement has been changed:  
34    
35     Old syntax: CHECK servicename        check process apache with pidfile /usr/local/apache/logs/httpd.pid
36                ...
37                checksum /usr/local/apache/bin/httpd
38                         and expect 8f7f419955cefa0b33a2ba316cba3659
39    
40     New syntax example:
41    
42          check process apache with pidfile /usr/local/apache/logs/httpd.pid
43                ...
44                depends on httpd_bin
45        
46          check file httpd_bin with path /usr/local/apache/bin/httpd
47                if failed checksum and expect 8f7f419955cefa0b33a2ba316cba3659
48                   then unmonitor
49    
50    ------------------------------------------------------------------------------
51    
52    The TIMESTAMP statement can now only be used in a check file
53    entry. Usage of this statements in a check process service entry is
54    obsolete from this release. In addition, the syntax has changed:
55    
56     Old syntax: IF TIMESTAMP path [operator] value [unit] THEN action
57    
58     New syntax: IF TIMESTAMP [operator] value [unit] THEN action
59    
60                 or
61    
62                 IF TIMESTAMP was CHANGED THEN action
63    
64     New syntax: CHECK [PROCESS|DEVICE|DIRECTORY|FILE] servicename   Old syntax example:
65    
66    The old CHECK syntax without "PROCESS" token is still usable but        check process apache with pidfile /usr/local/apache/logs/httpd.pid
67    depreciated.  Future versions might not support it anymore.              ...
68                if timestamp /usr/local/etc/httpd.conf < 1 hour then restart
69    
70     New syntax example:
71    
72          check process apache with pidfile /usr/local/apache/logs/httpd.pid
73                start program = "/etc/init.d/httpd start"
74                stop program  = "/etc/init.d/httpd stop"
75                depends on httpd_conf
76        
77          check file httpd_conf with path /usr/local/etc/httpd.conf
78                if timestamp changed then restart
79    
80    ------------------------------------------------------------------------------
81    
82    The PORT statement has changed and now requires that an explicit
83    action is specified if the connection test should fail. The old
84    statement would blindly restart the service if a port connection test
85    failed, the new version allows you to choose an action from the set,
86    ALERT, STOP, RESTART, UNMONITOR or EXEC.
87    
88     Old syntax:  [HOST hostname] PORT number [TYPE {...}]
89                    [PROTO(COL) {name} [REQUEST {"/path"}]]
90    
91     New syntax:  IF FAILED [HOST hostname] PORT number [TYPE {...}]
92                     [PROTO(COL) {name} [REQUEST {"/path"}]]
93                     [with TIMEOUT x SECONDS]
94                  THEN action
95    
96     Old syntax example:
97          check process apache with pidfile /usr/local/apache/logs/httpd.pid
98                ...
99                host nettvenn.sol.no port 80 proto http
100    
101     New syntax example:
102          check process apache with pidfile /usr/local/apache/logs/httpd.pid
103                ...
104                if failed host nettvenn.sol.no port 80 proto http
105                   then restart
106    
107  * The CPU and memory check syntax has been simplified.  The new syntax  ------------------------------------------------------------------------------
108    has only the tokens CPU and MEM:  
109    The DEPENDS statement has changed.  The services are from now on comma
110    separated:
111    
112       Old syntax: DEPENDS service [service [...]]
113    
114       New syntax: DEPENDS service[, service [,...]]
115    
116    ------------------------------------------------------------------------------
117    
118    The CPU and memory check syntax has been simplified.  The new syntax
119    has only the tokens CPU and MEM and the syntax is also changed to
120    become a real IF-THEN statement:
121    
122    
123     Old syntax: CPUUSAGE value [cycles] action     Old syntax: CPUUSAGE value [cycles] action
124                 MEMUSAGE value [cycles] action                 MEMUSAGE value [cycles] action
125                 MEMKBYTE value [cycles] action                 MEMKBYTE value [cycles] action
126    
127     New syntax: if CPU operator value unit [cycles] then action     New syntax: IF CPU operator value unit [cycles] THEN action
128                 if MEM operator value unit [cycles] then action                 IF MEM operator value unit [cycles] THEN action
129    
130    The "operator" token is still a choice of {<|>|==|!=} or in words  The "operator" token is still a choice of {<|>|==|!=} or in words
131    {less|greater|equal|notequal}; value is a choice of an integer  {less|greater|equal|notequal}; value is a choice of an integer number
132    number or a real number (using a dot); unit is {%|PERCENT} for CPU  or a real number (using a dot); unit is {%|PERCENT} for CPU and a
133    and a choice of {%|B|KB|MB|GB} or in words {PERCENT|BYTE|KILOBYTE|  choice of {%|B|KB|MB|GB} or in words {PERCENT|BYTE|KILOBYTE|
134    MEGABYTE|GIGABYTE}; "cycles" still refers to the number of cycles  MEGABYTE|GIGABYTE}; "cycles" still refers to the number of cycles the
135    the statement has to be true in order to start the "action".  statement has to be true in order to start the "action".  Example:
   Example:  
136            
137      if MEM > 2.5 MB for 5 cycles then RESTART      if MEM > 2.5 MB for 5 cycles then RESTART
138    
139      And not specifying a cycle means implicit 1 cycle:      And not specifying a cycle means implicit 1 cycle:
140      if MEM > 25% then RESTART      if MEM > 25% then RESTART
141    
142    The old syntax using CPUUSAGE, MEMUSAGE, MEMKBYTE is obsolete and  The old syntax using CPUUSAGE, MEMUSAGE, MEMKBYTE is obsolete and no
143    no longer supported.  longer supported.
   
144    
145    ------------------------------------------------------------------------------
146    
147  * $PROGRAM tag of statement mail-format was renamed to $SERVICE  The $PROGRAM tag used in a mail-format statement was renamed to
148    without changing its meaning.  $PROGRAM is still usable but  $SERVICE without changing its meaning.  $PROGRAM is still usable but
149    depreciated.  Future versions might not support it anymore.    depreciated.  Future versions might not support it anymore.
150    
151    ------------------------------------------------------------------------------
152    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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