@@ -325,7 +325,7 @@ template's index pattern should match `logs-<dataset-name>-*`.
325
325
--
326
326
You can create this template using {kib}'s <<manage-index-templates,**Index
327
327
Management**>> feature or the <<indices-put-template,create index template
328
- API>>.
328
+ API>>.
329
329
330
330
For example, the following request creates a template matching `logs-my_app-*`.
331
331
The template uses a component template that contains the
@@ -694,6 +694,32 @@ PUT _ingest/pipeline/my-pipeline
694
694
----
695
695
// TEST[s/\.\.\./{"lowercase": {"field":"my-keyword-field"}}/]
696
696
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
+
697
723
[discrete]
698
724
[[conditionally-run-processor]]
699
725
=== Conditionally run a processor
0 commit comments