mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-15 01:16:35 +00:00
mscluster: Add virtual disk metrics sub-collector (#2296)
Signed-off-by: Dominik Eisenberg <d.business@outlook.de> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: EisenbergD <dominik.eisenberg@beiersdorf.com> Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de> Co-authored-by: EisenbergD <dominik.eisenberg@beiersdorf.com>
This commit is contained in:
committed by
GitHub
parent
78395afc67
commit
56c29a6280
@@ -5,14 +5,14 @@ The MSCluster_Cluster class is a dynamic WMI class that represents a cluster.
|
||||
|||
|
||||
-|-
|
||||
Metric name prefix | `mscluster`
|
||||
Classes | `MSCluster_Cluster`,`MSCluster_Network`,`MSCluster_Node`,`MSCluster_Resource`,`MSCluster_ResourceGroup`,`MSCluster_DiskPartition`
|
||||
Classes | `MSCluster_Cluster`,`MSCluster_Network`,`MSCluster_Node`,`MSCluster_Resource`,`MSCluster_ResourceGroup`,`MSCluster_DiskPartition`,`MSFT_VirtualDisk`
|
||||
Enabled by default? | No
|
||||
|
||||
## Flags
|
||||
|
||||
### `--collectors.mscluster.enabled`
|
||||
Comma-separated list of collectors to use, for example:
|
||||
`--collectors.mscluster.enabled=cluster,network,node,resource,resourcegroup,shared_volumes`.
|
||||
`--collectors.mscluster.enabled=cluster,network,node,resource,resouregroup,shared_volumes,virtualdisk`.
|
||||
Matching is case-sensitive.
|
||||
|
||||
## Metrics
|
||||
@@ -178,19 +178,45 @@ Matching is case-sensitive.
|
||||
| `mscluster_shared_volumes_total_bytes` | Total size of the Cluster Shared Volume in bytes | gauge | `name`,`volume_guid` |
|
||||
| `mscluster_shared_volumes_free_bytes` | Free space on the Cluster Shared Volume in bytes | gauge | `name`,`volume_guid` |
|
||||
|
||||
### Virtual Disk
|
||||
|
||||
| Name | Description | Type | Labels |
|
||||
|-----------------------------------------------------------|------------------------------------------------------------------------------------------------|-------|--------|
|
||||
| `mscluster_virtualdisk_info` | Virtual disk information (value is always 1) | gauge | `name`, `unique_id` |
|
||||
| `mscluster_virtualdisk_health_status` | Health status of the virtual disk. 0: Healthy, 1: Warning, 2: Unhealthy, 5: Unknown | gauge | `name`, `unique_id` |
|
||||
| `mscluster_virtualdisk_size_bytes` | Total size of the virtual disk in bytes | gauge | `name`, `unique_id` |
|
||||
| `mscluster_virtualdisk_footprint_on_pool_bytes` | Physical storage consumed by the virtual disk on the storage pool in bytes | gauge | `name`, `unique_id` |
|
||||
| `mscluster_virtualdisk_storage_efficiency_percent` | Storage efficiency percentage (Size / FootprintOnPool * 100) | gauge | `name`, `unique_id` |
|
||||
|
||||
### Example metric
|
||||
Query the state of all cluster resource owned by node1
|
||||
```
|
||||
windows_mscluster_resource_owner_node{node_name="node1"}
|
||||
```
|
||||
|
||||
Query virtual disk storage efficiency for thin provisioned disks
|
||||
```
|
||||
windows_mscluster_virtualdisk_storage_efficiency_percent
|
||||
```
|
||||
|
||||
## Useful queries
|
||||
Counts the number of Network Name cluster resource
|
||||
```
|
||||
count(windows_mscluster_resource_state{type="Network Name"})
|
||||
```
|
||||
|
||||
Find virtual disks with low storage efficiency (over-provisioned)
|
||||
```
|
||||
windows_mscluster_virtualdisk_storage_efficiency_percent < 50
|
||||
```
|
||||
|
||||
Calculate total virtual disk capacity vs physical usage
|
||||
```
|
||||
sum(windows_mscluster_virtualdisk_size_bytes) / sum(windows_mscluster_virtualdisk_footprint_on_pool_bytes) * 100
|
||||
```
|
||||
|
||||
## Alerting examples
|
||||
|
||||
#### Low free space on cluster shared volume
|
||||
```yaml
|
||||
# Alerts if volume has less then 20% free space
|
||||
@@ -208,4 +234,4 @@ count(windows_mscluster_resource_state{type="Network Name"})
|
||||
summary: "Low CSV free space on {{ $labels.name }}"
|
||||
description: |
|
||||
Cluster Shared Volume {{ $labels.name }} on cluster {{ $labels.cluster }} has less than 20% free space (current: {{ printf "%.2f" $value }}%)
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user