chore: add under-utilized alerts

This commit is contained in:
michaelact 2022-11-29 17:34:20 +07:00
parent abde89f88b
commit 805f0d3695
No known key found for this signature in database
GPG key ID: 4E42935A4F2BEA14

View file

@ -0,0 +1,32 @@
groups:
- name: NodeExporter
rules:
- alert: HostUnderUtilizedOfMemory
expr: 'node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 > 80'
for: 7d
labels:
severity: info
annotations:
summary: Host memory is under utilized (instance {{ $labels.instance }})
description: "Node memory is not fully used (> 80% free). Consider reducing memory space.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: HostUnderUtilizedCpuLoad
expr: '100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[2m])) * 100) < 20'
for: 7d
labels:
severity: info
annotations:
summary: Host CPU load is under utilized (instance {{ $labels.instance }})
description: "CPU load is < 20%. Consider reducing the number of CPUs.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: HostLotsOfFreeDiskSpace
expr: '(node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes > 80 and ON (instance, device, mountpoint) node_filesystem_readonly == 0'
for: 7d
labels:
severity: info
annotations:
summary: Host lots of free disk space (instance {{ $labels.instance }})
description: "Disk space is not fully used (> 80% free). Consider reducing disk space.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"