Issue with a Log Analytics Data Cap Breach Alert
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- azure
- Domain
- cloud, observability-sre
Research direction
Compare the scheduledqueryrules resource in the AKS-Construction templates with the same resource in the standalone logging-template deployment. Start by reproducing the standalone Bicep deployment using the supplied query and error, then trace how the alert's query is handled in each context. Done means the alert can be deployed standalone without the query-optimization BadRequest.
Written by the indexing model from the issue text.
Description
I am trying to setup a scheduled query alert from the AKS-Construction repo, and have run into some odd behavior. Apparently, the alert can be setup from the AKS-Construction templates, but not from a standalone deployment. I am trying to move the alert into my logging templates as it isn't really AKS related.
https://github.com/Azure/AKS-Construction/issues/559
resource Daily_data_cap_breached_for_workspace_logworkspacename_CIQ_1 'microsoft.insights/scheduledqueryrules@2022-06-15' = {
name: 'Daily data cap breached for workspace ${resLogAnalyticsWorkspace.name} CIQ-1'
location: parAutomationAccountLocation
properties: {
displayName: 'Daily data cap breached for workspace ${resLogAnalyticsWorkspace.name} CIQ-1'
description: 'This alert monitors daily data cap defined on a workspace and fires when the daily data cap is breached.'
severity: 1
enabled: metricAlertsEnabled
evaluationFrequency: evalFrequency
scopes: [
resLogAnalyticsWorkspace.id
]
windowSize: windowSize
autoMitigate: false
criteria: {
allOf: [
{
query: '_LogOperation | where Operation == "Data collection Status" | where Detail contains "OverQuota"'
timeAggregation: 'Count'
operator: 'GreaterThan'
threshold: 0
failingPeriods: {
numberOfEvaluationPeriods: 1
minFailingPeriodsToAlert: 1
}
}
]
}
muteActionsDuration: 'P1D'
}
}
throws the following exception from a standalone bicep deployment
{
"status": "Failed",
"error": {
"code": "BadRequest",
"message": "Couldn't optimize the query because it doesn't contain the table Operation explicitly. Please add the table to the query explicitly and try again"
}
}
- Dominant language
- PowerShell
- Stars
- 1.2k
- Forks
- 493
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/AzureMonitorCommunity
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 10/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
All issues in microsoft/AzureMonitorCommunity
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
Feature needs-triage pulumi/registry
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
infrastructure launch: scale production
Difficulty 2/5 Half a day Newbie friendliness 72/100
Practitionist/familiarise_web#1772 ·