How to completely disable logstash logging?

(Rahul Jagad) #1

I am using Linux system.
I do not want logstash to write any log either under location "/usr/share/logstash/logs" or under "/var/log/logstash".

I want to completely disable all type of logging for logstash.

Please let me know what should I do?

(Magnus B├Ąck) #2

I'm not sure that's possible. Why do you want to do that?

(Rahul Jagad) #3

It is consuming huge disk space, hence do not want to store any logs.


Modifying your logstash.yml to have log.level: warn or log.level:error might help. But it might also be worth reading those logs and understanding why it is logging so much.

For example, in one of my instances, I had hundreds of megabytes of errors from xml filters that were failing because the xml was getting truncated upstream. Adding a simple check to see if the xml text ended in > before applying the xml filter cut the logs by 95%.

(Rahul Jagad) #5

@Badger, True. Even for me, i had written ruby filters for 4.x version and the same code i am using for 6.2 version. that might be the problem. I am checking the same but meanwhile i wanted to stop the logs. I changed it to fatal level. Now, for time being, nothing is being written. :slight_smile:

(Colton) #6

Would it be possible to change the path to which logstash logs to to /dev/null?


If you set path.logs to /dev/null then you get an exception

2018-06-12 16:03:48,264 main ERROR Unable to create file /dev/null/logstash-plain.log File /dev/null exists and is not a directory. Unable to create directory.

I expect you could update to avoid this.

(Rahul Jagad) #8

Thank you very much! let me check

(system) #9

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.