From f29248644856e40c04e16574d0cd955c73cbfa17 Mon Sep 17 00:00:00 2001 From: Deezzir Date: Mon, 16 Dec 2024 18:59:12 -0500 Subject: [PATCH] Add comments --- src/prometheus_alert_rules/smart.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/prometheus_alert_rules/smart.yaml b/src/prometheus_alert_rules/smart.yaml index 563bf77..d7edcdf 100644 --- a/src/prometheus_alert_rules/smart.yaml +++ b/src/prometheus_alert_rules/smart.yaml @@ -33,6 +33,9 @@ groups: LABELS = {{ $labels }} - alert: SmartHealthStatusFail + # We can check if the physical size of the drive is 0, meaning it's a logical device, + # and ignore the status 0, which is always returned for logical devices, like HW RAID, + # avoiding false positives. expr: (smartctl_device_smart_status == 0) and on(device, juju_unit) (smartctl_device_block_size{blocks_type="physical"} != 0) for: 2m labels: