fix(alerts): fixed batch-ms-teams notifications (#1720)

(cherry picked from commit 2e92314cda)
This commit is contained in:
Kraiem Taha Yassine 2023-11-28 14:40:19 +01:00 committed by Taha Yassine Kraiem
parent d49a377110
commit c850c64564
3 changed files with 3 additions and 3 deletions

View file

@ -193,7 +193,7 @@ def send_to_msteams_batch(notifications_list):
webhookId_map[n.get("destination")]["batch"].append(
{
"activityTitle": n["notification"]["title"],
"activitySubtitle": f"On Project *{n['projectName']}*",
"activitySubtitle": f"On Project *{n['notification']['projectName']}*",
"facts": [
{
"name": "Target:",

View file

@ -238,7 +238,7 @@ def generate_notification(alert, result):
"alertId": alert["alertId"],
"tenantId": alert["tenantId"],
"title": alert["name"],
"description": f"has been triggered, {alert['seriesName']} = {left} ({alert['query']['operator']} {right}).",
"description": f"{alert['seriesName']} = {left} ({alert['query']['operator']} {right}).",
"buttonText": "Check metrics for more details",
"buttonUrl": f"/{alert['projectId']}/metrics",
"imageUrl": None,

View file

@ -1,3 +1,3 @@
#!/bin/zsh
uvicorn app_alerts:app --reload --port 8888
uvicorn app_alerts:app --reload --port 8888 --log-level ${S_LOGLEVEL:-warning}