This repository has no description
0

Configure Feed

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

configs.monitoring: match only systemd's own unit failure messages

SystemdUnitFailed matched any line containing "Failed with result", so a
VictoriaLogs warning echoing a rejected query fired it for
victorialogs.service. Anchor a regexp on _msg to systemd's
"<unit>: Failed with result '<result>'." form.

+4 -1
+4 -1
configs/monitoring/alerts.nix
··· 88 88 type = "vlogs"; 89 89 interval = "1m"; 90 90 rules = [ 91 + # systemd logs "<unit>: Failed with result '<result>'."; the anchored 92 + # regexp skips lines merely quoting the phrase, such as VictoriaLogs 93 + # warnings that echo a rejected query. 91 94 (alert "SystemdUnitFailed" 92 - ''_time:15m "Failed with result" | stats by (host, unit) count() as failures'' 95 + ''_time:15m "Failed with result" _msg:~"^[^ ]+: Failed with result '" | stats by (host, unit) count() as failures'' 93 96 "0m" 94 97 "{{ $labels.unit }} failed on {{ $labels.host }}" 95 98 )