# /usr/share/logstash/bin/logstash -e 'input { stdin { } } output { stdout {} }'
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
hello world
^C
Nothing happens. After starting the java process uses 100% CPU for 10-15 seconds and that's it. Nothing in /var/log/messages or /var/log/logstash.
How did you install? An RPM? Did you try adding --path.settings /etc/logstash, since you're executing from the command-line, rather than the default systemd startup method?
# date; /usr/share/logstash/bin/logstash -e 'input { stdin { } } output { stdout {} }'; date
Tue Mar 28 19:40:15 UTC 2017
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs to console
19:44:09.125 [[main]-pipeline-manager] INFO logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
19:44:09.223 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
The stdin plugin is now waiting for input:
19:44:09.458 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
abc
2017-03-28T19:45:56.075Z hostname abc
And specifying the path, it seems to die (with default settings, although I am specifying '-e' so this is weird):
# date; /usr/share/logstash/bin/logstash --path.settings /etc/logstash -e 'input { stdin { } } output { stdout {} }'; date
Tue Mar 28 19:47:27 UTC 2017
Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties
Tue Mar 28 19:49:38 UTC 2017
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.