Skip to content

Read data from standard input

Input Plugin: Standard input (stdin)

This plugin reads data from the standard input stream and is activated by default.


  stdin: true
  # disable reading from stdin
  # stdin: false

  stdout: yaml
  # use 'pretty' for pretty json and 'ldjson' for line delimited json
  # stdout: pretty
  # stdout: ldjson

Start logagent

cat test.log | logagent --yaml
cat test.log | logagent --config stdin.yaml
# convert a JSON file to YAML
cat test.json | logagent --yaml > test.yml
# index a JSON file in elasticsearch
cat mydata.json | logagent -e http://elasticsearch:9200 -i myindex