-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
38 lines (29 loc) · 871 Bytes
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from collections import OrderedDict
from os.path import dirname, join
from library.commands.nvidia import NvidiaSmiCommand
from library.commands.sensors import SensorsCommand
ROOT_DIR = dirname(__file__)
DATA_FOLDER = join(ROOT_DIR, "data")
COMMANDS = [
SensorsCommand,
NvidiaSmiCommand
]
# How far to look back in the
ALERT_TIMEFRAME_MINUTES = 5
# Number of alert to trigger sending an email
ALERTS_NB_MAIL_TRIGGER = 5
# Difference from baseline level where a mail should be sent
WARNING_LEVELS = OrderedDict({
"CRIT": [1.30, "red"],
"HIGH": [1.15, "orange"],
"WARM": [1.10, "yellow"]
})
# Default alerting level names
DEFAULT_LEVEL = "NORM"
FAIL_LEVEL = "FAIL"
# Default alerting file
ALERTS = {
"recipient": "[email protected]",
"subject": join(ROOT_DIR, "mail/headers.txt"),
"content": join(ROOT_DIR, "mail/content.html"),
}