Commit 3b4a7361 authored by telyn's avatar telyn
Browse files

symbiosis-monit now emails on failure under systemd

parent 056c95b9
sbin/symbiosis-monit usr/sbin/ sbin/* usr/sbin/
monit.d/* etc/symbiosis/monit.d/ monit.d/* etc/symbiosis/monit.d/
templates/* usr/share/symbiosis/monit/ templates/* usr/share/symbiosis/monit/
lib/* usr/lib/ruby/vendor_ruby/ lib/* usr/lib/ruby/vendor_ruby/
test.d/* etc/symbiosis/test.d/ test.d/* etc/symbiosis/test.d/
debian/symbiosis-monit.timer lib/systemd/system/ system/* lib/systemd/
set -e
[ -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
Description=Notify by email about symbiosis-monit failure
[Unit] [Unit]
Description=Symbiosis monitor Description=Symbiosis monitor
[Service] [Service]
Type=simple 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 ExecStart=/usr/sbin/symbiosis-monit -t email /etc/symbiosis/monit.d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment