Stashing Your First Event: Basic Logstash Exampleedit

To test your Logstash installation, run the most basic Logstash pipeline:

cd logstash-{logstash_version}
bin/logstash -e 'input { stdin { } } output { stdout {} }'

The -e flag enables you to specify a configuration directly from the command line. Specifying configurations at the command line lets you quickly test configurations without having to edit a file between iterations. This pipeline takes input from the standard input, stdin, and moves that input to the standard output, stdout, in a structured format. Type hello world at the command prompt to see Logstash respond:

hello world
2013-11-21T01:22:14.405+0000 hello world

Logstash adds timestamp and IP address information to the message. Exit Logstash by issuing a CTRL-D command in the shell where Logstash is running.

The Advanced Tutorial expands the capabilities of your Logstash instance to cover broader use cases.