This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

configs.monitoring: alert on low free space on neoprism /var/download

+17 -2
+16 -1
configs/monitoring/alerts.nix
··· 23 23 ) alwaysOn) "0m" "{{ $labels.host }} sent no metrics for 10 minutes") 24 24 # Network mounts (and their autofs placeholders) are reported by 25 25 # every machine that mounts them; the agent drops tmpfs & co. 26 + # neoprism's /var/download is always above 90%, see DownloadSpace*. 26 27 (alert "DiskAlmostFull" 27 - ''host_filesystem_used_ratio{filesystem!~"cifs|smb3|nfs|nfs4|autofs|fuse.sshfs"} > 0.9'' 28 + ''host_filesystem_used_ratio{filesystem!~"cifs|smb3|nfs|nfs4|autofs|fuse.sshfs"} > 0.9 unless on (host, mountpoint) host_filesystem_used_ratio{host="neoprism",mountpoint="/var/download"}'' 28 29 "15m" 29 30 "{{ $labels.host }}: {{ $labels.mountpoint }} is {{ $value | humanizePercentage }} full" 31 + ) 32 + (alert "DownloadSpaceLow" 33 + ''host_filesystem_free_bytes{host="neoprism",mountpoint="/var/download"} < 200e9'' 34 + "15m" 35 + "{{ $labels.host }}: {{ $labels.mountpoint }} has only {{ $value | humanize }}B free" 36 + ) 37 + ( 38 + alert "DownloadSpaceCritical" 39 + ''host_filesystem_free_bytes{host="neoprism",mountpoint="/var/download"} < 100e9'' 40 + "15m" 41 + "{{ $labels.host }}: {{ $labels.mountpoint }} has only {{ $value | humanize }}B free" 42 + // { 43 + labels.severity = "critical"; 44 + } 30 45 ) 31 46 (alert "HighMemory" "1 - host_memory_available_bytes / host_memory_total_bytes > 0.95" "15m" 32 47 "{{ $labels.host }} uses {{ $value | humanizePercentage }} of its memory"
+1 -1
configs/monitoring/server.nix
··· 36 36 room-mapping.alerts = "\${MATRIX_ROOM_ID}"; 37 37 }; 38 38 templating.firing-template = '' 39 - <strong>{{ .Alert.Status | ToUpper }}</strong> {{ .Alert.Labels.alertname }}: 39 + {{ if eq .Alert.Labels.severity "critical" }}🚨 {{ end }}<strong>{{ .Alert.Status | ToUpper }}</strong> {{ .Alert.Labels.alertname }}: 40 40 {{ .Alert.Annotations.summary }} 41 41 ''; 42 42 }