WMI - Disks
Description
This connector discovers and monitors S.M.A.R.T.-enabled disks that are directly handled by Windows through the WMI service.
Superseded Connector
This connector is superseded by:
Target
Typical platform: Microsoft Windows
Operating system: Microsoft Windows
Prerequisites
Leverages: WMI
Technology and protocols: WMI
Examples
CLI
metricshub HOSTNAME -t win -c +WBEMGenDiskNT --wmi -u USER
metricshub.yaml
resourceGroups:
<RESOURCE_GROUP>:
resources:
<HOSTNAME-ID>:
attributes:
host.name: <HOSTNAME> # Change with actual host name
host.type: win
connectors: [ +WBEMGenDiskNT ] # Optional, to load only this connector
protocols:
wmi:
username: <USERNAME> # Change with actual credentials
password: <PASSWORD> # Encrypted using metricshub-encrypt
Connector Activation Criteria
The WMI - Disks connector will be automatically activated, and its status will be reported as OK if all the below criteria are met:
- The device type must be one of: NT
- The Windows service WINMGMT is present and running
- The WMI query below succeeds:
- Namespace:
root\WMI - Query:
SELECT InstanceName FROM MSStorageDriver_FailurePredictStatus WHERE Active=TRUE - Result contains:
\(^[^M]...\)\|\(^.[^P]..\)\|\(^..[^I].\)\|\(^...[^O]\)(regex)
- Namespace:
Metrics
| Type | Collected Metrics | Specific Attributes |
|---|---|---|
| disk_controller | hw.status{hw.type="disk_controller", state="present"} | controller_numberhw.parent.typeidmodelvendor |
| physical_disk | hw.physical_disk.sizehw.status{hw.type="physical_disk", state="degraded|failed|ok"}hw.status{hw.type="physical_disk", state="predicted_failure"}hw.status{hw.type="physical_disk", state="present"} | hw.parent.idhw.parent.typeidnamevendor |