diff --git a/s2watchdog/__init__.py b/s2watchdog/__init__.py index f46b012..a80637e 100644 --- a/s2watchdog/__init__.py +++ b/s2watchdog/__init__.py @@ -9,6 +9,7 @@ send an email if the system is not available (network down or power failure). import json import requests +import sys from datetime import datetime @@ -17,19 +18,28 @@ from . import pysema # alert emails recipients, subject and message -EMAIL_RECIPIENTS = ['frey@imtek.de'] +EMAIL_RECIPIENTS = [ + 'brandstetter@imtek.uni-freiburg.de', + 'ute.riede@imtek.uni-freiburg.de', + 'samora.okujeni@imtek.uni-freiburg.de', + 'felix.juenger@imtek.de', + 'enderle@imtek.de', + 'huegle@imtek.de', + 'huber@imtek.de', + 'frey@imtek.de' + ] EMAIL_SUBJECT = '[S2 Scullery]: Deep Freezer Alert System Is Offline' EMAIL_BODY = [ 'The -80 alert system in the S2 scullery seems to be offline.', 'Maybe the network is down, there is a power outage or the system crashed.', '', - '>>> Please have a look as soon as possible. <<<', + '==> Please have a look as soon as possible. <==', '', 'The system was last seen on {} (UTC)' ] # which url to check -ALERT_SYSTEM_URL = 'http://echo.cpi.imtek.uni-freiburg.de' +ALERT_SYSTEM_URL = 'http://10.3.182.139' # How many times can an error be ignored? @@ -126,7 +136,7 @@ def run(): data['emails_sent'] = data['emails_sent'] + 1 data['time_to_live'] = GRACE_PERIOD * data['emails_sent'] send_alert_mail(data) - print("SEND MAIL") + # print("SEND MAIL") else: data['time_to_live'] = ttl