Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Chart memory if its under nnMB over the past nn days/hours
let setMBValue = 1024;
// enter a MB value to check
let startDate = ago(5h);
// enter how many days/hours to look back on
Perf
| where TimeGenerated > startDate
| where ObjectName == "Memory" and CounterName == "Available Mbytes" and Computer in ((Heartbeat
| where OSType == "Windows"
| distinct Computer))
| extend FreeMemory = CounterValue
| summarize FreeMemoryMB = min(FreeMemory) by Computer
| where FreeMemoryMB < setMBValue
| summarize max(FreeMemoryMB) by Computer
| join
(
Perf
| where TimeGenerated > startDate
| where ObjectName == "Memory" and CounterName == "Available Mbytes" and Computer in ((Heartbeat
| where OSType == "Windows"
| distinct Computer))
| extend FreeMemory = CounterValue
)
on Computer
| make-series Free_Memory_MB = min(FreeMemory) on TimeGenerated from ago(1d) to now() step 2h by Computer
| render timechart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.