Hello,
Im new in ELK and i want run that concept:
Nginx -> logstash -> Elastic -> Kibana
(Standard ELK)
But when i try config all i have that problem:
When i run:
filebeat setup -e:
2018-07-27T13:58:10.146Z ERROR instance/beat.go:691 Exiting: Error getting config for fileset nginx/access: Error interpreting the template of the input: template: text:3:22: executing "text" at <.paths>: range can't iterate over /var/log/nginx/access.log
Exiting: Error getting config for fileset nginx/access: Error interpreting the template of the input: template: text:3:22: executing "text" at <.paths>: range can't iterate over /var/log/nginx/access.log
Thats is my nginx.yml from modules.d
module: nginx
Access logs
access:
enabled: trueSet custom paths for the log files. If left empty,
Filebeat will choose the paths depending on your OS.
var.paths: /var/log/nginx/access.log
Error logs
error:
enabled: trueSet custom paths for the log files. If left empty,
Filebeat will choose the paths depending on your OS.
var.paths: /var/log/nginx/error.log
And my logstash config:
input {
beats {
port => 5400
}
}
filter {
grok {
match => [ "message" , "%{COMBINEDAPACHELOG}+%{GREEDYDATA:extra_fields}"]
overwrite => [ "message" ]
}
mutate {
convert => ["response", "integer"]
convert => ["bytes", "integer"]
convert => ["responsetime", "float"]
}
geoip {
source => "clientip"
target => "geoip"
add_tag => [ "nginx-geoip" ]
}
date {
match => [ "timestamp" , "dd/MMM/YYYY:HH:mm:ss Z" ]
remove_field => [ "timestamp" ]
}
useragent {
source => "agent"
}
}
output {
elasticsearch {
hosts => ["xxx.xxx.xxx.xxx:9200"]
index => "weblogs-%{+YYYY.MM.dd}"
document_type => "nginx_logs"
}
stdout { codec => rubydebug }
}
Someone can help please?