Skip to content

Commit

Permalink
Attempting query fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jherrflexion committed Oct 23, 2024
1 parent 146fdaa commit e58d53f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions operations/template/alert.tf
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ resource "azurerm_monitor_scheduled_query_rules_alert" "ti-log-errors-alert" {

query = <<-QUERY
AppServiceConsoleLogs
| where TimeGenerated >= ago(30m)
| where TimeGenerated >= ago(00.001m)
and TimeGenerated <= now()
| project JsonResult = parse_json(ResultDescription) | evaluate bag_unpack(JsonResult)
| where isnotnull(level)
and level in ( 'ERROR' )
| project columnifexists("ResultDescription", 'default_value')
| project JsonResult = parse_json(ResultDescription)
| evaluate bag_unpack(JsonResult) : (level:string)
| where level in ( 'ERROR' )
| summarize count()
QUERY

Expand Down

0 comments on commit e58d53f

Please sign in to comment.