Skip to Main Content
Liongard Library

Welcome to Liongard Library, where Lions share! This is a community-led space where Liongard users can come to teach and learn from one another.
Share custom Metrics, get inspired and see what’s trending in the Pride.

Pride Etiquette:
➕ Have great custom Metrics? Add them as entries!
🌟 Want to use a Metric? Copy the query and
follow this doc.
👍 Tried a Metric from the Library? Like it!
📣 Have a question or feedback on a Metric? Add a comment!
🔎 Not sure where to start? Learn about Metrics and how to write them.
💬 Need help writing a metric or want to help support others? Join the conversation in our Liongard Lounge #metrics slack channel.


🥴 See something off? Open a support chat to let us know.

Categories Hyper-V
Created by Erik Zwep
Created on Oct 14, 2024

Hyper-V: Unhealthy Storage Volume(s) List

The current built-in metric in Liongard only displays the drive letter. However, some volumes do not have a drive letter, resulting in no output for these volumes in this metric. With this metric, you can view both the drive letter and the DrivePath, enabling retrieval using Get-Volume.


Query

Host.Volumes[?HealthStatus!=`Healthy`].{DrivePath: join(': ', [DriveLetter || '-', Path || '-'])}[].DrivePath || to_array(`-`) | join(`, `, @)

  • Attach files
  • Erik Zwep
    Reply
    |
    Oct 14, 2024

    With this metric, you can also retrieve the HealthStatus and OperationalStatus.


    Host.Volumes[?HealthStatus!=`Healthy`].{DrivePath: join(' - ', [join(': ', [DriveLetter || '-', Path || '-']), HealthStatus || '-', OperationalStatus || '-'])}[].DrivePath || to_array(`-`) | join(`, `, @)