From 27977e373085746af6de7515566c15b63c62b281 Mon Sep 17 00:00:00 2001 From: pgibbs1 Date: Tue, 10 Jan 2023 13:50:34 -0500 Subject: [PATCH] Added collector docs, entry to readme Signed-off-by: pgibbs1 --- docs/README.md | 1 + docs/collector.diskdrive.md | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 docs/collector.diskdrive.md diff --git a/docs/README.md b/docs/README.md index 7f53c93d..67b67d43 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,6 +6,7 @@ This directory contains documentation of the collectors in the windows_exporter, - [`adfs`](collector.adfs.md) - [`cpu`](collector.cpu.md) - [`cs`](collector.cs.md) +- [`diskdrive`](collector.diskdrive.md)] - [`dfsr`](collector.dfsr.md) - [`dhcp`](collector.dhcp.md) - [`dns`](collector.dns.md) diff --git a/docs/collector.diskdrive.md b/docs/collector.diskdrive.md new file mode 100644 index 00000000..60a95c44 --- /dev/null +++ b/docs/collector.diskdrive.md @@ -0,0 +1,41 @@ +# diskdrive collector + +The diskdrive collector exposes metrics about logical disks (in contrast to physical disks) + +| | | +| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Metric name prefix | `diskdrive` | +| Classes | [`Win32_PerfRawData_DNS_DNS`] (https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-diskdrive) | +| Enabled by default? | No | + +## Flags + +None + +## Metrics + +| Name | Description | Type | Labels | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------ | +| `disk_drive_info` | General identifiable information about the disk drive | gauge | None | +| `disk_drive_availability` | Power-related | counter | None | +| `disk_drive_partitions` | Number of paritions on the drive | gauge | None | +| `disk_drive_size` | Size of the disk drive. It is calculated by multiplying the total number of cylinders, tracks in each cylinder, sectors in each track, and bytes in each sector. | gauge | None | +| `disk_drive_status` | Operational status of the drive | counter | None | + +## Alerting examples +**prometheus.rules** +```yaml +groups: +- name: Windows Disk Alerts + rules: + + # Sends an alert when disk space usage is above 95% + - alert: Drive_Status + expr: windows_disk_drive_status{status="OK"} != 1 + for: 10m + labels: + severity: high + annotations: + summary: "Instance: {{ $labels.instance }} has drive status: {{ $labels.status }} on disk {{ $labels.name }}" + description: "Drive Status Unhealthy" +```