Commit f911398e authored by Patrick J Cherry's avatar Patrick J Cherry
Browse files

Merge branch 'suppress-monit-emails' into 'stretch'

Don't email on symbiosis-monit temporary failure

See merge request open-source/symbiosis!99
parents bc3fab45 edfe6bcf
symbiosis-monit (2018:0802) stable; urgency=medium
* No longer emails on temporary failure of symbiosis-monit service itself.
-- Andrew Ladlow <andrew.ladlow@bytemark.co.uk> Thu, 02 Aug 2018 13:03:11 +0100
symbiosis-monit (2017:0907) stable; urgency=medium symbiosis-monit (2017:0907) stable; urgency=medium
* Remove old cron.d script in favour of systemd timers. * Remove old cron.d script in favour of systemd timers.
......
...@@ -6,3 +6,4 @@ args="--since=today" ...@@ -6,3 +6,4 @@ args="--since=today"
[ -e "/var/tmp/symbiosis-monit.cursor" ] && args="--after-cursor=$(</var/tmp/symbiosis-monit.cursor)" [ -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 journalctl -b0 $args -o cat -u "symbiosis-monit.service" | mail -s "Symbiosis monitor detected service failure" root
...@@ -4,3 +4,4 @@ Description=Notify by email about symbiosis-monit failure ...@@ -4,3 +4,4 @@ Description=Notify by email about symbiosis-monit failure
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/sbin/symbiosis-monit-failure-email ExecStart=/usr/sbin/symbiosis-monit-failure-email
...@@ -6,3 +6,4 @@ OnFailure=symbiosis-monit-failure-email.service ...@@ -6,3 +6,4 @@ OnFailure=symbiosis-monit-failure-email.service
Type=simple 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' 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 ExecStart=/usr/sbin/symbiosis-monit -t email /etc/symbiosis/monit.d
SuccessExitStatus=75
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