Forum Discussion
Help with making the query work
Arslan11 ,
It seems to me that the query fail to parse because you were using the wrong double quote character. You used ” instead of "
There are many different double quote chars that some keyboards change automatically.
Other than the quote chars, I have slightly rewritten your query to make it more readable and easy to maintain:
- Arslan11Jun 16, 2020Brass Contributor
Meir_Mendelovich Thanks, another query question to ask
Perf
| where ObjectName == "LogicalDisk" and CounterName == "% Free Space" and Computer != "net-fs3.networkhg.org.uk" and Computer != "NET-FS1.networkhg.org.uk" and Computer != "NET-SQL3.networkhg.org.uk" and Computer != "NET-EDMLIVEDB1.networkhg.org.uk" and Computer != "NET-EDM_KOFAX1.networkhg.org.uk"
| summarize Free_Space = min(CounterValue) by Computer, InstanceName
| where strlen(InstanceName) == 2 and InstanceName contains ":" and Computer != "NET-REPAIR2.networkhg.org.uk" and InstanceName !contains ":E" and Computer != "NH-E2016-01.networkhg.org.uk" and InstanceName !contains ":E" and Computer != "NH-E2016-02.networkhg.org.uk" and InstanceName !contains ":E" and Computer != "net-boxi1.networkhg.org.uk" and InstanceName !contains ":D"
| where Free_Space < 10How can I make this more readable , also make sure that one instance for that computer Is not being monitored instead of all
- CliveWatsonJun 17, 2020Silver Contributor
FYI, this was answered on this group: https://techcommunity.microsoft.com/t5/azure/assiatnce-with-kql-disk-space-high-alert/m-p/1468547#M5458
- Arslan11Jun 25, 2020Brass Contributor
I need assistance with amending the query further and make it more automated. I would like to avoid another computer within this command, for instance G drive and I want this to be monitored for less then 6 %
Is it possible to be done within the same query