From 14c0728f4a47d689802c68b42a6dc69d16afd7a3 Mon Sep 17 00:00:00 2001 From: Julia Aghamyan Date: Tue, 24 Oct 2023 16:24:11 +0400 Subject: [PATCH] feat(DMVP-2705): Create Jira ticket --- .../modules/lambda-subscription/src/teams/lambda.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cloudwatch-alarm-actions/modules/lambda-subscription/src/teams/lambda.py b/modules/cloudwatch-alarm-actions/modules/lambda-subscription/src/teams/lambda.py index ff4a701..42176eb 100644 --- a/modules/cloudwatch-alarm-actions/modules/lambda-subscription/src/teams/lambda.py +++ b/modules/cloudwatch-alarm-actions/modules/lambda-subscription/src/teams/lambda.py @@ -211,7 +211,7 @@ def payload(alert_type,subject,aws_account,aws_alarmdescription,dimension_string "title": "Dimensions", "value": dimension_string }, { - "title": "Meric", + "title": "Metric", "value": metric_namespace + "/" + metric_name }] } @@ -226,7 +226,7 @@ def payload(alert_type,subject,aws_account,aws_alarmdescription,dimension_string if os.environ['CREATE_JIRA_TICKET']: all_data = items[0]["facts"] - description = "Description: " + description = "Alarm Description: " description += f"\n{aws_alarmdescription}" description += f"\n h2. Details\n" description += f"\n".join([f"{item['title']}: {item['value']}" for item in all_data]) @@ -289,7 +289,7 @@ def handler(event, context): print("Context",context) teams_webhook_url = os.environ['WEBHOOK_URL'] url = "https://" + os.environ['REGION'] + ".console.aws.amazon.com/cloudwatch/home?region=" + \ - os.environ['REGION'] + "#alarmsV2:?~(alarmStateFilter~%27ALARM)" + os.environ['REGION'] + "#alarmsV2:?~(alarmStateFilter~'ALARM)" # url = "https://eu-central-1.console.aws.amazon.com/cloudwatch/home?region=eu-central-1#alarmsV2:?~(alarmStateFilter~%27ALARM)" logger.debug("Event: {}".format(event))