1
0
Fork 0
scripts/sysadmin/monit_matrix_alert.sh
Luca Beltrame d86c6ed4b8
Notification program for Monit
Small notification program to send Monit alerts over Matrix.

Signed-off-by: Luca Beltrame <lbeltrame@kde.org>
2022-05-11 22:26:31 +02:00

17 lines
417 B
Bash

#!/bin/bash
warn_icon="⚠"
message=$(cat <<- EOF
${warn_icon} <strong>Service:</strong> $MONIT_SERVICE on $MONIT_HOST<br>
$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}"