# This configuration sets up watch and read DNStap files;
# and logging to the console in text format.

# If turned on, debug messages are printed in the standard output
global:
  trace:
    verbose: true

pipelines:
  # Watch in /tmp folder to find dnstap files with fstrm extension
  - name: tap
    dnstap:
      listen-ip: 0.0.0.0
      listen-port: 6000
    routing-policy:
      forward: [ out-dnstap ]

  - name: out-dnstap
    logfile:
      file-path:  /tmp/dnstap.fstrm
      flush-interval: 1
      mode: dnstap

  - name: file-dnstap
    file-ingestor:
      watch-dir: ./tests/testsdata/dnstap/
      watch-mode: dnstap
    routing-policy:
      forward: [ console ]

  # Redirect output to the console
  - name: console
    stdout:
      mode: text