lego-monitoring/src/lego_monitoring/alerting/enum.py
2025-06-07 15:59:05 +03:00

36 lines
643 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from enum import IntEnum, StrEnum
class AlertType(StrEnum):
BOOT = "BOOT"
ERROR = "ERROR"
TEST = "TEST"
REMIND = "REMIND"
CPU = "CPU"
NET = "NET"
RAM = "RAM"
TEMP = "TEMP"
VULN = "VULN"
# LOGIN = "LOGIN"
# SMART = "SMART" # TODO
# RAID = "RAID"
# DISKS = "DISKS"
# UPS = "UPS"
# UPDATE = "UPDATE"
class Severity(IntEnum):
OK = 0 # should only be used when persistent alerts resolve
INFO = 1
WARNING = 2
CRITICAL = 3
SEVERITY_TO_EMOJI = {
Severity.OK: "🟢",
Severity.INFO: "",
Severity.WARNING: "⚠️",
Severity.CRITICAL: "🆘",
}