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

azurerm_application_insights_smart_detection_rule falls short in managing these additional rules #11999

Closed
komal-SkyNET opened this issue May 28, 2021 · 4 comments · Fixed by #12857

Comments

@komal-SkyNET
Copy link

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

Currently, the provider only accepts three smart detection rules under application insights:
["Slow server response time", "Slow page load time", "Long dependency duration"]

But the following rules need to be included as well:
["Degradation in server response time", "Degradation in dependency duration", "Degradation in trace severity ratio", "Abnormal rise in exception volume", "Potential memory leak detected" , "Potential security issue detected", "Abnormal rise in daily data volume"]
This feature will enable us to fully manage all smart detection detection under AI insights. In the past, all these rules were being created by default in azure, and I assume many would like to disable these given the unwanted email notifications generated by these rules. But because of the shortcoming in the provider, we are unable to configure or disable all these rules in our IaC.

New or Affected Resource(s)

  • azurerm_application_insights_smart_detection_rule

Potential Terraform Configuration

azurerm_application_insights_smart_detection_rule

(excerpt from the doc)

values currently accepted for name argument:

name - (Required) Specifies the name of the Application Insights Smart Detection Rule. Valid values include Slow page load time, Slow server response time, Long dependency duration. Changing this forces a new resource to be created.

We need to include all the rules as mentioned earlier.

References

https://docs.microsoft.com/en-us/azure/azure-monitor/app/proactive-arm-config
#8812
#10539
#10563

Error encountered when trying to manage the missing smart detection rules:

Error: expected name to be one of [Slow page load time Slow server response time Long dependency duration], got Abnormal rise in exception volume
"azurerm_application_insights_smart_detection_rule" "smart_detection_rules":
  58: resource "azurerm_application_insights_smart_detection_rule" "smart_detection_rules" {



Error: expected name to be one of [Slow page load time Slow server response time Long dependency duration], got Degradation in server response time
"azurerm_application_insights_smart_detection_rule" "smart_detection_rules":
  58: resource "azurerm_application_insights_smart_detection_rule" "smart_detection_rules" {



Error: expected name to be one of [Slow page load time Slow server response time Long dependency duration], got Degradation in dependency duration
"azurerm_application_insights_smart_detection_rule" "smart_detection_rules":
  58: resource "azurerm_application_insights_smart_detection_rule" "smart_detection_rules" {



Error: expected name to be one of [Slow page load time Slow server response time Long dependency duration], got Potential memory leak detected
"azurerm_application_insights_smart_detection_rule" "smart_detection_rules":
  58: resource "azurerm_application_insights_smart_detection_rule" "smart_detection_rules" {



Error: expected name to be one of [Slow page load time Slow server response time Long dependency duration], got Degradation in trace severity ratio
"azurerm_application_insights_smart_detection_rule" "smart_detection_rules":
  58: resource "azurerm_application_insights_smart_detection_rule" "smart_detection_rules" {



Error: expected name to be one of [Slow page load time Slow server response time Long dependency duration], got Abnormal rise in daily data volume
"azurerm_application_insights_smart_detection_rule" "smart_detection_rules":
  58: resource "azurerm_application_insights_smart_detection_rule" "smart_detection_rules" {



Error: expected name to be one of [Slow page load time Slow server response time Long dependency duration], got Potential security issue detected

"azurerm_application_insights_smart_detection_rule" "smart_detection_rules":
  58: resource "azurerm_application_insights_smart_detection_rule" "smart_detection_rules" {
@komal-SkyNET
Copy link
Author

Once the issue is acknowledged, I'm happy to make the required changes and submit a PR, please let me know.

@komal-SkyNET komal-SkyNET changed the title Support to manage all smart detection rules under application insights azurerm_application_insights_smart_detection_rule falls short in managing these additional rules May 31, 2021
@komal-SkyNET
Copy link
Author

I've submitted a PR to address this: #12012

@komal-SkyNET komal-SkyNET changed the title azurerm_application_insights_smart_detection_rule falls short in managing these additional rules azurerm_application_insights_smart_detection_rule falls short in managing these additional rules May 31, 2021
@katbyte katbyte added this to the v2.72.0 milestone Aug 12, 2021
@github-actions
Copy link

This functionality has been released in v2.72.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants