Monitoring Hyper-V Host Cluster shared volume and Failover Cluster Management using azure log analytics

Prakashraaj V 1 Reputation point
2020-08-09T09:23:40.103+00:00

We have a Hyper-V host and fail-over cluster where Cluster shared volume is created and all the virtual machines created in the Hyper-V host uses the cluster shared volume.

Our ultimate aim is to monitor the CSV- Cluster shared volume's space utilization. We have installed Microsoft monitoring agent in the hyper-v host and in the Log analytics workspace is configured to get the "% Free Space" for the host with the help of Windows performance counters.

The performance counter shows space utilization for C drive. but not the cluster shared volume, as it is inside the C drive. like, C:\Volume1\

Help me here to monitor the space utilization for CSVFS for Hyper-V.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,323 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,735 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue 37,706 Reputation points Microsoft Vendor
    2020-08-10T06:14:16.597+00:00

    Hi,
    To monitor the free space of a CSV volume, you could open Failover Cluster Manager - Storage - Disks
    16624-2020-08-10-110827.png

    Or you could use powershell script, like this

    Import-Module FailoverClusters  
      
    $objs = @()  
      
    $csvs = Get-ClusterSharedVolume  
    foreach ( $csv in $csvs )  
    {  
       $csvinfos = $csv | select -Property Name -ExpandProperty SharedVolumeInfo  
       foreach ( $csvinfo in $csvinfos )  
       {  
          $obj = New-Object PSObject -Property @{  
             Name        = $csv.Name  
             Path        = $csvinfo.FriendlyVolumeName  
             Size        = $csvinfo.Partition.Size  
             FreeSpace   = $csvinfo.Partition.FreeSpace  
             UsedSpace   = $csvinfo.Partition.UsedSpace  
             PercentFree = $csvinfo.Partition.PercentFree  
          }  
          $objs += $obj  
       }  
    }  
      
    $objs | ft -auto Name,Path,@{ Label = "Size(GB)" ; Expression = { "{0:N2}" -f ($_.Size/1024/1024/1024) } },@{ Label = "FreeSpace(GB)" ; Expression = { "{0:N2}" -f ($_.FreeSpace/1024/1024/1024) } },@{ Label = "UsedSpace(GB)" ; Expression = { "{0:N2}" -f ($_.UsedSpace/1024/1024/1024) } },@{ Label = "PercentFree" ; Expression = { "{0:N2}" -f ($_.PercentFree) } }  
    

    You could refer to this article for more details
    https://techcommunity.microsoft.com/t5/failover-clustering/powershell-for-failover-clustering-csv-free-disk-space-and-other/ba-p/371622

    Best Regards,
    Ian

    ----------

    Please remember to "Accept Answer" and upvote if the reply is helpful.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.