Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run logstash as a service and view stdout

I have used the RPM installation of logstash. As such, logstash is running as a linux service. I would like to debug a pipeline and need to view the contents of

output {
  stdout { codec => rubydebug }
}

But, since logstash is started as a service - where/how do you view stdout? Is there a way to pipe the contents of rubydebug into the log file at /var/log/logstash/logstash.log?

Nathan

like image 821
Nathan Reese Avatar asked Oct 22 '25 06:10

Nathan Reese


1 Answers

Most Linux distros use systemd now (instead of sysvinit) to run services so the 2016 solution no longer works on most Linux systems.

If your Linux distro has systemd, to view stdout from logstash use the command: journalctl -f -u logstash. No need to edit any file/script and works with the stdout output in logstash.

like image 199
ddrake12 Avatar answered Oct 23 '25 20:10

ddrake12