Fix num_firing/resolved calculation
This commit is contained in:
parent
abca37e621
commit
4ef923a756
1 changed files with 1 additions and 1 deletions
|
|
@ -138,7 +138,7 @@ class AlertManagerAPIView(
|
|||
# Count firing and resolved alerts manually if not present in payload
|
||||
num_firing = len(list(filter(lambda a: a["status"] == "firing", alerts)))
|
||||
num_resolved = len(list(filter(lambda a: a["status"] == "resolved", alerts)))
|
||||
data = {**request.data, "firingAlerts": num_firing, "resolvedAlerts": num_resolved}
|
||||
data = {**request.data, "numFiring": num_firing, "numResolved": num_resolved}
|
||||
|
||||
create_alert.apply_async(
|
||||
[],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue