84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: taupi-fan
|
|
namespace: monitoring
|
|
labels:
|
|
app: taupi-fan
|
|
spec:
|
|
ports:
|
|
- name: http-metrics
|
|
port: 80
|
|
targetPort: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: Endpoints
|
|
metadata:
|
|
name: taupi-fan
|
|
namespace: monitoring
|
|
labels:
|
|
app: taupi-fan
|
|
subsets:
|
|
- addresses:
|
|
- ip: 192.168.10.168
|
|
ports:
|
|
- name: http-metrics
|
|
port: 80
|
|
---
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: taupi-fan
|
|
namespace: monitoring
|
|
labels:
|
|
app: taupi-fan
|
|
release: prometheus-operator
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: taupi-fan
|
|
namespaceSelector:
|
|
matchNames:
|
|
- monitoring
|
|
endpoints:
|
|
- port: http-metrics
|
|
path: /script/1/prometheus
|
|
interval: 30s
|
|
scrapeTimeout: 10s
|
|
---
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: PrometheusRule
|
|
metadata:
|
|
name: taupi-fan-alerts
|
|
namespace: monitoring
|
|
labels:
|
|
release: prometheus-operator
|
|
spec:
|
|
groups:
|
|
- name: taupi-fan.rules
|
|
rules:
|
|
- alert: TaupiFanOffline
|
|
expr: up{job="taupi-fan"} == 0
|
|
for: 1h
|
|
labels:
|
|
severity: critical
|
|
annotations:
|
|
summary: "Id: {{ $labels.instance }} - TAUPI Fan Plug is unreachable"
|
|
description: "The Shelly plug at 192.168.10.168 is unreachable by Prometheus. Check Wi-Fi connection or power status."
|
|
- alert: TaupiFanSensorsStale
|
|
expr: taupi_lost_connection_seconds_innen > 600 or taupi_lost_connection_seconds_aussen > 600
|
|
for: 1h
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: "TAUPI Fan BLE sensors stale"
|
|
description: "The BLE sensors for temperature and humidity inside or outside have not sent new data for over 10 minutes."
|
|
- alert: TaupiFanMoldDanger
|
|
expr: taupi_is_critical == 1
|
|
for: 1h
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: "Cellar mold risk detected"
|
|
description: "The cellar relative humidity has exceeded the critical mold threshold (inside humidity is high enough that mold can grow on cold wall surfaces)."
|