Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple scopes to be passed to Monitor MetricAlert resource #3719

Closed
praneetloke opened this issue Jun 23, 2019 · 8 comments
Closed

Comments

@praneetloke
Copy link
Contributor

praneetloke commented Jun 23, 2019

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

Terraform (and AzureRM Provider) Version

Affected Resource(s)

  • azurerm_monitor_metric_alert

Terraform Configuration Files

N/A

Debug Output

N/A

Panic Output

N/A

Expected Behavior

Multiple scopes can be specified for a monitor metric alert resource.

Actual Behavior

Only one scope is allowed due to an issue in the MS Go SDK, which has since been resolved (see References section below).

Steps to Reproduce

...
...
resource "azurerm_monitor_metric_alert" "test" {
  name                = "example-metricalert"
  resource_group_name = "${azurerm_resource_group.main.name}"
  // Cannot set more than one value here because `MaxItems` is set to 1.
  scopes              = ["${azurerm_storage_account.to_monitor.id}"]
  description         = "Action will be triggered when Transactions count is greater than 50."

  criteria {
    metric_namespace = "Microsoft.Storage/storageAccounts"
    metric_name      = "Transactions"
    aggregation      = "Total"
    operator         = "GreaterThan"
    threshold        = 50

    dimension {
      name     = "ApiName"
      operator = "Include"
      values   = ["*"]
    }
  }

  action {
    action_group_id = "${azurerm_monitor_action_group.main.id}"
  }
}
...
...

Important Factoids

N/A

References

The relevant line in the resource is: https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/resource_arm_monitor_metric_alert.go#L47.

The GitHub issue linked in the comment for scopes has since been closed as resolved.

@e96wic
Copy link

e96wic commented Aug 17, 2019

#4111

@markmqhr

This comment has been minimized.

@yupwei68
Copy link
Contributor

Hi @praneetloke , Thanks for opening this issue. We might fix it later by opening this restriction of scope count. But in your case, storage account is still not supported for multiple resources alerts in metric alterts. Please refer to the resouce types supported mulitple resources alerts.

@ArseniiPetrovich
Copy link

Hi @praneetloke , Thanks for opening this issue. We might fix it later by opening this restriction of scope count. But in your case, storage account is still not supported for multiple resources alerts in metric alterts. Please refer to the resouce types supported mulitple resources alerts.

Is this "later" is going to be in the near future? I want to use this feature in the project I'm currently working on as it essential to aggregate metrics over several resources, so it would be nice to have any deadlines for that issue. Is there any workaround I can use in the meanwhile?

@magodo
Copy link
Collaborator

magodo commented May 27, 2020

@ArseniiPetrovich Looks like #4111 is quite close to addressing this issue, while somehow got closed.
Let me see if I can do anything to help here!

@magodo magodo self-assigned this May 27, 2020
@ArseniiPetrovich
Copy link

That would be really nice, @magodo, thank you!

@magodo
Copy link
Collaborator

magodo commented Aug 4, 2020

As #7159 has been merged, closing this issue for now.

@magodo magodo closed this as completed Aug 4, 2020
@ghost
Copy link

ghost commented Sep 3, 2020

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!

@ghost ghost locked and limited conversation to collaborators Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants