Pipeline
Synopsis
Executes another pipeline by name, allowing for pipeline reuse and modular configurations.
Schema
- pipeline:
name: <string>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing_pipeline: <boolean>
on_drop: <processor[]>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
name | Y | - | Name or reference of the pipeline to execute |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | See Handling Failures |
ignore_missing_pipeline | N | false | If true, silently continue when referenced pipeline is not found |
return_on_missing_pipeline | N | false | With ignore_missing_pipeline, stop the CURRENT pipeline when the named one is absent instead of continuing to the next processor |
clone | N | false | Run the named pipeline against a deep copy of the event. See below — it also changes error handling |
merge_on_success | N | false | clone only. Replace the event with the clone when the sub-pipeline succeeds. Without it the clone is discarded |
on_drop | N | - | Processors that run in this pipeline when the called pipeline drops the record. See Running processors when the record is dropped |
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 |
Details
clone also suppresses failures
clone: true does two things, and only the first is obvious.
It runs the named pipeline against a deep copy of the event, so the sub-pipeline's changes do not reach the original unless merge_on_success is set. What a clone leaves behind either way is the vendor name, which is copied back to the source event.
It also makes every failure in that sub-pipeline non-fatal. pp.IgnoreFailure || pp.Clone gates the error path, so clone implies ignore_failure whether or not you set it — and a stopper error, which normally ends the parent pipeline, is not propagated either (IsStopperError(errBase) && !pp.Clone).
That is defensible for a side-branch whose result is discarded, but it means a cloned sub-pipeline cannot fail the parent, and its errors reach only the debug log. Do not use clone for work whose failure should stop processing.
Running processors when the record is dropped
on_drop lists processors that run when the called pipeline drops the record, for example with a drop or a sample processor. The processors run in the calling pipeline, on the calling pipeline's record. With clone: true, that is the original record, not the copy that the called pipeline worked on.
What happens after the on_drop processors finish depends on clone:
- With
clone: true, the calling pipeline carries on with its next processor. A drop in a clone ends only the clone, as it does withouton_drop. - Without
clone, the drop still ends the calling pipeline, after theon_dropprocessors have run.
If a processor in on_drop fails or stops the record, that result applies instead, as it does for a processor in on_success.
on_drop runs only when a filter dropped the record. It does not run when a processor in the called pipeline failed, even when the failure ends in a drop. An on_failure handler can drop a failed record, and so does the default error handler (see Handling Failures). Neither drop runs on_drop. So a record that a broken parser could not process keeps the copies that were staged for it before the call.
on_drop is made for staged routing. A pipeline can stage a raw copy of the record for a target, and then call a filter pipeline with clone: true. Without on_drop, a record that the filter drops still delivers the raw copy staged earlier, because the drop ends only the clone. With on_drop, the calling pipeline can remove that copy with discard, and stop later copies with freeze. See Multi-Tier Pipelines.
Missing pipelines
ignore_missing_pipeline continues past a pipeline that does not exist. Adding return_on_missing_pipeline changes what "continue" means: instead of moving to the next processor it ends the current pipeline cleanly.
The pipeline processor can reference other pipelines using the syntax {{ IngestPipeline "pipeline-name" }}. The names can be specified with or without the .yml/.yaml extension.
As pipeline references are resolved at runtime, make sure all referenced pipelines exist in your configuration, or set ignore_missing_pipeline to true if they are optional.
The platform refuses to publish a pipeline whose required call names a pipeline that doesn't exist. It also refuses to rename or delete a pipeline that a required call still names. A call with ignore_missing_pipeline: true or disabled: true is optional, and this check never refuses a change because of it. Deleting a pipeline is still refused while any other pipeline calls it, optional calls included. See Pipeline Management.
The processor detects circular pipeline references at runtime. If a pipeline cycle is detected, the processor returns an error identifying the pipeline that caused the cycle.
Examples
Basic
Another pipeline to be executed... | |
must be defined in the configuration: | |
Conditionals
Executing the pipeline based on criteria... | |
helps control the flow: | |
Error Handling
Handle missing pipelines... | |
and specify fallback actions: | |
Dropped Records
A Syslog copy is staged for Sentinel, then a filter pipeline runs on a copy of the record... | |
When the filter pipeline drops the record, | |