Cannot start bin/logstash

I installed logstash through yum repo.

After installation I make config file in /etc/logstash/conf.d

when i started
bin/logstash -f
it outputs "No such file or directory"

you need to change the directory to the logstash installation directory

$ cd /usr/share/logstash
$ sudo bin/logstah -f /etc/logstash/conf.d/example.conf

or you can start it as service

$ sudo service logstash start

1 Like

Thank you for the reply @Vishal_Sharma1!

I already started the logstash through

$service logstash start

How can I confirm that It is receiving/running correctly and the config file I made in
conf.d is working fine?

well
$ ps aux | grep logstash

Also check logs at /var/log/logstash/logstash-plain.log

there's an error with the conf file

here's my conf file

    input{
     beats{
      host => "localhost"
      port => 5044
     }
    }
    filter{
     csv{
      separator => ","
       columns => ["logtime", "computer_name", "status"]
     }
    }

output {
 elasticsearch{
  host => "192.168.200.250"
  index => "sensor%{+YYYY.MM.dd}"
 }
stdout {
 codec => rubydebug
 }
}

The error is..

{:reason=>Expected one of #, => at line 7, column 6 (byte 69) after input{\nbeats{\n host => "localhost"\n port => 5044\n}\nfilter {\n csv "}

it should be hosts => "192.168.200.250"

Can I clear the logs in var/log/logstash/logstash-plain.log? So that it will be easy to check the current logs?

Thank you for your reply @Vishal_Sharma1. I already edited my config.

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