Terraform-provider-azurerm: Support of dynamic alerts

Created on 19 Jul 2019  ·  6Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

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

New or Affected Resource(s)

  • azurerm_metric_dynamicalertrule

Potential Terraform Configuration

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"
    }
  }
}

References

https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-create-templates

  • #0000
enhancement servicmonitor

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.

All 6 comments

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.

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!

Was this page helpful?
0 / 5 - 0 ratings