预期为#,输入,过滤器,输出中的一个 [英] Expected one of #, input, filter, output in logstash

查看:148
本文介绍了预期为#,输入,过滤器,输出中的一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过简单地执行文档中给出的命令以回显曾经输入的内容来使logstash安装工作正常工作,但这给了我以下错误.

I am trying to make logstash installation work by simply executing the command given in the documentation to echo back what ever typed.But that gives me the following error.

我的命令

 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."

请帮助.谢谢!

推荐答案

我正在使用我认为此版本可能存在错误.

I think it is possible a bug on this version.

例如,我在linux和window上都测试了此命令.在Linux上一切正常.但这会在窗口中发生您的错误!

For example, I test this command on both linux and window. Everything is ok on linux. But it will occur your error at window!!

bin> logstash代理-e'输入{stdin {}}输出{stdout {}}'

bin>logstash agent -e 'input{stdin{}}output{stdout{}}'

根据我的建议,您可以将配置写入文件中.例如,将input{stdin{}}output{stdout{}}保存到文件调用"stdin.conf".然后,当您启动logstash时,请不要使用-e标志,而应使用-f并指定您的配置文件.

For my recommendation, you can write your configuration in a file. For example, save input{stdin{}}output{stdout{}} to a file call "stdin.conf". Then when you start logstash, don't use -e flag, instead use -f and specific your configuration file.

bin> logstash代理-f stdin.conf

bin>logstash agent -f stdin.conf

希望这可以为您提供帮助.

Hope this can help you.

这篇关于预期为#,输入,过滤器,输出中的一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆