wxt9861 / esxi_stats

ESXi component for Home Assistant
MIT License
145 stars 40 forks source link

Total Allocated Storage per VM #74

Closed zSprawl closed 2 years ago

zSprawl commented 2 years ago

Is your feature request related to a problem? Please describe. My apologies for not asking for this when you added total active memory, but I'm hoping we can add the total allocated storage space to the list of attributes for each VM, so we can monitor % free space.

Describe the solution you'd like Ideally we add the total allocated storage for each VM and/or the percentage of disk space, so we can monitor it.

Describe alternatives you've considered Obviously we can use ESXi monitoring for this, but it's nice to have it all in HA.

Additional context None.

wxt9861 commented 2 years ago

In this a use case where you're using thin provisioned VMDKs?

zSprawl commented 2 years ago

I spent some time yesterday building out my dashboard for my VMs, and I'm not sure this request is going to be as easy as I originally thought since the host monitors the datastores, not the disk usage by the OS itself.

To answer your question, I am using thin provisioning, and I noticed the storage value grows with snapshots as well, so knowing the allocated size is not enough to monitor whether or not the disks themselves are running out of space at the OS level.

I guess in the end, unless you know of some way to pull the disk usage from the OS itself, this request is not feasible.

wxt9861 commented 2 years ago

I see. Yes, right now you already get space used by the VM as seen by the VMhost/vCenter. As long as vmtools are installed on the OS, we should be able to have some visibility, however OS level specific statistics are outside of the scope of this component.

zSprawl commented 2 years ago

Makes sense and completely fair. Thanks for taking the time to respond.