Forum Discussion
disk managment
hi,
I am looking for way using KQL query or powerShell commands on how to automate capacity free space % free like we get from disk managment in windows server.
Screenshot for example
6 Replies
Hi,
I'm not sure if I completely understand what you want. What I understand you would like to create an alert based on free disk space using KQL.
1) You need a log analytics workspace where you will store all captured data
2) You may need to install log analytics agents on the virtual machines to collect performance counters and configure the agents to collect the disk counter3) You can create alerts based on KQL querys
Kind Regards,
Dennes
- SurbhiGuptaCopper Contributor
DennesTorres thanks for looking into it.
i am not looking into any alert setup there is already powershell script giving CPU, memory info in which i have to amend and include disk managment data also.
For extracting that i need KQL query which can give data like total disk capacity of drive in GB, free space etc.
Hope you are able to understand it.
- Hi,
Your environment is unusual, at least, so it becomes difficult to help without a more complete explanation about your environment.
KQL means Kusto Query Language. It's being used in log analytics and/or Azure Data Explorer to handle big amounts of data, especially logs from azure services.
However, KQL will not provide any information by itself. The queries relies on log collection made by log analytics and/or data ingestion in azure data explorer.
Powershel, on the other hand, has many different uses, and it's able to collect performance counters from the machine where it's running.
You could be collecting the performance counters using powershell, no KQL. Or you could build log analytics workbooks with dashboards exposing the collected information using KQL, no powershell.
Use powershell to run KQL queries over log analytics is strange. Power BI would be easier. My guess is that you need to investigate your log analytics workspace and the agents configuration. However, it may be easier if who created this solution could explain it to you.
Kind Regards,
Dennes