sympl-monit-failure-email 246 Bytes
Newer Older
1
2
3
4
5
#!/bin/bash

set -e

args="--since=today"
Paul Cammish's avatar
Paul Cammish committed
6
[ -e "/tmp/sympl-monit.cursor" ] && args="--after-cursor=$(</tmp/sympl-monit.cursor)"
7

Paul Cammish's avatar
Paul Cammish committed
8
journalctl -b0 $args -o cat -u "sympl-monit.service" | mail -s "Warning: sympl-monit detected service failure" root
9