Search code examples
elasticsearchlogstashlogstash-grok

Unknown setting 'protocol' for elasticsearch 5.1.1


So I've been looking for the way to solve this issue all day long. but all I've got is for the old version of elasticsearch. fyi, i use the latest version of elk stack.

  • elasticsearch version : 5.1.1
  • kibana version : 5.1.1
  • logstash version : 5.1.1

This is my apache conf :

input {
    file {
        path => '/Applications/XAMPP/xamppfiles/logs/access_log'
    }
}

filter {
    grok {
        match => { "message" => "%{COMBINEDAPACHELOG}" }
    }
}

output {
     elasticsearch { protocol => "http" }
}

That file used to access log data from apache.

But when I run the logstash, with :

logstash -f apache.conf

I got this error message.

enter image description here

That message told me that something wrong with my configuration. the http protocol is doesnt exist anymore i guess.

Can you tell me how to fix it?

Many thanks return


Solution

  • There is no protocol setting in the elasticsearch output anymore. Simply modify your output to this:

    output {
        elasticsearch { 
           hosts => "localhost:9200" 
        }
    }