Skip to content

Commit

Permalink
feat(DMVP-2705): Create Jira ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
Julia Aghamyan committed Oct 24, 2023
1 parent ab40f7f commit 14c0728
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}]
}
Expand All @@ -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])
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 14c0728

Please sign in to comment.