-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pxc-db] Add kube-state-metrics-based alerts for PXC cluster
Add kube-state-metrics-based alerts: * GaleraClusterResourceNotReady * GaleraClusterBackupNotSucceeded * GaleraClusterBackupMissing
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
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
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
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,29 @@ | ||
- name: pxc-backup.alerts | ||
rules: | ||
- alert: {{ include "pxc-db.alerts.service" . | camelcase }}GaleraClusterBackupNotSucceeded | ||
expr: (kube_customresource_perconaxtradbclusterbackup_status{app_kubernetes_io_instance="{{ include "pxc-db.fullname" . }}",state="Succeeded"} != 1) | ||
for: 10m | ||
labels: | ||
context: database | ||
service: {{ include "pxc-db.alerts.service" . }} | ||
severity: info | ||
tier: {{ required ".Values.alerts.tier missing" .Values.alerts.tier }} | ||
playbook: '' | ||
support_group: {{ required ".Values.alerts.support_group missing" .Values.alerts.support_group }} | ||
annotations: | ||
description: "{{ include "pxc-db.fullname" . }} cluster backup is not succeeded." | ||
summary: "{{ include "pxc-db.fullname" . }} cluster backup is not succeeded." | ||
|
||
- alert: {{ include "pxc-db.alerts.service" . | camelcase }}GaleraClusterBackupMissing | ||
expr: (time() - max by (app_kubernetes_io_instance) (kube_customresource_perconaxtradbclusterbackup_completed{app_kubernetes_io_instance="{{ include "pxc-db.fullname" . }}") > 129600) | ||
for: 30m | ||
labels: | ||
context: database | ||
service: {{ include "pxc-db.alerts.service" . }} | ||
severity: info | ||
tier: {{ required ".Values.alerts.tier missing" .Values.alerts.tier }} | ||
playbook: '' | ||
support_group: {{ required ".Values.alerts.support_group missing" .Values.alerts.support_group }} | ||
annotations: | ||
description: "{{ include "pxc-db.fullname" . }} cluster has no new backups completed earlier than 36 hours ago." | ||
summary: "{{ include "pxc-db.fullname" . }} cluster has no new backups completed earlier than 36 hours ago." |
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