-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(esphome): add observability for heating-sensor
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
kubernetes/talos-flux/apps/home-automation/esphome/observability/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: home-automation | ||
resources: | ||
- prometheus-rule.yaml | ||
labels: | ||
- pairs: | ||
app.kubernetes.io/name: esphome-observability | ||
app.kubernetes.io/instance: esphome-observability | ||
app.kubernetes.io/part-of: esphome |
37 changes: 37 additions & 0 deletions
37
kubernetes/talos-flux/apps/home-automation/esphome/observability/prometheus-rule.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/monitoring.coreos.com/prometheusrule_v1.json | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: esphome-alerts | ||
spec: | ||
groups: | ||
- name: esphome.sensor-heating.rules | ||
rules: | ||
- alert: ESPHomeHeatingSensorAbsent | ||
annotations: | ||
description: ESPHome sensor-heating has disappeared from Prometheus target discovery | ||
summary: ESPHome sensor-heating has disappeared from Prometheus target discovery | ||
expr: |- | ||
absent(up{device="sensor-heating"}) | ||
for: 15m | ||
labels: | ||
severity: warning | ||
- alert: ESPHomeHeatingSensorHighTemperature | ||
annotations: | ||
description: ESPHome sensor-heating temperature is too high | ||
summary: ESPHome sensor-heating high temp | ||
expr: |- | ||
esphome_sensor_value{device="sensor-heating", name="Sensor Heating Temperature Flow Upstairs"} > 30 | ||
for: 10m | ||
labels: | ||
severity: warning | ||
- alert: ESPHomeHeatingSensorLowTemperature | ||
annotations: | ||
description: ESPHome sensor-heating temperature is low | ||
summary: ESPHome sensor-heating low temp | ||
expr: |- | ||
esphome_sensor_value{device="sensor-heating", name="Sensor Heating Temperature Flow Upstairs"} < 22 | ||
for: 10m | ||
labels: | ||
severity: warning |