VMware Cloud Community
Gyulu
Contributor
Contributor

How to query esxi hosts local boot drive free space

I would like to monitor with Nagios all esxi hosts free space on the local boot drive no matter it is a hard drive or a sd card.

How can I query this information with command line tools?

I don't want to use connect to ssh, I prefer powercli or vmware sdk solution.

Reply
0 Kudos
5 Replies
StephenMoll
Expert
Expert

VMware's KB articles on this topic would suggest that SSH or DCUI access will be necessary to determine the information you are looking for:

Investigating disk space on an ESX or ESXi host (1003564)

Reply
0 Kudos
Gyulu
Contributor
Contributor

I don't want to use ssh method or log in to the DCUI , that's why this article not relevant for me.

I would like to write a script for monitor the disk space from outside the vmware enviroment.

Reply
0 Kudos
StephenMoll
Expert
Expert

The point I'm making is that to get the information I think you are looking for even VMware suggests using SSH or DCUI. There is no mention of being able to do this using PowerCLI or via Web-Client. Usually their KBs list all possible methods of achieving a task, SSH, PowerCLI, Web-Client. They didn't do that here, suggesting it isn't easily possible.

I have used POSH-SSH in PowerShell before to access the ESXi CLI. This works quite well.

Reply
0 Kudos
Gyulu
Contributor
Contributor

You are right, log in with ssh is the quickest and easiest for investigate space problem. My aim is little bit different and I have limitations (ssh disabled)  that is why need another approach.

I read the most knowledge base article and find some commands, but not the the exact one. I think it is possible query without ssh, I hope somebody know it here 🙂

Reply
0 Kudos
StephenMoll
Expert
Expert

My suggestion for what it is worth:

  1. Activate SSH via PowerCLI.
  2. Use POSH-SSH run "df -h" and retrieve results.
  3. Deactivate SSH.

Reply
0 Kudos