Logstast apache configuration

Guysss please help me out...i have created one configuration file with the code

input {
file {
path => "/var/log/messages"
type => "syslog"
}

file {
path => "/var/log/apache/access.log"
type => "apache"
}
}

output {
elasticsearch {
host => localhost
}
stdout { codec => json }
}

It showing me same error again n again.

bin/logstash -f logstash.conf

Error: No config files found: /home/krishna/Downloads/logstash-2.0.0-rc1/logstash.conf
Can you make sure this path is a logstash config file?
You may be interested in the '--configtest' flag which you can
use to validate logstash's configuration before you choose
to restart a running system.

Is that where your config file lives?

NO,right path is

/home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf

Pass that in as the full path then :slight_smile:

I had already passed it but it showing me same error.

bin/logstash -f /home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf still errors?

What does ls -l /home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf show?

-rw-rw-r-- 1 krishna krishna 235 Oct 30 12:34 /home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf

So bin/logstash -f /home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf still errors?

It sounds like just a path issue.

Error: The setting host in plugin elasticsearch is obsolete and is no longer available. Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format. If you have any questions about this, you are invited to visit https://discuss.elastic.co/c/logstash and ask.
You may be interested in the '--configtest' flag which you can
use to validate logstash's configuration before you choose
to restart a running system.

I got new error.

If you have logstash\bin in your path, put your config file into logstash\conf and issue command from there.

Oh and forgot to mention that will cut you command down significantly to be logstash -f logstash.conf

To solve this, change the output section into this:

 output {
 elasticsearch {
 hosts => localhost
 }
 stdout { codec => json }
}

Small change, but this makes the elasticsearch plugin work again. Don't forget to restart logstash after editing your config file.