From 50b171a491a7b2478f6d739b6271d4d8c662bd69 Mon Sep 17 00:00:00 2001 From: samber Date: Sun, 12 Feb 2023 19:01:58 +0000 Subject: [PATCH] Publish --- dist/rules/apc-ups/apcupsd_exporter.yml | 59 +++++++++++++++++++++++++ dist/rules/zfs/zfs_exporter.yml | 32 ++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 dist/rules/apc-ups/apcupsd_exporter.yml create mode 100644 dist/rules/zfs/zfs_exporter.yml diff --git a/dist/rules/apc-ups/apcupsd_exporter.yml b/dist/rules/apc-ups/apcupsd_exporter.yml new file mode 100644 index 0000000..6a071fd --- /dev/null +++ b/dist/rules/apc-ups/apcupsd_exporter.yml @@ -0,0 +1,59 @@ +groups: + +- name: Apcupsd_exporter + + rules: + + - alert: ApcUpsBatteryNearlyEmpty + expr: 'apcupsd_battery_charge_percent < 10' + for: 0m + labels: + severity: critical + annotations: + summary: APC UPS Battery nearly empty (instance {{ $labels.instance }}) + description: "Battery is almost empty (< 10% left)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + + - alert: ApcUpsLessThan15MinutesOfBatteryTimeRemaining + expr: 'apcupsd_battery_time_left_seconds < 900' + for: 0m + labels: + severity: critical + annotations: + summary: APC UPS Less than 15 Minutes of battery time remaining (instance {{ $labels.instance }}) + description: "Battery is almost empty (< 15 Minutes remaining)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + + - alert: ApcUpsAcInputOutage + expr: 'apcupsd_battery_time_on_seconds > 0' + for: 0m + labels: + severity: warning + annotations: + summary: APC UPS AC input outage (instance {{ $labels.instance }}) + description: "UPS now running on battery (since {{$value | humanizeDuration}})\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + + - alert: ApcUpsLowBatteryVoltage + expr: '(apcupsd_battery_volts / apcupsd_battery_nominal_volts) < 0.95' + for: 0m + labels: + severity: warning + annotations: + summary: APC UPS low battery voltage (instance {{ $labels.instance }}) + description: "Battery voltage is lower than nominal (< 95%)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + + - alert: ApcUpsHighTemperature + expr: 'apcupsd_internal_temperature_celsius >= 40' + for: 2m + labels: + severity: warning + annotations: + summary: APC UPS high temperature (instance {{ $labels.instance }}) + description: "Internal temperature is high ({{$value}}°C)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + + - alert: ApcUpsHighLoad + expr: 'apcupsd_ups_load_percent > 80' + for: 0m + labels: + severity: warning + annotations: + summary: APC UPS high load (instance {{ $labels.instance }}) + description: "UPS load is > 80%\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" diff --git a/dist/rules/zfs/zfs_exporter.yml b/dist/rules/zfs/zfs_exporter.yml new file mode 100644 index 0000000..acb0337 --- /dev/null +++ b/dist/rules/zfs/zfs_exporter.yml @@ -0,0 +1,32 @@ +groups: + +- name: Zfs_exporter + + rules: + + - alert: ZfsPoolOutOfSpace + expr: 'zfs_pool_free_bytes * 100 / zfs_pool_size_bytes < 10 and ON (instance, device, mountpoint) zfs_pool_readonly == 0' + for: 0m + labels: + severity: warning + annotations: + summary: ZFS pool out of space (instance {{ $labels.instance }}) + description: "Disk is almost full (< 10% left)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + + - alert: ZfsPoolUnhealthy + expr: 'zfs_pool_health > 0' + for: 0m + labels: + severity: critical + annotations: + summary: ZFS pool unhealthy (instance {{ $labels.instance }}) + description: "ZFS pool state is {{ $value }}. See comments for more information.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + + - alert: ZfsCollectorFailed + expr: 'zfs_scrape_collector_success != 1' + for: 0m + labels: + severity: warning + annotations: + summary: ZFS collector failed (instance {{ $labels.instance }}) + description: "ZFS collector for {{ $labels.instance }} has failed to collect information\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"