Lostash std err and out file oversize

Hi all, one of my colleagues called me yesterday and I was told that there are 2 logfile from Logstash are growing oversize, screenshot as below:

image

So the scenario is I am running 2 logstash as background services 24/7 since last month and it is weird for the logfile (as the pictures shown) having so much size.

So the message from the files logstash-stdout.log is basically the log input where the log is coming from another services named Nagios and I wonder why it doesn't do the log rotation like hitting certain size it will delete or the kind of log management.

However, message from another file named logstash-stderr.log is receiving this message all the time Could not load : no implicit conversion of nil into String

So in short, I would like to solve the oversize issue and btw what does Could not load : no implicit conversion of nil into String mean and how could it happened ?

Below is what I have write in the files.

Logstash1.conf

input {
  file {
    path => ["/usr/local/nagios/var/nagios.log"]
    start_position => "beginning"
    sincedb_path => "/dev/null"
  }
}
filter{
//Filtering
}
output {
  elasticsearch {
    hosts => ["<IP_ADDRESS>"]
    index => "test-nagios"
  }
  stdout { codec => rubydebug }
}

Logstash2.conf

input {
  udp {
    port => 514
  }
}
filter {
//do ntg here
}
output {
  elasticsearch {
    hosts => ["<IP_ADDRESS>"]
    index => "get-tcp-1"
  }
  stdout { codec => rubydebug }
}

logstash logs using log4j2, and the default log4j2.properties does not log to those files. I would guess that your service manager is cc'ing stdout and stderr to those files. To stop that, or to enable file rotation would require you to reconfigure your service manager. It is not a logstash question.

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