41 lines
1.6 KiB
YAML
41 lines
1.6 KiB
YAML
apiVersion: monitoring.coreos.com/v1
|
|
kind: PrometheusRule
|
|
metadata:
|
|
name: uptime-kuma
|
|
namespace: uptime-kuma
|
|
labels:
|
|
release: prometheus-stack
|
|
spec:
|
|
groups:
|
|
- name: uptime_kuma.monitors
|
|
rules:
|
|
- alert: KumaMonitorDown
|
|
expr: |
|
|
monitor_status{monitor_type!="group"} == 0
|
|
for: 5m
|
|
labels:
|
|
severity: critical
|
|
annotations:
|
|
summary: "Uptime Kuma monitor down: {{ $labels.monitor_name }}"
|
|
description: "Uptime Kuma monitor {{ $labels.monitor_name }} ({{ $labels.monitor_url }}) is down for 5m. Check Uptime Kuma (https://uptime.forust.xyz) and the target service."
|
|
|
|
- alert: KumaScrapeDown
|
|
expr: |
|
|
absent(monitor_status) == 1
|
|
for: 10m
|
|
labels:
|
|
severity: critical
|
|
annotations:
|
|
summary: "Uptime Kuma metrics missing"
|
|
description: "uptime-kuma: no monitor_status series for 10m. Pod may be down, the uk1_ API key may have been rotated without updating uptime-kuma-secrets, or ServiceMonitor/Service broken. All Kuma monitors are unobserved."
|
|
|
|
- alert: KumaCertExpiring
|
|
expr: |
|
|
monitor_cert_days_remaining < 14
|
|
for: 1h
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: "TLS cert expiring: {{ $labels.monitor_name }} ({{ $value }}d left)"
|
|
description: "Uptime Kuma monitor {{ $labels.monitor_name }} ({{ $labels.monitor_url }}) reports a TLS certificate with {{ $value }} days remaining. Check cert-manager Certificate for this host."
|