Last active
August 5, 2021 10:34
-
-
Save cicorias/3a9ed8f2d5a66b6c0e438048aa57aca1 to your computer and use it in GitHub Desktop.
kubernetes aks insights
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// List container logs per namespace | |
// View container logs from all the namespaces in the cluster. | |
let window=ago(48h); | |
ContainerLog | |
|join(KubePodInventory |where TimeGenerated > startofday(window))//KubePodInventory Contains namespace information | |
on ContainerID | |
|where TimeGenerated > startofday(window) | |
|where LogEntry contains "failed to start" | |
| project ContainerID, TimeGenerated ,Namespace , LogEntrySource , LogEntry | |
//| distinct ContainerID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let window=ago(48h); | |
ContainerLog | |
|join(KubePodInventory |where TimeGenerated > startofday(window))//KubePodInventory Contains namespace information | |
on ContainerID | |
|where TimeGenerated > startofday(window) | |
|where LogEntry contains "InstrumentationK" //"failed to start" | |
| project SourceSystem, ContainerID, InstanceName, ContainerName, TimeGenerated ,Namespace , LogEntrySource , LogEntry, PodLabel, ServiceName, Image, ImageTag | |
//| distinct ServiceName // ContainerID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment