Hi all, i know its discussed a lot of times but i cant find my solution. A index is not created from one of my logstash config files and i cant find why. this is the config:
input {
file {
path => "/var/log/named/resolve_dnsproxy.log"
exclude => "*.gz"
start_position => "beginning"
sincedb_path => "/dev/null"
ignore_older => 0
type => "named"
}
}
filter {
if [type] == "named" {
grok {
patterns_dir => "/etc/logstash/patterns"
match => { "message" => ["%{NAMED}"] }
}
}
}
output {
if [type] == "named" {
elasticsearch {
index => "named-%{+YYYY.MM.dd}"
hosts => [ "192.168.0.12:9200" ]
user => elastic
password => elastic
manage_template => true
template_overwrite => true
template => "/etc/logstash/templates/named.json"
template_name => "named"
}
}
}
Same config, different values is working a lot of times....
This is my template:
{
"template" : "named-*",
"order" : 1,
"settings" : {
"number_of_shards" : 2,
"index.refresh_interval" : "90s"
},
"mappings" : {
"named" : {
"properties" : {
"timestamp" : { "index": "true", "doc_values": true, "type" : "keyword" },
"srcip" : { "index": "true", "doc_values": true, "type" : "keyword" },
"port" : { "index": "true", "doc_values": true, "type" : "keyword" },
"query" : { "index": "true", "doc_values": true, "type" : "keyword" },
"dnstype" : { "index": "true", "doc_values": true, "type" : "keyword" },
"resolver" : { "index": "true", "doc_values": true, "type" : "keyword" },
"@timestamp" : { "format" : "dateOptionalTime", "type" : "date" }
}
}
}
}
Also this works for different log files successful!
I checked my patterns multiple times, at least with ELK6 and the grok debugger, no problems.
Access rights for the file(s):
-rwxr-xr-x 1 bind bind 2581 Jun 26 12:24 resolve_dnsproxy.log
-rwxr-xr-x 1 bind bind 36239 Jun 26 03:04 resolve_dnsproxy.log.1.gz
The user "logstash" is member of the group bind.
Please, can anyone shed some light. Thanks.