Forum Discussion
Log Analytic Dashboard Diagram(Lines) disk space
- Dec 14, 2018
Below query should help you:
Perf | where TimeGenerated > ago(1h) | where ObjectName == "Logical Disk" and CounterName == "% Used Space" | extend ComputerDrive = strcat(Computer, ' - ', InstanceName) | summarize Used_Space_Percent = max(CounterValue) by ComputerDrive, bin(TimeGenerated, 1h) | render timechart
A few things to note:
- value of computer and drive is concatenated. the render cannot visualize more than one column at a time this we create a single column out of those two
- I am using bin to put the values in buckets in time range of 1 hour. You can change the interval to your liking
- I am using max() function to get the maximum value available for each hour. You can use other functions like min(), avg(), percentile(), etc. Depends on your scenario.
Below query should help you:
Perf | where TimeGenerated > ago(1h) | where ObjectName == "Logical Disk" and CounterName == "% Used Space" | extend ComputerDrive = strcat(Computer, ' - ', InstanceName) | summarize Used_Space_Percent = max(CounterValue) by ComputerDrive, bin(TimeGenerated, 1h) | render timechart
A few things to note:
- value of computer and drive is concatenated. the render cannot visualize more than one column at a time this we create a single column out of those two
- I am using bin to put the values in buckets in time range of 1 hour. You can change the interval to your liking
- I am using max() function to get the maximum value available for each hour. You can use other functions like min(), avg(), percentile(), etc. Depends on your scenario.