Closed npvisual closed 1 year ago
Hi
I noticed the alarm created from the console will be in the CloudWatchSynthetics
namespace. Maybe you can specify this namespace for your alarm created with CDK?
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
@pahud : thanks for the suggestion.
I looked at the alarm that was created as part of the CDK stack and it seems to already have the proper Namespace :
But it's still not showing up linked under the Canary configuration page.
Hi @npvisual I had the same issue and upon further investigation found out from here that the alarm name should be named "Synthetics-Alarm-canary_name" to make it appears in the Canary console. Hope it helps.
@sujee81 Thanks, it solved my issue in Terraform configuration.
resource "aws_cloudwatch_metric_alarm" "canary_alarm" {
# alarm_name = "${local.name_prefix}-synthetics-canary-endpoint" # Synthetics-Alarm-canary_name
alarm_name = "Synthetics-Alarm-${aws_synthetics_canary.canary_api_calls.name}" # https://github.com/aws/aws-cdk/issues/24387
Describe the bug
I have created a canary synthetic : simple heartbeat monitoring. I have then linked this canary to a new alarm that is sending notifications to a SNS topic.
Everything works as expected : canary is all setup and alarm will send a notification to the topic when the endpoint is failing.
However I am not seeing the alarm in the console under the canary configuration
However if I create this via the console, I see the alarm in that configuration screen (note it's different base : using nodejs) :
This is pretty convenient because it links the canary to its alarm. Is there something I am missing that would allow the alarm to be displayed in the configuration screen of the canary ?
Expected Behavior
I would expect to see the canary in the console (so maybe I am missing a step ?).
Current Behavior
See illustration below and description above :
Reproduction Steps
Here's the code snippet I am using (python) :
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.66.1 (build 539d036)
Framework Version
"aws-cdk-lib" = "2.66..1"
Node.js Version
whatever is installed as part of synthetics.Runtime.SYNTHETICS_PYTHON_SELENIUM_1_3
OS
whatever is used for synthetics.Runtime.SYNTHETICS_PYTHON_SELENIUM_1_3
Language
Python
Language Version
3.9 I guess (installed base for synthetics.Runtime.SYNTHETICS_PYTHON_SELENIUM_1_3)
Other information
No response