Email subjects

This commit is contained in:
Axel 2021-12-20 10:16:20 +01:00
parent 37065e3a3e
commit 6483c516e3

View file

@ -291,11 +291,11 @@ sub send_notifications {
my ($task_id, $host, $type, $message, $status) = @_;
if ($status == 0) {
$subject = 'ALERT: host "' . $host . '" [' . $type . '] is down';
$subject = 'DOWN: host "' . $host . '" [' . $type . '] is down';
$datas = "------ ALERT DETECTED BY MONITORING SERVICE ------ \n\n\nDATETIME: " . server_time() . " (server time)\nHOST: " . $host . "\nSERVICE: " . $type . "\nMESSAGE: " . $message;
}
else {
$subject = 'RECOVERY: host "' . $host . '" [' . $type . '] is up';
$subject = 'UP: host "' . $host . '" [' . $type . '] is up';
$datas = "------ RECOVERY DETECTED BY MONITORING SERVICE ------ \n\n\nDATETIME: " . server_time() . " (server time)\nHOST: " . $host . "\nSERVICE: " . $type . "\nMESSAGE: " . $message;
}