20 lines
602 B
YAML
20 lines
602 B
YAML
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
|
|
expr: (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) < 0.25
|
|
for: 5m
|
|
labels:
|
|
severity: info
|
|
annotations:
|
|
summary: "Server {{ $labels.instance }} has a less than 25% RAM available"
|
|
description: "Server {{ $labels.instance }} has only {{ $value }}% of its total amount of RAM available!"
|