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

Diff of /monit/monit.pod

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

revision 1.32 by hauk, Fri Nov 1 10:50:42 2002 UTC revision 1.33 by rory, Fri Nov 1 18:53:01 2002 UTC
# Line 1158  statement: Line 1158  statement:
1158     timeout (3, 5)     timeout (3, 5)
1159     group server     group server
1160    
1161    In this example, we demonstrate usage of the depend
1162    statement. In this case, we want to start oracle and
1163    apache. However, we've set up apache to use oracle as
1164    a backend, and if oracle is restarted, apache must be
1165    restarted as well.
1166    
1167     check oracle with pidfile /var/run/oracle.pid
1168       start program = "/etc/init.d/oracle start"
1169       stop program  = "/etc/init.d/oracle stop"
1170       port 9001
1171       depend apache
1172    
1173     check apache with pidfile /var/run/httpd.pid
1174       start program = "/etc/init.d/httpd start"
1175       stop  program = "/etc/init.d/httpd stop"
1176    
1177    In the next example, we have a another program, webfoo, that
1178    has been added and requires that it be restarted should apache
1179    be restarted.
1180    
1181     check oracle with pidfile /var/run/oracle.pid
1182       start program = "/etc/init.d/oracle start"
1183       stop program  = "/etc/init.d/oracle stop"
1184       port 9001
1185       depend apache
1186    
1187     check apache with pidfile /var/run/httpd.pid
1188       start program = "/etc/init.d/httpd start"
1189       stop  program = "/etc/init.d/httpd stop"
1190       depend webfoo
1191    
1192     check webfoo with pidfile /var/run/webfoo.pid
1193       start program = "/etc/init.d/webfoo start"
1194       stop  program = "/etc/init.d/webfoo stop"
1195    
1196    Next, we have 2 programs oracle-import and oracle-export
1197    that need to be restarted if oracle is restarted, but are
1198    independent of each other.
1199    
1200     check oracle with pidfile /var/run/oracle.pid
1201       start program = "/etc/init.d/oracle start"
1202       stop program  = "/etc/init.d/oracle stop"
1203       port 9001
1204       depend oracle-import
1205       depend oracle-export
1206    
1207     check oracle-import with pidfile /var/run/oracle-import.pid
1208       start program = "/etc/init.d/oracle-import start"
1209       stop  program = "/etc/init.d/oracle-import stop"
1210    
1211     check oracle-export with pidfile /var/run/oracle-export.pid
1212       start program = "/etc/init.d/oracle-export start"
1213       stop  program = "/etc/init.d/oracle-export stop"
1214    
1215  Finally an example with all statements:  Finally an example with all statements:
1216    
1217   check apache with pidfile /var/run/httpd.pid   check apache with pidfile /var/run/httpd.pid
# Line 1179  Finally an example with all statements: Line 1233  Finally an example with all statements:
1233       mail-format { from: monit@foo.bar.no }       mail-format { from: monit@foo.bar.no }
1234     every 2 cycles     every 2 cycles
1235     autostart yes     autostart yes
1236       depend webfoo
1237    
1238  Note; only the B<check-> and B<pidfile statement> are mandatory,  Note; only the B<check-> and B<pidfile statement> are mandatory,
1239  the other statements are optional and the order of the optional  the other statements are optional and the order of the optional
# Line 1196  F<./monitrc> Line 1251  F<./monitrc>
1251     contains a F<monitrc> file, this file is used     contains a F<monitrc> file, this file is used
1252     instead.     instead.
1253    
1254    F</etc/monitrc>
1255       If the control file is not found in either of the
1256       previous two locations, and /etc contains a
1257       F<monitrc> file, this file will be used instead.
1258    
1259  F<~/.monitrc.pid>  F<~/.monitrc.pid>
1260     Lock file to help prevent concurrent runs (non-root     Lock file to help prevent concurrent runs (non-root
1261     mode).     mode).

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

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