Skip to content

Commit

Permalink
Issue #113: Reduce monit delay from 30 to 5 seconds after the daemon …
Browse files Browse the repository at this point in the history
…is (re-)started. This is a delay until monit starts monitoring the configured services. During this time to CLI tool was not useable and results in an socket not available error. To allow the monitored services to be started before monit is starting monitoring, it will be started at least by systemd. If there are still services that require more time to setup the delay can be customized via the environment variable OMV_MONIT_DELAY_SECONDS.

Signed-off-by: Volker Theile <votdev@gmx.de>
  • Loading branch information
votdev committed Jun 1, 2018
1 parent 49f83bf commit 605ace9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
12 changes: 12 additions & 0 deletions deb/openmediavault/debian/changelog
Expand Up @@ -4,6 +4,18 @@ openmediavault (5.0) unstable; urgency=low

-- Volker Theile <volker.theile@openmediavault.org> Tue, 08 May 2018 22:06:11 +0200

openmediavault (4.1.8-1) stable; urgency=low

* Issue #113: Reduce monit delay from 30 to 5 seconds after the daemon is
(re-)started. This is a delay until monit starts monitoring the configured
services. During this time to CLI tool was not useable and results in an
socket not available error. To allow the monitored services to be started
before monit is starting monitoring, it will be started at least by systemd.
If there are still services that require more time to setup the delay
can be customized via the environment variable OMV_MONIT_DELAY_SECONDS.

-- Volker Theile <volker.theile@openmediavault.org> Sat, 26 May 2018 17:02:31 +0200

openmediavault (4.1.7-1) stable; urgency=low

* Update locales.
Expand Down
4 changes: 4 additions & 0 deletions deb/openmediavault/debian/openmediavault.postinst
Expand Up @@ -533,6 +533,10 @@ case "$1" in
omv-mkconf rrdcached
deb-systemd-invoke restart rrdcached.service || :
fi
if dpkg --compare-versions "$2" lt-nl "4.1.8"; then
omv-mkconf monit
monit reload || :
fi

########################################################################
# Show help text.
Expand Down
@@ -0,0 +1,2 @@
[Unit]
After=multi-user.target
2 changes: 1 addition & 1 deletion deb/openmediavault/usr/share/openmediavault/mkconf/monit
Expand Up @@ -56,7 +56,7 @@ OMV_MONIT_EVENTQUEUE_SLOTS=${OMV_MONIT_EVENTQUEUE_SLOTS:-"100"}
OMV_MONIT_EMAIL_ALERT_NOTEVENTS=${OMV_MONIT_EMAIL_ALERT_NOTEVENTS:-"action, instance"}
OMV_MONIT_EMAIL_TIMEOUT=${OMV_MONIT_EMAIL_TIMEOUT:-"5"}
OMV_MONIT_EXTENSIONS_DIR=${OMV_MONIT_EXTENSIONS_DIR:-"${OMV_MKCONF_SCRIPTS_DIR}/monit.d"}
OMV_MONIT_DELAY_SECONDS=${OMV_MONIT_DELAY_SECONDS:-"30"}
OMV_MONIT_DELAY_SECONDS=${OMV_MONIT_DELAY_SECONDS:-"5"}

# Make sure used directories exists
mkdir -p ${OMV_MONIT_EVENTQUEUE_BASEDIR}
Expand Down

0 comments on commit 605ace9

Please sign in to comment.