all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/1] docs: notifications: add section about nested matchers
Date: Wed, 21 May 2025 16:23:09 +0200	[thread overview]
Message-ID: <20250521142309.264719-5-l.wagner@proxmox.com> (raw)
In-Reply-To: <20250521142309.264719-1-l.wagner@proxmox.com>

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 docs/notifications.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/docs/notifications.rst b/docs/notifications.rst
index 5669dab0..5b990394 100644
--- a/docs/notifications.rst
+++ b/docs/notifications.rst
@@ -258,6 +258,29 @@ Examples:
 The following severities are in use:
 ``info``, ``notice``, ``warning``, ``error``, ``unknown``.
 
+Nested Matcher Rules
+^^^^^^^^^^^^^^^^^^^^
+
+By using ``eval-matcher <other-matcher-name>`` rules, a matcher can evaluate
+other matchers that were marked as a nested matcher. This allows to build
+arbitrarily complex matching rules.
+
+Any matcher that shall be used as a nested matcher must have the ``nested``
+flag set. Nested matchers do not have any associated notification targets. They
+are only evaluated if they are referenced by another matcher's ``eval-matcher``
+rule. If a nested matcher is disabled, it will not be evaluated even if
+referenced by another matcher.
+
+A nested matcher itself can evaluate other nested matchers. Direct (a matcher
+evaluates itself) and indirect (two or more matchers evaluate each other)
+recursion is not allowed.
+
+Examples:
+
+* ``eval-matcher sub-1``: Evaluates the ``sub-1`` matcher and uses its result
+  to compute the result of the current matcher.
+
+
 .. _notification_events:
 
 Notification Events
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  parent reply	other threads:[~2025-05-21 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21 14:23 [pbs-devel] [PATCH proxmox{, -widget-toolkit, -backup} 0/4] notifications: add support for " Lukas Wagner
2025-05-21 14:23 ` [pbs-devel] [PATCH proxmox 1/2] notify: matcher: allow to evaluate other matchers via `eval-matcher` Lukas Wagner
2025-05-21 14:23 ` [pbs-devel] [PATCH proxmox 2/2] notify: matcher: API: update methods for nested matcher support Lukas Wagner
2025-05-21 14:23 ` [pbs-devel] [PATCH proxmox-widget-toolkit 1/1] notifications: matchers: add " Lukas Wagner
2025-05-21 14:23 ` Lukas Wagner [this message]
2025-06-02 14:35 ` [pbs-devel] [PATCH proxmox{, -widget-toolkit, -backup} 0/4] notifications: add support for nested matchers Lukas Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250521142309.264719-5-l.wagner@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal