my logstash version is 5.0.0-alpha5 and the following is my configuration .
input {
redis {
batch_count => 1000
host => "127.0.0.1"
port => 6379
password => "xx"
db => 0
key => "beats"
data_type => "list"
timeout => 5
}
}
filter {
grok {
patterns_dir => ["/etc/logstash/patterns"]
match => { "message" => "%{NGINX_ACCESS}"}
overwrite => [ "host" ]
remove_field => [ "message" , "source" , "offset" , "input_type" ]
}
mutate {
convert => { "status" => "integer" }
convert => { "body_bytes_sent" => "integer" }
convert => { "request_length" => "integer" }
convert => { "request_time" => "float" }
convert => { "upstream_status" => "integer" }
convert => { "upstream_response_time" => "float" }
}
if [http_x_forwarded_for] == "-" {
mutate {
add_field => { "client_ip" => "%{remote_addr}"}
}
} else {
mutate {
split => { "http_x_forwarded_for" => "," }
add_field => { "client_ip" => "%{[http_x_forwarded_for][0]}"}
}
}
date {
match => [ "time_local" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
geoip {
source => "client_ip"
}
useragent {
source => "http_user_agent"
target => "user_agent"
}
}
output {
elasticsearch {
hosts => ["127.0.0.1:9200"]
index => "logstash-%{type}-%{+YYYY.MM.dd}"
flush_size => 20000
idle_flush_time => 10
}
#stdout { codec => rubydebug }
}
here is the error message.
Sending logstash logs to /var/log/logstash/logstash.log.
Pipeline main started
NoMethodError: undefined method `eventget' for #LogStash::Filters::Mutate:0x29585536
split at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-mutate-3.1.1/lib/logstash/filters/mutate.rb:369
each at org/jruby/RubyHash.java:1342
split at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-mutate-3.1.1/lib/logstash/filters/mutate.rb:368
filter at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-mutate-3.1.1/lib/logstash/filters/mutate.rb:212
multi_filter at /usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:155
each at org/jruby/RubyArray.java:1613
multi_filter at /usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:152
multi_filter at /usr/share/logstash/logstash-core/lib/logstash/filter_delegator.rb:42
filter_func at (eval):155
filter_batch at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:250
call at org/jruby/RubyProc.java:281
each at /usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:155
each at org/jruby/RubyHash.java:1342
each at /usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:154
filter_batch at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:248
worker_loop at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:236
start_workers at /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:215