-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Scheduled query rules CMK check flag, stateful alerts and 1-minute frequency #17891
Scheduled query rules CMK check flag, stateful alerts and 1-minute frequency #17891
Comments
monitor |
@yanivlavi I get an error from new-version api that "(BadRequest) Alert rule payload cannot be empty". What does this mean? |
@avjerafi Can you help here? |
@kairu-ms This looks like the result of an unexpected parsing failure of some kind. Can you please share the body of the request? |
@avjerafi I created a VM and tried to create a scheduled query for it. Below is the body of request. {
"location":"westus",
"kind":"LogAlert",
"properties":{
"description":"Test rule",
"severity":2.0,
"enabled":true,
"scopes":[
"/subscriptions/0000000000000000000000000000000/resourceGroups/kairu/providers/Microsoft.Compute/virtualMachines/kairu-ws"
],
"evaluationFrequency":"PT5M",
"windowSize":"PT5M",
"criteria":{
"allOf":[
{
"query":"union Event, Syslog | where TimeGenerated > ago(1h)",
"timeAggregation":"Count",
"dimensions":[],
"operator":"GreaterThan",
"threshold":360.0,
"failingPeriods":{
"numberOfEvaluationPeriods":1,
"minFailingPeriodsToAlert":1
}
}
]
},
"muteActionsDuration":"PT30M",
"skipQueryValidation":false,
"autoMitigate":false
}
} |
@kairu-ms The error is caused by the Severity value being provided as a float instead of as an integer. @yanivlavi We should have validated the datatype and returned a specific validation error. I've opened a ticket for this. |
Swagger updated by PR Azure/azure-rest-api-specs#14942 |
Resource Provider
Scheduled query rules
Description of Feature or Work Requested
We added stateful log alerts (autoMitigate flag, alerts that automatically resolve), a flag to check if LA has linked storage (for CMK policy) and 1-minute frequency alerts.
Minimum API Version Required
2021-02-01-preview
Swagger Link
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-02-01-preview/scheduledQueryRule_API.json
The text was updated successfully, but these errors were encountered: