# Basic Pipeline Example
# A simple log processing pipeline to get started with Expanso
#
# Source: https://docs.expanso.io/examples/basic-pipeline
#
# Usage:
#   curl -o config.yaml https://docs.expanso.io/examples/basic-pipeline.yaml
#   expanso-edge run -f config.yaml

input:
  file:
    paths: [/var/log/app.log]
    codec: lines

pipeline:
  processors:
    - mapping: |
        # Parse the log line as JSON
        root = this.parse_json()

    - mapping: |
        # Parse timestamp field if it exists
        root.timestamp = this.timestamp.parse_timestamp("2006-01-02T15:04:05Z")

output:
  stdout:
    codec: lines
