我试图通过简单地执行文档中给出的命令来回显所输入的内容来安装logstash。但这给了我以下错误。
我的命令
C:\logstash-1.4.0\bin>logstash.bat agent -e 'input{stdin{}}output{stdout{}}'
还有错误
Error: Expected one of #, input, filter, output at line 1, column 1 (byte 1) aft
er
You may be interested in the '--configtest' flag which you can
use to validate logstash's configuration before you choose
to restart a running system."
请帮忙。提前致谢!
最佳答案
我正在 Linux 上使用logstash-1.4.0 进行测试 tutorial 。
我认为这个版本可能存在错误。
例如,我在linux和window上测试了这个命令。 Linux下一切正常。但它会在窗口发生错误!!
bin>logstash agent -e 'input{stdin{}}output{stdout{}}'
根据我的建议,您可以将配置写入文件中。例如,将 input{stdin{}}output{stdout{}}
保存到名为“stdin.conf”的文件中。然后,当您启动logstash时,不要使用-e
标志,而是使用-f
并指定您的配置文件。
bin>logstash agent -f stdin.conf
希望这可以帮助你。
关于logstash - 需要 #、输入、过滤器、logstash 中的输出之一,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22629795/