]> git.proxmox.com Git - proxmox.git/commitdiff
notify: pbs-context: exclude successful prunes in default matcher
authorLukas Wagner <l.wagner@proxmox.com>
Tue, 23 Apr 2024 11:51:49 +0000 (13:51 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Apr 2024 21:06:56 +0000 (23:06 +0200)
PBS sends notifications for all events but successful prune jobs.
There we only care about errors.

This commit adapts the 'default-matcher' to reflect that behavior
as well.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
proxmox-notify/src/context/pbs.rs

index 299f685921e3272a9b74bff91c1744166c19d1ba..2de305f581924a339a8ba7c8eb57cd625be63198 100644 (file)
@@ -66,8 +66,11 @@ sendmail: mail-to-root
 
 matcher: default-matcher
     mode all
+    invert-match true
+    match-field exact:type=prune
+    match-severity info
     target mail-to-root
-    comment Route all notifications to mail-to-root
+    comment Route everything but successful prune job notifications to mail-to-root
 ";
 
 #[derive(Debug)]