Is there a repository for code samples used to create Alert Templates? (Prometheus?)
Similar to the code below I used to configure a disk space alert.
templates:
- name: HostOutOfDiskSpace
version: 1
summary: HostOutOfDiskSpace
expr: (node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 20 and ON (instance, device, mountpoint) node_filesystem_readonly == 0
severity: warning
annotations:
summary: Host out of disk space (instance {{ $labels.instance }})
description: “Disk is almost full (< 20% left)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}”