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
3b4a7361
Commit
3b4a7361
authored
May 10, 2017
by
telyn
Browse files
symbiosis-monit now emails on failure under systemd
parent
056c95b9
Changes
4
Hide whitespace changes
Inline
Side-by-side
monit/debian/symbiosis-monit.install
View file @
3b4a7361
sbin
/
symbiosis
-
monit
usr
/
sbin
/
sbin
/
*
usr
/
sbin
/
monit
.
d
/*
etc
/
symbiosis
/
monit
.
d
/
templates
/*
usr
/
share
/
symbiosis
/
monit
/
lib
/*
usr
/
lib
/
ruby
/
vendor_ruby
/
test
.
d
/*
etc
/
symbiosis
/
test
.
d
/
debian
/
symbiosis
-
monit
.
timer
lib
/
systemd
/
system
/
system
/*
lib
/
systemd
/
monit/sbin/symbiosis-monit-failure-email
0 → 100644
View file @
3b4a7361
#!/bin/bash
set
-e
args
=
"--since=today"
[
-e
"/run/symbiosis-monit.cursor"
]
&&
args
=
"--after-cursor=
$(
</run/symbiosis-monit.cursor
)
"
journalctl
-b0
$args
-u
"symbiosis-monit.service"
| mail
-s
"Symbiosis monitor detected service failure"
root
monit/system/symbiosis-monit-failure-email.service
0 → 100644
View file @
3b4a7361
[Unit]
Description
=
Notify by email about symbiosis-monit failure
[Service]
Type
=
simple
ExecStart
=
/usr/bin/symbiosis-monit-failure-email
monit/
debian
/symbiosis-monit.service
→
monit/
system
/symbiosis-monit.service
View file @
3b4a7361
[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" " > /run/symbiosis-monit.cursor'
ExecStart
=
/usr/sbin/symbiosis-monit -t email /etc/symbiosis/monit.d
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