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.
More on Storage, Key Vault and Monitoring
What types of storage accounts and services exist?BeginnerWhat are the storage redundancy options?BeginnerExplain blob access tiers and lifecycle management.IntermediateWhat is a SAS token and what are the types?IntermediateHow do you lock down a storage account?IntermediateWhat protects blobs from accidental deletion?Intermediate