custom-rules.yaml (1576B)
1 apiVersion: monitoring.coreos.com/v1 2 kind: PrometheusRule 3 metadata: 4 name: custom-node-rules 5 namespace: monitoring 6 labels: 7 release: prometheus-stack 8 spec: 9 groups: 10 - name: custom.node.rules 11 rules: 12 # NodeMemoryMajorPagesFaults re-added with control-plane nodes excluded. 13 # Control plane nodes are intentionally undersized and expected to have 14 # occasional major page faults; alerting on them causes noise. 15 - alert: NodeMemoryMajorPagesFaults 16 expr: | 17 ( 18 rate(node_vmstat_pgmajfault{job="node-exporter"}[5m]) > 500 19 ) 20 unless on(instance) 21 label_replace( 22 kube_node_status_addresses{type="InternalIP"} * on(node) group_left() kube_node_role{role="control-plane"}, 23 "instance", "$1:9100", "address", "(.*)" 24 ) 25 for: 15m 26 labels: 27 severity: warning 28 annotations: 29 description: 'Memory major pages are occurring at very high rate at {{ $labels.instance }}, 500 major page faults per second for the last 15 minutes, is currently at {{ $value | humanize }}. Please check that there is enough memory available at this instance.' 30 runbook_url: https://runbooks.prometheus-operator.dev/runbooks/node/nodememorymajorpagesfaults 31 summary: Memory major page faults are occurring at very high rate.