diff --git a/freeleaps/helm-pkg/3rd/redis-cluster/values.prod.yaml b/freeleaps/helm-pkg/3rd/redis-cluster/values.prod.yaml index e050b7c4..18e06efb 100644 --- a/freeleaps/helm-pkg/3rd/redis-cluster/values.prod.yaml +++ b/freeleaps/helm-pkg/3rd/redis-cluster/values.prod.yaml @@ -1076,8 +1076,9 @@ metrics: ## prometheusRule: enabled: true - additionalLabels: {} - namespace: "" + additionalLabels: + release: kube-prometheus-stack + namespace: "freeleaps-monitoring-system" ## These are just examples rules, please adapt them to your needs. ## Make sure to constraint the rules to the current postgresql service. ## - alert: RedisDown @@ -1109,7 +1110,35 @@ metrics: ## summary: Redis® instance {{ "{{ $instance }}" }} has evicted keys ## description: Redis® instance {{ "{{ $instance }}" }} has evicted {{ "{{ $value }}" }} keys in the last 5 minutes. ## - rules: [] + rules: + - alert: RedisDown + expr: redis_up{service="{{ template "common.names.fullname" . }}-metrics"} == 0 + for: 2m + labels: + severity: error + annotations: + summary: Redis® instance {{ "{{ $instance }}" }} down + description: Redis® instance {{ "{{ $instance }}" }} is down. + - alert: RedisMemoryHigh + expr: > + redis_memory_used_bytes{service="{{ template "common.names.fullname" . }}-metrics"} * 100 + / + redis_memory_max_bytes{service="{{ template "common.names.fullname" . }}-metrics"} + > 90 + for: 2m + labels: + severity: error + annotations: + summary: Redis® instance {{ "{{ $instance }}" }} is using too much memory + description: Redis® instance {{ "{{ $instance }}" }} is using {{ "{{ $value }}" }}% of its available memory. + - alert: RedisKeyEviction + expr: increase(redis_evicted_keys_total{service="{{ template "common.names.fullname" . }}-metrics"}[5m]) > 0 + for: 1s + labels: + severity: error + annotations: + summary: Redis® instance {{ "{{ $instance }}" }} has evicted keys + description: Redis® instance {{ "{{ $instance }}" }} has evicted {{ "{{ $value }}" }} keys in the last 5 minutes. ## @param metrics.priorityClassName Metrics exporter pod priorityClassName ## priorityClassName: ""