Created
August 26, 2019 11:06
-
-
Save PixelRobots/348dc9dec8770a9687fb2f5089756340 to your computer and use it in GitHub Desktop.
This file contains 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
// Table of Servers with disk space is under nnGB | |
let setGBValue = 20; | |
// enter a GB value to check | |
let startDate = ago(30m); | |
// enter how many minutes to look back on | |
Perf | |
| where InstanceName != "D:" and InstanceName contains ":" | |
| where TimeGenerated > startDate | |
| where ObjectName == "LogicalDisk" and CounterName == "Free Megabytes" | |
| extend FreeSpaceGB = CounterValue/1024 | |
| summarize FreeSpace = (round(min(FreeSpaceGB))) by Computer, InstanceName | |
| where FreeSpace < setGBValue | |
| evaluate pivot(InstanceName, min(FreeSpace)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment