Created
June 28, 2019 18:40
-
-
Save PixelRobots/7af5401184ba4659716494c4ad6d8c30 to your computer and use it in GitHub Desktop.
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
// 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