fix: only overwrite severity for alarm being raised not cleared
This commit is contained in:
parent
a45848733e
commit
9e7298478d
5
app.py
5
app.py
@ -125,8 +125,9 @@ def handler(event, context):
|
|||||||
msg_type = notify_map[msg["NewStateValue"].lower()]
|
msg_type = notify_map[msg["NewStateValue"].lower()]
|
||||||
|
|
||||||
# Reduce severtity for CPUCredit Alarms to Warning
|
# Reduce severtity for CPUCredit Alarms to Warning
|
||||||
if msg["Trigger"]["MetricName"] == "CPUSurplusCreditBalance":
|
if msg_type == apprise.NotifyType.FAILURE:
|
||||||
msg_type = apprise.NotifyType.WARNING
|
if msg["Trigger"]["MetricName"] == "CPUSurplusCreditBalance":
|
||||||
|
msg_type = apprise.NotifyType.WARNING
|
||||||
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user