Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ian Eiloart
Sympl
Commits
2f56ec42
Commit
2f56ec42
authored
Jun 13, 2017
by
Patrick J Cherry
Browse files
Merge branch 'stretch-monit-systemd-timer' into 'stretch'
Run symbiosis-monit from a systemd timer. See merge request !48
parents
11a27d13
3b33240f
Changes
7
Hide whitespace changes
Inline
Side-by-side
monit/debian/control
View file @
2f56ec42
...
...
@@ -3,7 +3,7 @@ Section: web
Priority: extra
Maintainer: James Carter <jcarter@bytemark.co.uk>
Uploaders: Patrick J Cherry <patrick@bytemark.co.uk>, Steve Kemp <steve@bytemark.co.uk>
Build-Depends: debhelper (>= 7.0.0), txt2man, gem2deb, ruby
Build-Depends: debhelper (>= 7.0.0), txt2man, gem2deb, ruby
, dh-systemd
Standards-Version: 3.9.6
XS-Ruby-Versions: all
...
...
monit/debian/rules
View file @
2f56ec42
...
...
@@ -14,7 +14,7 @@
#export DH_RUBY_GEMSPEC=gem.gemspec
%:
dh $@ --buildsystem=ruby --with ruby
dh $@ --buildsystem=ruby --with ruby
,systemd
override_dh_auto_build-indep:
$(MAKE) all
...
...
monit/debian/symbiosis-monit.install
View file @
2f56ec42
sbin
/
symbiosis
-
monit
usr
/
sbin
/
sbin
/
*
usr
/
sbin
/
monit
.
d
/*
usr
/
share
/
symbiosis
/
monit
/
checks
/
templates
/*
usr
/
share
/
symbiosis
/
monit
/
lib
/*
usr
/
lib
/
ruby
/
vendor_ruby
/
test
.
d
/*
etc
/
symbiosis
/
test
.
d
/
system
/*
lib
/
systemd
/
system
/
monit/sbin/symbiosis-monit-failure-email
0 → 100755
View file @
2f56ec42
#!/bin/bash
set
-e
args
=
"--since=today"
[
-e
"/var/tmp/symbiosis-monit.cursor"
]
&&
args
=
"--after-cursor=
$(
</var/tmp/symbiosis-monit.cursor
)
"
journalctl
-b0
$args
-o
cat
-u
"symbiosis-monit.service"
| mail
-s
"Symbiosis monitor detected service failure"
root
monit/system/symbiosis-monit-failure-email.service
0 → 100644
View file @
2f56ec42
[Unit]
Description
=
Notify by email about symbiosis-monit failure
[Service]
Type
=
simple
ExecStart
=
/usr/sbin/symbiosis-monit-failure-email
monit/system/symbiosis-monit.service
0 → 100644
View file @
2f56ec42
[Unit]
Description
=
Symbiosis monitor
OnFailure
=
symbiosis-monit-failure-email.service
[Service]
Type
=
simple
ExecStartPre
=
/bin/sh -c 'journalctl -o cat -n 0 -u %n --show-cursor | cut -f3 -d" " | sudo -u nobody tee /var/tmp/symbiosis-monit.cursor >/dev/null'
ExecStart
=
/usr/sbin/symbiosis-monit -t email /etc/symbiosis/monit.d
monit/system/symbiosis-monit.timer
0 → 100644
View file @
2f56ec42
[Unit]
Description=Regularly execute symbiosis-monit.service
[Timer]
# run every 2 minutes
OnCalendar=*:0/2
[Install]
WantedBy=timers.target
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment