Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update configuring-sinks.rst #1218

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions docs/configuration/configuring-sinks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ By default, every message is sent to every matching sink. To change this behavio
Matches Can Be Lists Or Regexes
********************************************

Every *match* rule supports both regular expressions and a list of exact values:
*match* rules support both regular expressions and lists of exact values:

.. code-block:: yaml

Expand All @@ -115,14 +115,29 @@ Every *match* rule supports both regular expressions and a list of exact values:
name: prod_slack_sink
slack_channel: prod-notifications
api_key: secret-key
# AND between namespace and severity and labels
# AND between namespace and severity
match:
namespace: ^prod$ # match the "prod" namespace exactly
severity: [HIGH, LOW] # either HIGH or LOW (or logic)
labels: "foo=bar,instance=123"
namespace: ^prod$ # match the "prod" namespace exactly
severity: [HIGH, LOW] # either HIGH or LOW (OR logic)

Regular expressions must be in `Python re module format <https://docs.python.org/3/library/re.html#regular-expression-syntax>`_, as passed to `re.match <https://docs.python.org/3/library/re.html#re.match>`_.

Matching Labels and Annotations
********************************************

Special syntax is used for matching labels and annotations:

.. code-block:: yaml

sinksConfig:
- slack_sink:
name: prod_slack_sink
slack_channel: prod-notifications
api_key: secret-key
match:
labels: "foo=bar,instance=123" # both labels must match

The syntax is similar to Kubernetes selectors, but only `=` conditions are allowed, not `!=`

Or Between Matches
********************************************
Expand Down
Loading