From 4cef41688f5e3e74ee3c5d1f1d82083ba82555f2 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 1 Nov 2024 18:14:56 -0500 Subject: [PATCH] v-m/alerts: Add Zigbee+ZWave network alerts --- victoria-metrics/alerts.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/victoria-metrics/alerts.yml b/victoria-metrics/alerts.yml index aec2f3b..d29d33a 100644 --- a/victoria-metrics/alerts.yml +++ b/victoria-metrics/alerts.yml @@ -77,11 +77,39 @@ groups: homeassistant_entity_available{domain="camera"} != 1 for: 10m -- name: Sensors +- name: Home Assistant rules: - alert: Battery Low expr: homeassistant_sensor_battery_percent{entity!~"sensor\\.(pixel_|sm_p610).*"} < 10 + annotations: + summary: >- + Low battery: {{ $labels.friendly_name }} + severity: minor + - alert: Z-Wave Network is Offline + expr: + sum( + homeassistant_entity_available{entity="sensor.usb_controller_status"} + ) without ( + friendly_name + ) < 1 + annotations: + summary: The Z-Wave network controller is offline + description: >- + Home Assistant is not able to communicate with ZWaveJS, or ZWaveJS is + not able to connect to the Z-Wave USB controller. Z-Wave devices like + light switches, door sensors, and smart plugs will not work until the + Z-Wave network is operational again. + - alert: Zigbee Network is Offline + expr: + homeassistant_binary_sensor_state{entity="binary_sensor.zigbee2mqtt_bridge_connection_state"} == 0 + annotations: + summary: The Zigbee network bridge is offline + description: >- + Home Assistant is not able to communicate with Zigbee2MQTT, or + Zigbee2MQTT is not able to connect to the Z-Wave USB controller. + Zigbee devices like smart bulbs and buttons will not work until the + Zigbee network is operational again. - name: PostgreSQL rules: