Skip to content

Commit 27f12e4

Browse files
jrodewigdanhermann
andauthored
[DOC] Add ingest error metadata (#75653) (#75658)
These docs were accidentally removed in #70253. Co-authored-by: Dan Hermann <[email protected]>
1 parent fb98dc1 commit 27f12e4

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

docs/reference/ingest.asciidoc

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ template's index pattern should match `logs-<dataset-name>-*`.
325325
--
326326
You can create this template using {kib}'s <<manage-index-templates,**Index
327327
Management**>> feature or the <<indices-put-template,create index template
328-
API>>.
328+
API>>.
329329

330330
For example, the following request creates a template matching `logs-my_app-*`.
331331
The template uses a component template that contains the
@@ -694,6 +694,32 @@ PUT _ingest/pipeline/my-pipeline
694694
----
695695
// TEST[s/\.\.\./{"lowercase": {"field":"my-keyword-field"}}/]
696696

697+
Additional information about the pipeline failure may be available in the
698+
document metadata fields `on_failure_message`, `on_failure_processor_type`,
699+
`on_failure_processor_tag`, and `on_failure_pipeline`. These fields are
700+
accessible only from within an `on_failure` block.
701+
702+
The following example uses the error metadata fields to provide additional
703+
information on the document about the failure.
704+
705+
[source,console]
706+
----
707+
PUT _ingest/pipeline/my-pipeline
708+
{
709+
"processors": [ ... ],
710+
"on_failure": [
711+
{
712+
"set": {
713+
"description": "Record error information",
714+
"field": "error_information",
715+
"value": "Processor {{ _ingest.on_failure_processor_type }} with tag {{ _ingest.on_failure_processor_tag }} in pipeline {{ _ingest.on_failure_pipeline }} failed with message {{ _ingest.on_failure_message }}"
716+
}
717+
}
718+
]
719+
}
720+
----
721+
// TEST[s/\.\.\./{"lowercase": {"field":"my-keyword-field"}}/]
722+
697723
[discrete]
698724
[[conditionally-run-processor]]
699725
=== Conditionally run a processor

0 commit comments

Comments
 (0)