Search code examples
elasticsearchlogstashsysloglogstash-jdbc

How to stop logstash to write logstash logs to syslog?


I have my logstash configuration in my ubuntu server which reads data from the postgres database and send the data to elastic search. I have configured a schedule at each 15 minutes the logstash will look the postgres table, if there is any change in the table it sends the data to elastic search.

But each time the logstash is also sending the logs to syslog which I does not need. Because of logstash my syslog file consumes more memory.

So how to stop logstash to send its logs to syslog. Is there is any configuration in logstash.yml to avoid sending logs to syslog.

I referred many sites in online in which they said to remove below line from the configuration.

stdout { codec => rubydebug }

But I don't have this line.

In my output I just send my data to elastic search which I brought from AWS.

Is there is a way to stop logstash to sending its logs to syslog?


Solution

  • To avoid write to syslog, check your pipelines and log4j.properties files.

    In your pipelines files, remove all occurences of this :

     stdout { codec => rubydebug }
    

    And in your log4j.properties files comment this line :

    rootLogger.appenderRef.console