- Timestamp:
- Apr 25, 2018, 9:33:01 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/releng-11/nanobsd/files/usr/local/etc/monitrc
r13784 r14143 17 17 ## Start Monit in the background (run as a daemon): 18 18 # 19 set daemon 30 # check services at 30 seconds intervals19 set daemon 60 # check services at 30 seconds intervals 20 20 # with start delay 240 # optional: delay the first check by 4-minutes (by 21 21 # # default Monit check immediately after Monit start) … … 32 32 ## running Monit instance. By default this file is stored in $HOME/.monit.pid 33 33 # 34 #set pidfile /var/run/monit.pid34 set pidfile /var/run/monit.pid 35 35 # 36 36 ## Set the location of the Monit id file which stores the unique id for the … … 38 38 ## default the file is placed in $HOME/.monit.id. 39 39 # 40 #set idfile /var/.monit.id40 set idfile /var/.monit.id 41 41 # 42 42 ## Set the location of the Monit state file which saves monitoring states … … 46 46 ## state will be lost on reboot which may be convenient in some situations. 47 47 # 48 #set statefile /var/.monit.state48 set statefile /var/.monit.state 49 49 # 50 50 # … … 90 90 ## available in the back end filesystem). 91 91 # 92 #set eventqueue93 #basedir /var/monit # set the base directory where events will be stored94 #slots 100 # optionally limit the queue size92 set eventqueue 93 basedir /var/monit # set the base directory where events will be stored 94 slots 100 # optionally limit the queue size 95 95 # 96 96 # … … 181 181 ## repeating the 'group name' statement. 182 182 # 183 # check file apache_bin with path /usr/local/apache/bin/httpd183 check file apache_bin with path /usr/local/sbin/httpd 184 184 # if failed checksum and 185 185 # expect the sum 8f7f419955cefa0b33a2ba316cba3659 then unmonitor 186 #if failed permission 755 then unmonitor187 #if failed uid root then unmonitor186 if failed permission 755 then unmonitor 187 if failed uid root then unmonitor 188 188 # if failed gid root then unmonitor 189 189 # alert security@foo.bar on { … … 192 192 # group server 193 193 # 194 check file nsd_bin with path /usr/local/sbin/nsd 195 if failed permission 755 then unmonitor 196 if failed uid root then unmonitor 197 194 198 # 195 199 ## Check that a process is running, in this case Apache, and that it respond … … 201 205 ## is defined above. 202 206 # 203 # check process apache with pidfile /usr/local/apache/logs/httpd.pid204 # start program = "/etc/init.d/httpdstart" with timeout 60 seconds205 # stop program = "/etc/init.d/httpdstop"207 check process apache with pidfile /var/run/httpd.pid 208 start program = "/usr/local/etc/rc.d/apache24 start" with timeout 60 seconds 209 stop program = "/usr/local/etc/rc.d/apache24 stop" 206 210 # if cpu > 60% for 2 cycles then alert 207 #if cpu > 80% for 5 cycles then restart208 #if totalmem > 200.0 MB for 5 cycles then restart209 #if children > 250 then restart210 #if loadavg(5min) greater than 10 for 8 cycles then stop211 # if failed host www.tildeslash.comport 80 protocol http212 # and request "/somefile.html"213 #then restart211 if cpu > 80% for 5 cycles then restart 212 if totalmem > 200.0 MB for 5 cycles then restart 213 if children > 250 then restart 214 if loadavg(5min) greater than 10 for 8 cycles then stop 215 if failed host localhost port 80 protocol http 216 and request "/index.html" 217 then restart 214 218 # if failed port 443 protocol https with timeout 15 seconds then restart 215 219 # if 3 restarts within 5 cycles then unmonitor 216 #depends on apache_bin220 depends on apache_bin 217 221 # group server 218 222 # 223 224 check process dhcpd with pidfile /var/run/dhcpd/dhcpd.pid 225 start program = "/usr/local/etc/rc.d/isc-dhcpd start" with timeout 60 seconds 226 stop program = "/usr/local/etc/rc.d/isc-dhcpd stop" 227 228 check process lvrouted with pidfile /var/run/lvrouted.pid 229 start program = "/usr/local/etc/rc.d/lvrouted start" 230 stop program = "/usr/local/etc/rc.d/lvrouted stop" 231 232 check process nsd with pidfile /var/run/nsd/nsd.pid 233 start program = "/usr/local/etc/rc.d/nsd start" with timeout 60 seconds 234 stop program = "/usr/local/etc/rc.d/nsd stop" 235 depends on nsd_bin 236 237 check process ntpd with pidfile /var/run/ntpd.pid 238 start program = "/etc/rc.d/ntpd start" 239 stop program = "/etc/rc.d/ntpd stop" 240 241 check process unbound with pidfile /etc/local//unbound/unbound.pid 242 start program = "/usr/local/etc/rc.d/unbound start" 243 stop program = "/usr/local/etc/rc.d/unbound stop" 244 219 245 # 220 246 ## Check filesystem permissions, uid, gid, space and inode usage. Other services,
Note:
See TracChangeset
for help on using the changeset viewer.