ungleich-k8s/prometheus-monitoring/prometheus-rule.yaml

21 lines
616 B
YAML
Raw Normal View History

2022-01-31 22:50:15 +00:00
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
creationTimestamp: null
labels:
prometheus: k8s
role: alert-rules
name: prometheus-example-rules
spec:
groups:
- name: ./example.rules
rules:
- alert: RAMUsage
2022-10-18 14:57:09 +00:00
expr: (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) < 0.95
2022-01-31 22:50:15 +00:00
for: 5m
labels:
severity: info
annotations:
2022-10-18 14:57:09 +00:00
summary: "K8SServerTest {{ $labels.instance }} has a less than 95% RAM available"
description: "K8SServerTest {{ $labels.instance }} has only {{ $value }}% of its total amount of RAM available!"