description: Pipeline for parsing Kibana logs
on_failure:
- set:
    field: error.message
    value: '{{ _ingest.on_failure_message }}'
processors:
# Ensures the correct pipeline is called regardless of whether `json` object is present or not
- pipeline:
    if: "ctx?.json?.type != null || ctx?.type != null"
    name: '{< IngestPipeline "pipeline-7" >}'
- pipeline:
    if: "ctx?.json?.ecs?.version != null || ctx?.ecs?.version != null"
    name: '{< IngestPipeline "pipeline-ecs" >}'
