-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Update alerts-create-metric-alert-rule.yml #123568
base: main
Are you sure you want to change the base?
Conversation
@azarboon : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Learn Build status updates of commit ec74c43: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
PRMerger Results
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
Metric alerts don't support firing alerts at a subscription or resource group level. |
Thanks for your answer. I'm not sure whether we are talking about the same thing but in the portal -> Azure Monitor -> Alert -> Alert rule, I can choose the scope to be subscription, resource group or individual resources: |
Today, the UI supports the following scopes:
When using API, there's also an ability to select multiple subscriptions as the scope. We have plans to support this through the UI as well in future releases. Regardless of the scope defined, the evaluation is always performed on the individual resource level (e.g. the 'Transactions' metric of a Storage Account), or on a dimension combination under the resource (e.g. the 'Transactions' metric of a Storage Account where 'API name' equals 'Get Blobs'). Hope this helps. |
Thanks for explanation. In the first comment, I brought up a question which is asked in Azure certification exam:
Given your explanation, I presume the answer is yes. Alerts get triggered because they are evaluated at individual resource level and it doesn't matter what was scope of the alert (i.e. subscription, resource group or resource). Please correct me if I'm wrong. Regardless, I believe these explanations and nuances should be clearly explained in the doc. Once you clarify my question, I'll make an edit. |
In the case described in the certification exam's question, even if the alert rule is defined at the subscription scope, the fired alert will be at the granularity of the offending resource, not the subscription. I can take this with @AbbyMSFT to clarify this in the doc. |
Thank you for clarifying. Also, I (vaguely) remember once I saw a question along similar line: At a higher scope (e.g. subscription level) alert rule was configured to notify admins about some user activity, e.g. if any new user was added, admin gets notified. However, a user related activity happened in a lower scope (e.g. resource group). And question was, whether higher-scope alert gets triggered in such a case? Based on your explanation, I presume the answer is yes (please correct me if I'm wrong). Honestly, I'm surprised why these nuances and edge cases haven't been already addressed in the doc. But it's my pleasure to help you and community in general. |
Edited it according to feedback
Fixed some typo
Learn Build status updates of commit 13713e1: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
PRMerger Results
|
Learn Build status updates of commit f0b59a7: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
PRMerger Results
|
@harelbr I just remembered another flavor of this question and I would like to know the answer: Let's say you set alert rules for all administrative operations of e.g. VM at both levels: at resource group and at resource level. If you change your vm, which alerts does get triggered? Only at resource level, at resource group level or both? I guess the answer is both, but can you please confirm it. |
Current text only tells about filters, but it should also mention possible scope levels too. Also, I can't find any information on the doc about how does alert work for lower-level resources. For example, if an alert is scoped at subscription level, but the condition is met only at its underlying resource group level, what happens? Does subscription-level alert get triggered? Actually this is a tricky question which is asked in Azure certification exam and I believe the documentation should clearly explain it. I've added it to the best of my knowledge, but feel free to edit / correct it:
"Alerts can be scoped at subscription, resource group and resource level. If you scope at e.g. subscription, its underlying resource groups and resources can trigger the alert."
PS: this and all my PRs follow Microsoft Certification Exam – Candidate Agreement and other relevant NDAs.