@@ -2453,10 +2453,12 @@ rules are specified in an external configuration file and with a syntax *similar
24532453to the `Sieve language <http://sieve.info >`_ used for mail filtering.
24542454
24552455Each rule defines a set of matching conditions on received events. Events can be
2456- matched based on keys and values in the event. If the processed event matches a
2457- rule's conditions, the corresponding actions are performed. Actions can specify
2458- whether the event should be kept or dropped in the pipeline (filtering actions)
2459- or if keys and values should be changed (modification actions).
2456+ matched based on keys and values in the event. Conditions can be combined using
2457+ parenthesis and the boolean operators ``&& `` and ``|| ``. If the processed event
2458+ matches a rule's conditions, the corresponding actions are performed. Actions
2459+ can specify whether the event should be kept or dropped in the pipeline
2460+ (filtering actions) or if keys and values should be changed (modification
2461+ actions).
24602462
24612463**Requirements **
24622464
@@ -2524,7 +2526,8 @@ Each rule specifies on or more expressions to match an event based on its keys
25242526and values. Event keys are specified as strings without quotes. String values
25252527must be enclosed in single quotes. Numeric values can be specified as integers
25262528or floats and are unquoted. IP addresses and network ranges (IPv4 and IPv6) are
2527- specified with quotes. Parentheses in expression statements are not possible.
2529+ specified with quotes. Expression statements can be combined and chained using
2530+ parenthesis and the boolean operators ``&& `` and ``|| ``.
25282531The following operators may be used to match events:
25292532
25302533 * `:exists ` and `:notexists ` match if a given key exists, for example:
@@ -2559,6 +2562,10 @@ The following operators may be used to match events:
25592562 Events with values like `8.8.8.8 ` or `8.8.4.4 ` will match, as they are always unequal to the other value.
25602563 The result is *not * that the field must be unequal to all given values.
25612564
2565+ * The combination of multiple expressions can be done using parenthesis and boolean operators:
2566+
2567+ ``if (source.ip == '127.0.0.1') && (comment == 'add field' || classification.taxonomy == 'vulnerable') { ... } ``
2568+
25622569
25632570*Actions *
25642571
0 commit comments