Pipelines now connect more flexibly than ever before with Tenzir
v4.16 and its upgraded
publish
and subscribe
operators.
eyJ2ZXJzaW9uIjoiMSIsImVuY29kaW5nIjoiYnN0cmluZyIsImNvbXByZXNzZWQiOnRydWUsImVuY29kZWQiOiJ4nO2cW1Piylx1MDAxNsff51NYnqrzJNl9v+w3XHUwMDE1UUfHK+Nlztk1XHUwMDE1IGBGXGaYXHUwMDA0Rafmu5/VQUhcYlx0glx1MDAxYsa4XHUwMDBmWN7SnU53svrX/7W60z8/ra2th09dZ/3PtXWnX7fbbsO3XHUwMDFm1zfM8Vx1MDAwN8dcdTAwMGbcjlx1MDAwN0kk+j/o9Px6lPMmXGa7wZ9//GF3u1Z8llXv3FxyznTazp3jhVx1MDAwMeT9XHUwMDBm/L+29jP6mbhW2/WcKG90NL6SYiR99KjjRVclXGJLRISidJTD9Vx1MDAxYU7fXHUwMDE0Z1x1MDAwN3FhblCG64dOXHUwMDAzXHUwMDEymnY7cOJcdTAwMTRzaL1cdTAwMWVs1qr3/b32c/3r3sFWs/btqr9cdTAwMTOf3nTb7fPwqT1oqF2/6fmJmlx1MDAwNqHfuXUu3UZ4XHUwMDAz6Th1fHRe0IFbXHUwMDEyn+V3eq1cdTAwMWLPXHSCsXM6Xbvuhk/mXHUwMDE4QqOjtteKyoiPmFx1MDAxNlKKLIpcdTAwMTFcdTAwMTVcXCsmsJRilGxcbqCMWpIjQohUiFx1MDAxMU54qmbbnXbHNzX7XHUwMDE3ij5x3Wp2/bZcdTAwMDVcdTAwMTX0XHUwMDFhcVx1MDAxZUc7dadcdTAwMTnneXxpr4ordeO4rZtcdTAwMTCOsfhY4EQ3nWDJKcE0rqIpv7vfiOzhr/hO+/ads2/O8HrtdvJmeY2XmzWWUDNcdDtcdNOKi+p1XHUwMDFi9uCJY1x0V0dcdTAwMTLDd8JQwNxu08W1O/XbXGYjXHRC21x1MDAwZrfAslxcr5U+xfFcdTAwMWE5KW07XGK3O3d3blxi1TjpuF6Yzlx1MDAxMZW76fud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A3uct0XFyrtcTucGZvOGE2UlRcdTAwMWE8hsm2z7Rf0/TxeKxOoFx1MDAwMcwmkVjB3VKS0ck6XHUwMDExs7+bgKfLzWPmaqJKXHUwMDFmbOOSXFyLN5/ShLHPKMNcdTAwMDZcdTAwMTCq7Xbt0v5B64bsXrRL+4xcdTAwMWXTXHUwMDBinsB7plaLQtXgXHUwMDA2SSbM8mi4PEZcdF5GeoTiiZ7LsLZcdTAwMDTIXHUwMDE4ik0ghuCsnjuNQG+gSOjbXtC1fTC0t5A1raJmIWtcXN9sss5cdTAwMDWaxMiyO3a5bFx1MDAwNTR8XHUwMDE5XHUwMDE4jERqISZWspkmJWZcctLq2uxWZFwiUImRLXdcZptz6aJASL/pXf6h9vjSa4du6cTvNHp1x99YXHUwMDFi/L/d8YLeneP/1ztcdTAwMTmET9b+vXY+KVx1MDAxN1x1MDAxMuon4ahOUTsjzVKH5jn+XHUwMDEyRM3fas/c8ufTXHUwMDBiXFzW7W73PIRnM2Lx+oPrPG5ljL/N6GPkaURcdTAwMGXTa5xovPv16df/XHUwMDAwlitcYp4ifQ==subscribe subscribe publish publish subscribe publish subscribe Multi-Producer, Multi-Consumer Publish & Subscribe
Multi-Producer Multi-Consumer The introduction of the publish
operator with Tenzir
v4.12 enabled split-routing of events. We frequently saw
users write pipelines like this:
Pipeline 1: Publish alerts …
| publish alerts
Pipeline 2: Save alerts with a high risk score to Splunk subscribe alerts
| where risk_score >= 90
| fluent-bit splunk …
Pipeline 3: Save all alerts to S3 for later reference subscribe alerts
| to s3://bucket/alerts.json.zst write json --compact-output
This approach, however, fell apart as soon as another data source tried to
publish to the topic alerts
. Trying to do so just displayed an error.
Fundamentally, the publish
and subscribe
operators were single-producer,
multi-consumer (SPMC).
With Tenzir v4.16, the publish
operator's topics no longer have to be unique,
making it possible to easily merge data flows back together:
Pipeline 4: Publish further alerts …
| publish alerts
This seemingly small change makes Tenzir's pipelines more flexible than ever
before. Now, you can write modular pipelines for individual parts of your use
cases.
For example, imagine that you have a pipeline that persists events to "cold
storage" by writing them to S3 in a strongly compressed format:
subscribe to-cold-storage
| to s3://bucket/cold_storage.json.zst write json --compact-output
Now, you can re-use this building block easily from any pipeline:
…
| publish to-cold-storage
Aggregation Functions for Percentiles We've added new aggregation functions for calculating percentiles: p99
, p95
,
p90
, p75
, and p50
. For example, to plot the 99th percentile of the number
of packets sent per flow, you can now write:
…
| where #schema == "suricata.flow"
| summarize p99(flow.pkts_toserver)
We've additionally renamed the approximate_median
function to median
. We
found the longer name to be unintuitive and cumbersome to write, so we decided
to simplify it.
Erase Lookup Table Entries A user recently showed me this abomination consisting of three pipelines:
Pipeline 1: Save lookup table context inspect my-lookup-table
| to /tmp/my-lookup-table.json
Pipeline 2: Wipe the lookup table context reset my-lookup-table
Pipeline 3: Restore the lookup table without some keys from /tmp/my-lookup-table.json
| yield value
| where key !in ["foo", "bar", "baz"]
| context update my-lookup-table
This is a lot of work just to erase three values from a lookup table. With
Tenzir v4.16, you can now erase entries from a lookup table directly.
context inspect my-lookup-table
| yield value
| where key in ["foo", "bar", "baz"]
| context update my-lookup-table --erase
Other Changes For a full list of changes in this release, please check our
changelog , and play with the new changes at
app.tenzir.com .
Are you using publish
and subscribe
to connect your pipelines already? We'd
like to hear your thoughts! Join our Discord server .