With Azure providing its Dynamic alert types which use AI models to predict when a usage pattern doesn't look right, it would be great if we could deploy these types of rules through Terraform
resource "azurerm_metric_dynamicalertrule" "test" {
name = "${azurerm_virtual_machine.test.name}-cpu"
resource_group_name = "${azurerm_resource_group.test.name}"
location = "${azurerm_resource_group.test.location}"
description = "An alert rule to watch the metric Percentage CPU"
enabled = true
resource_id = "${azurerm_virtual_machine.test.id}"
metric_name = "Percentage CPU"
operator = "GreaterOrLessThan"
alert_sensitivity = "Medium"
number_of_evaluation_periods = 4
min_failing_periods_to_alert = 3
email_action {
send_to_service_owners = false
custom_emails = [
"[email protected]",
]
}
webhook_action {
service_uri = "https://example.com/some-url"
properties = {
severity = "incredible"
acceptance_test = "true"
}
}
}
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-create-templates
This would be extremely useful - any update on implementing it?
Any update on this? This has been open for quite some time.
Any Update on this? My company is starting to use Terraform in Azure and dynamic alerts are critical to our monitoring requirements.
I've noticed this PR appear... https://github.com/terraform-providers/terraform-provider-azurerm/pull/7159
This bug is being tracked in #3719 which I'm going to close this in favour of - would you mind subscribing to that issue for updates?
Thanks!
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
Any Update on this? My company is starting to use Terraform in Azure and dynamic alerts are critical to our monitoring requirements.