Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expected one of #, input, filter, output in logstash

Tags:

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.

My command

 C:\logstash-1.4.0\bin>logstash.bat agent -e 'input{stdin{}}output{stdout{}}'

And the error

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

Please help.Thanks in advance!

like image 929
Dency G B Avatar asked Feb 13 '23 10:02

Dency G B


2 Answers

I am testing with logstash-1.4.0 on linux with this tutorial.

I think it is possible a bug on this version.

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 agent -e 'input{stdin{}}output{stdout{}}'

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 agent -f stdin.conf

Hope this can help you.

like image 118
Ben Lim Avatar answered Feb 15 '23 23:02

Ben Lim


Try without quotes

C:\logstash-1.4.0\bin>logstash.bat agent -e input{stdin{}}output{stdout{}}
like image 31
Fares Avatar answered Feb 15 '23 22:02

Fares