description: Pipeline for parsing the Elasticsearch server log file in JSON format.
on_failure:
- set:
    field: error.message
    value: '{{ _ingest.on_failure_message }}'
processors:
- json:
    field: message
    target_field: elasticsearch.server
- pipeline:
    if: ctx.elasticsearch.server.containsKey('type')
    name: '{< IngestPipeline "pipeline-json-7" >}'
- pipeline:
    if: ctx.elasticsearch.server.containsKey('ecs.version')
    name: '{< IngestPipeline "pipeline-json-8" >}'
