Using logstash 2.3.4 on a windows server with a config file. My config file contains the below output definition:
output {
elasticsearch {
index => "indexname"
}
}
I'm starting logstash with the -f and -r flags. Unfortunately, logstash is printing every log entry that comes through out to the console and I fear this is using up unnecessary CPU cycles. I looked around as to how to disable this, and the only hint I can find is to not have a stdout entry (which I do not). How do I disable this output? I do not want logstash to be constantly printing to a console no one is going to be looking at.
It's JSON data, but no I can't post it as it contains proprietary data. I've looked through the output and it's not due, exclusively, to errors, it's 99% the messages that are being processed by it. We occasionally get messages that exceed the maximum byte size, but that's expected.
I suppose, more to the point, even if it does have an error, I want absolutely nothing printing to a console. I essentially want this to be a daemon. If there is an error, it gets reflected in Elasticsearch and Kibana (which is where it would be noticed anyway as no one is monitoring logstash to begin with, this was only noticed because of unusually high CPU usage).
Found my solution: Used the flag --quiet and now all console output has been disabled. I found this through a Stack Overflow Q/A but couldn't find it in documentation through any ease. I'd suggest making this flag a bit easier to find. This lowered CPU usage of a single daemon from 99% to roughly 15% during high load.
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.