mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
add comments for event types
This commit is contained in:
parent
09a9cfe310
commit
566b5620e8
1 changed files with 17 additions and 17 deletions
|
|
@ -6,23 +6,23 @@ from sys import argv
|
|||
from alerting import alerts
|
||||
|
||||
type_priority_map = {
|
||||
"ONLINE": alerts.Severity.INFO,
|
||||
"ONBATT": alerts.Severity.WARNING,
|
||||
"LOWBATT": alerts.Severity.CRITICAL,
|
||||
"FSD": alerts.Severity.CRITICAL,
|
||||
"COMMOK": alerts.Severity.INFO,
|
||||
"COMMBAD": alerts.Severity.WARNING,
|
||||
"SHUTDOWN": alerts.Severity.CRITICAL,
|
||||
"REPLBATT": alerts.Severity.WARNING,
|
||||
"NOCOMM": alerts.Severity.WARNING,
|
||||
"NOPARENT": alerts.Severity.CRITICAL,
|
||||
"CAL": alerts.Severity.INFO,
|
||||
"NOTCAL": alerts.Severity.INFO,
|
||||
"OFF": alerts.Severity.CRITICAL,
|
||||
"NOTOFF": alerts.Severity.INFO,
|
||||
"BYPASS": alerts.Severity.WARNING,
|
||||
"NOTBYPASS": alerts.Severity.INFO,
|
||||
None: alerts.Severity.CRITICAL,
|
||||
"ONLINE": alerts.Severity.INFO, # UPS is back online
|
||||
"ONBATT": alerts.Severity.WARNING, # UPS is on battery
|
||||
"LOWBATT": alerts.Severity.CRITICAL, # UPS is on battery and has a low battery (is critical)
|
||||
"FSD": alerts.Severity.CRITICAL, # UPS is being shutdown by the primary (FSD = "Forced Shutdown")
|
||||
"COMMOK": alerts.Severity.INFO, # Communications established with the UPS
|
||||
"COMMBAD": alerts.Severity.WARNING, # Communications lost to the UPS
|
||||
"SHUTDOWN": alerts.Severity.CRITICAL, # The system is being shutdown
|
||||
"REPLBATT": alerts.Severity.WARNING, # The UPS battery is bad and needs to be replaced
|
||||
"NOCOMM": alerts.Severity.WARNING, # A UPS is unavailable (can’t be contacted for monitoring)
|
||||
"NOPARENT": alerts.Severity.CRITICAL, # upsmon parent process died - shutdown impossible
|
||||
"CAL": alerts.Severity.INFO, # UPS calibration in progress
|
||||
"NOTCAL": alerts.Severity.INFO, # UPS calibration finished
|
||||
"OFF": alerts.Severity.CRITICAL, # UPS administratively OFF or asleep
|
||||
"NOTOFF": alerts.Severity.INFO, # UPS no longer administratively OFF or asleep
|
||||
"BYPASS": alerts.Severity.WARNING, # UPS on bypass (powered, not protecting)
|
||||
"NOTBYPASS": alerts.Severity.INFO, # UPS no longer on bypass
|
||||
None: alerts.Severity.CRITICAL, # unknown alert type
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue