Skip to content

Commit

Permalink
feat(teslamate): prometheusrule for db queries
Browse files Browse the repository at this point in the history
  • Loading branch information
rxbn committed Jul 22, 2024
1 parent dac3596 commit 09b26ce
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/teslamate/postgres/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- prometheusrule.yaml
- postgres.yaml
- scheduledbackup.yaml
- configmap.yaml
Expand Down
26 changes: 26 additions & 0 deletions apps/teslamate/postgres/prometheusrule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: teslamate-alerts
namespace: monitoring
spec:
groups:
- name: teslamate.rules
rules:
- alert: TeslaMateOpenDrives
annotations:
description: Unclosed drives found in TeslaMate
runbook_url: https://docs.teslamate.org/docs/maintenance/manually_fixing_data#terminate-a-drive-or-charge
expr: cnpg_open_drives_open_drives > 0
for: 8h
labels:
severity: critical
- alert: TeslaMateIncompleteCharges
annotations:
description: Incomplete charges found in TeslaMate
runbook_url: https://docs.teslamate.org/docs/maintenance/manually_fixing_data#terminate-a-drive-or-charge
expr: cnpg_incomplete_charges_incomplete_charges > 0
for: 8h
labels:
severity: critical

0 comments on commit 09b26ce

Please sign in to comment.