microsoft / microsoft/AzureMonitorCommunity
Issue with a Log Analytics Data Cap Breach Alert
Nessuno ha ancora preso questa issue.
- Lingua principale
- PowerShell
- Stelle
- 1.2k
- Fork
- 493
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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"
}
}
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Confronta la risorsa scheduledqueryrules nei template AKS-Construction con la stessa risorsa nel deployment autonomo di logging-template. Inizia riproducendo il deployment Bicep autonomo usando la query e l'errore forniti, quindi traccia come viene gestita la query dell'alert in ciascun contesto. Il lavoro è completo quando l'alert può essere distribuito autonomamente senza il BadRequest di query-optimization.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure
- Ambito
- cloud, observability-sre
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100