File monit-better_default_monitrc.patch of Package monit
--- monit-5.20.0/monitrc 2016-10-21 11:58:30.000000000 +0200
+++ monit-5.20.0/monitrc 2016-11-04 14:58:04.539402482 +0100
@@ -24,20 +24,20 @@
## Set syslog logging. If you want to log to a standalone log file instead,
## specify the full path to the log file
#
-set logfile syslog
+set logfile syslog facility log_daemon
#
#
## Set the location of the Monit lock file which stores the process id of the
## running Monit instance. By default this file is stored in $HOME/.monit.pid
#
-# set pidfile /var/run/monit.pid
+set pidfile /run/monit/monit.pid
#
## Set the location of the Monit id file which stores the unique id for the
## Monit instance. The id is generated and stored on first Monit start. By
## default the file is placed in $HOME/.monit.id.
#
-# set idfile /var/.monit.id
+set idfile /run/monit/.monit.id
#
## Set the location of the Monit state file which saves monitoring states
## on each cycle. By default the file is placed in $HOME/.monit.state. If
@@ -45,7 +45,7 @@
## the monitoring state across reboots. If it is on temporary filesystem, the
## state will be lost on reboot which may be convenient in some situations.
#
-# set statefile /var/.monit.state
+set statefile /run/monit/.monit.state
#
#
@@ -66,10 +66,10 @@
## Set global SSL options (just most common options showed, see manual for
## full list).
#
-# set ssl {
-# verify : enable, # verify SSL certificates (disabled by default but STRONGLY RECOMMENDED)
+ set ssl {
+ verify : enable, # verify SSL certificates (disabled by default but STRONGLY RECOMMENDED)
# selfsigned : allow # allow self signed SSL certificates (reject by default)
-# }
+ }
#
#
## Set the list of mail servers for alert delivery. Multiple servers may be
@@ -80,6 +80,7 @@
# set mailserver mail.bar.baz, # primary mailserver
# backup.bar.baz port 10025, # backup mailserver on port 10025
# localhost # fallback relay
+set mailserver localhost
#
#
## By default Monit will drop alert events if no mail servers are available.
@@ -89,9 +90,9 @@
## by using the SLOTS option (if omitted, the queue is limited by space
## available in the back end filesystem).
#
-# set eventqueue
-# basedir /var/monit # set the base directory where events will be stored
-# slots 100 # optionally limit the queue size
+set eventqueue
+ basedir /run/monit/events # set the base directory where events will be stored
+ slots 100 # optionally limit the queue size
#
#
## Send status and events to M/Monit (for more informations about M/Monit
@@ -129,14 +130,14 @@
## or sender using the MAIL-FORMAT statement. Macros such as $DATE, etc.
## are expanded at runtime. For example, to override the sender, use:
#
-# set mail-format { from: monit@foo.bar }
+set mail-format { from: monit@localhost }
#
#
## You can set alert recipients whom will receive alerts if/when a
## service defined in this file has errors. Alerts may be restricted on
## events by using a filter as in the second example below.
#
-# set alert sysadm@foo.bar # receive all alerts
+set alert sysadm@localhost # receive all alerts
#
## Do not alert when Monit starts, stops or performs a user initiated action.
## This filter is recommended to avoid getting alerts for trivial cases.