Changeset 14143 in hybrid


Ignore:
Timestamp:
Apr 25, 2018, 9:33:01 AM (7 years ago)
Author:
huub
Message:

monit conf aanzet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-11/nanobsd/files/usr/local/etc/monitrc

    r13784 r14143  
    1717## Start Monit in the background (run as a daemon):
    1818#
    19 set daemon  30              # check services at 30 seconds intervals
     19set daemon  60              # check services at 30 seconds intervals
    2020#   with start delay 240    # optional: delay the first check by 4-minutes (by
    2121#                           # default Monit check immediately after Monit start)
     
    3232## running Monit instance. By default this file is stored in $HOME/.monit.pid
    3333#
    34 # set pidfile /var/run/monit.pid
     34 set pidfile /var/run/monit.pid
    3535#
    3636## Set the location of the Monit id file which stores the unique id for the
     
    3838## default the file is placed in $HOME/.monit.id.
    3939#
    40 # set idfile /var/.monit.id
     40 set idfile /var/.monit.id
    4141#
    4242## Set the location of the Monit state file which saves monitoring states
     
    4646## state will be lost on reboot which may be convenient in some situations.
    4747#
    48 # set statefile /var/.monit.state
     48 set statefile /var/.monit.state
    4949#
    5050#
     
    9090## available in the back end filesystem).
    9191#
    92 # set eventqueue
    93 #     basedir /var/monit  # set the base directory where events will be stored
    94 #     slots 100           # optionally limit the queue size
     92 set eventqueue
     93     basedir /var/monit  # set the base directory where events will be stored
     94     slots 100           # optionally limit the queue size
    9595#
    9696#
     
    181181## repeating the 'group name' statement.
    182182#
    183 #  check file apache_bin with path /usr/local/apache/bin/httpd
     183  check file apache_bin with path /usr/local/sbin/httpd
    184184#    if failed checksum and
    185185#       expect the sum 8f7f419955cefa0b33a2ba316cba3659 then unmonitor
    186 #    if failed permission 755 then unmonitor
    187 #    if failed uid root then unmonitor
     186    if failed permission 755 then unmonitor
     187    if failed uid root then unmonitor
    188188#    if failed gid root then unmonitor
    189189#    alert security@foo.bar on {
     
    192192#    group server
    193193#
     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
    194198#
    195199## Check that a process is running, in this case Apache, and that it respond
     
    201205## is defined above.
    202206#
    203 #  check process apache with pidfile /usr/local/apache/logs/httpd.pid
    204 #    start program = "/etc/init.d/httpd start" with timeout 60 seconds
    205 #    stop program  = "/etc/init.d/httpd stop"
     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"
    206210#    if cpu > 60% for 2 cycles then alert
    207 #    if cpu > 80% for 5 cycles then restart
    208 #    if totalmem > 200.0 MB for 5 cycles then restart
    209 #    if children > 250 then restart
    210 #    if loadavg(5min) greater than 10 for 8 cycles then stop
    211 #    if failed host www.tildeslash.com port 80 protocol http
    212 #       and request "/somefile.html"
    213 #    then restart
     211    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
    214218#    if failed port 443 protocol https with timeout 15 seconds then restart
    215219#    if 3 restarts within 5 cycles then unmonitor
    216 #    depends on apache_bin
     220    depends on apache_bin
    217221#    group server
    218222#
     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
    219245#
    220246## Check filesystem permissions, uid, gid, space and inode usage. Other services,
Note: See TracChangeset for help on using the changeset viewer.