Handle SNS cloudwatch alarm states with colors
This commit is contained in:
parent
5ecb68f2e7
commit
08f5b49b16
3 changed files with 21 additions and 11 deletions
|
|
@ -1,7 +1,14 @@
|
|||
import json
|
||||
from typing import Any, Tuple
|
||||
|
||||
from ops_bot.common import urgency_color
|
||||
from ops_bot.common import COLOR_ALARM, COLOR_UNKNOWN
|
||||
|
||||
|
||||
def urgency_color(urgency: str) -> str:
|
||||
if urgency == "high":
|
||||
return COLOR_ALARM
|
||||
else:
|
||||
return COLOR_UNKNOWN
|
||||
|
||||
|
||||
def parse_pagerduty_event(payload: Any) -> Tuple[str, str]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue