To test your Logstash installation, run the most basic Logstash pipeline:
测试你的Logstash安装,运行最基础的Logstash管道
cd logstash-2.3.0
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.
可以使用-e 参数在命令行上指定目录。这种方式不用编辑文件。
Once "Logstash startup completed" is displayed, type hello world at the command prompt to see Logstash respond:
一旦显示"Logstash startup completed" ,在命令行输入hello world 看logstash的响应
hello world
2013-11-21T01:22:14.405+0000 0.0.0.0 hello world
Logstash adds timestamp and IP address information to the message. Exit Logstash by issuing a CTRL-Dcommand in the shell where Logstash is running.
Logstash 添加了时间戳和ip信息到了message。退出Logstash可以使用CTRL-D命令。
The Advanced Tutorial expands the capabilities of your Logstash instance to cover broader use cases.
高级的指南可: 查看Logstash示例更多的功能