Freeze
Synopsis
Locks one target for the rest of the record. After a freeze, a later reroute to that target sends no copy of the record.
Schema
- freeze:
target: <string>
destination: <string>
description: <text>
if: <script>
ignore_failure: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
| Field | Required | Default | Description |
|---|---|---|---|
target | Y* | - | Name of the target to lock. Supports templates |
destination | N | - | Alias for target. When both are set, destination is used |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | See Handling Failures |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
disabled | N | false | When true, the processor is skipped and the event continues to the next one. Lets you take a processor out of the path without removing its configuration |
* Set target or destination. A freeze with neither fails with the error freeze needs a target.
Details
A freeze decides what reaches one target from this point on. It does not change the record.
Later reroutes send nothing. After a freeze, a reroute to the locked target sends no copy of the record. This is true whether the reroute sends the copy at once or stages it with staging: true. The pipeline carries on as if the reroute had sent its copy. The reroute still sets the record's routing fields and runs its on_success processors, and it writes no error.
Earlier copies stay. A freeze doesn't change a copy that was staged or sent for the target before it. A staged copy stays staged. A commit or the end of the record sends it, and a discard can still remove it. So the order of the processors matters:
- A discard followed by a
freezesends nothing to the target. Thediscardremoves the staged copy, and thefreezestops any later copy. - A
freezeon its own keeps the copy that is staged now. A later reroute cannot replace it with another copy.
The lock lasts one record. It ends with an unfreeze or at the end of the record. The next record starts with no target locked.
Clones share the lock. A pipeline called with clone: true works on a copy of the record, but it shares the record's locks, as it shares the record's staged copies. A freeze inside a clone, or in the on_drop processors of a pipeline call, also locks the target for the calling pipeline.
Records held from earlier still go out. A freeze holds back only the current record's own copies. aggregate, series_aggregate and tail_sample send records that they built from, or held back from, earlier records. Those records still reach a locked target.
An empty template locks nothing. The freeze uses destination when it is set, and target otherwise. When the field it uses is a template that comes out empty, the freeze locks no target and succeeds. It does not fall back to target. This happens, for example, when a route leaves the setting that names a target blank because it has no such target.
In the pipeline debugger, a reroute to a locked target shows as Skipped, not as an error.
Examples
Send Nothing to One Target
A Syslog copy is staged for Sentinel. The record should not reach Sentinel in any form... | |
The discard removes the Syslog copy, and the freeze stops the ASIM copy: | |
Keep the Copy Staged Now
A CommonSecurityLog copy is staged for Sentinel before the freeze... | |
The later reroute cannot replace it: | |
Lock a Target When a Filter Drops the Record
A filter pipeline runs on a copy of the record. When it drops the record, | |
The pipeline carries on after the clone. Only Sentinel is affected: | |