1
0
Fork 0
scripts/sysadmin/monit_matrix_alert.sh
Luca Beltrame f09d9d28f8
Improve message formatting
Signed-off-by: Luca Beltrame <lbeltrame@kde.org>
2022-05-11 23:00:32 +02:00

17 lines
441 B
Bash

#!/bin/bash
warn_icon="⚠"
message=$(cat <<- EOF
${warn_icon} <strong>Service:</strong> $MONIT_SERVICE on $MONIT_HOST<br>
<strong>Event:</strong> $MONIT_EVENT<br />
<strong>When:</strong> $MONIT_DATE <br/>
<strong>Info:</strong> $MONIT_DESCRIPTION <br/>)
EOF
)
/usr/local/bin/matrix-commander.py \
--credentials /etc/matrix-commander/credentials.json \
--store /var/lib/matrix-commander/store/ \
--html \
-m "${message}"