I have set custom name in filebeat input section. However, in logstash configuration file it was unable to be use
Filebeat config file
- type: log
enabled: true
paths:
...
fields:
- name_of_index: group-1
- name_of_log: apache
Logstash.conf
input {
beats {
port => 5044
...
type => "%{[field][name_of_log]}"
}
}
filter {
if "%{[field][name_of_log]}" in ["apache"] {
...
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "%{[fields][name_of_index]}-%{+YYYY-MM-dd}"
}
}
output in elasticsearch
%[fields][name_of_index]-2020-01-05
I not sure which parr it is wrong able to help in this?