Add alert rules to prometheus for minio.
This commit is contained in:
parent
5f71ae7916
commit
7116d060be
3 changed files with 39 additions and 0 deletions
|
@ -7,3 +7,4 @@ resources:
|
|||
- ./externalsecret.yaml
|
||||
- ./helmrelease.yaml
|
||||
- ./scrapeconfigs
|
||||
- ./prometheusrules
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: monitoring
|
||||
resources:
|
||||
- ./minio.yaml
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/monitoring.coreos.com/prometheusrule_v1.json
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: miscellaneous-rules
|
||||
namespace: monitoring
|
||||
labels:
|
||||
prometheus: k8s
|
||||
role: alert-rules
|
||||
spec:
|
||||
groups:
|
||||
- name: minio-alerts
|
||||
rules:
|
||||
- alert: NodesOffline
|
||||
expr: avg_over_time(minio_cluster_nodes_offline_total{job="minio-job"}[5m]) > 0
|
||||
for: 10m
|
||||
labels:
|
||||
severity: warn
|
||||
annotations:
|
||||
summary: "Node down in MinIO deployment"
|
||||
description: "Node(s) in cluster {{ $labels.instance }} offline for more than 5 minutes"
|
||||
|
||||
- alert: DisksOffline
|
||||
expr: avg_over_time(minio_cluster_disk_offline_total{job="minio-job"}[5m]) > 0
|
||||
for: 10m
|
||||
labels:
|
||||
severity: warn
|
||||
annotations:
|
||||
summary: "Disks down in MinIO deployment"
|
||||
description: "Disks(s) in cluster {{ $labels.instance }} offline for more than 5 minutes"
|
Reference in a new issue