Interview Prep/Azure/Storage, Key Vault and Monitoring

Write a KQL query to find the top erroring pods in the last hour.

IntermediateConceptStorage, Key Vault and Monitoring
Answer
ContainerLogV2
| where TimeGenerated > ago(1h)
| where LogLevel in ("error", "critical") or LogMessage has "Exception"
| summarize errors = count() by PodNamespace, PodName
| top 10 by errors desc

And restarts:

KubePodInventory
| where TimeGenerated > ago(1h)
| summarize restarts = max(PodRestartCount) by Namespace, Name
| where restarts > 3
| order by restarts desc

Operators to know: where, project, extend, summarize ... by bin(TimeGenerated, 5m), join, render timechart.

Azure All Azure questions Roadmap: Azure core services

More on Storage, Key Vault and Monitoring