Hi Team,
I have a setup of dockerized elk setup of version 7.3.1 (Elasticsearch, logstash, Kibana, Filebeat).
ELK is running on docker only. I have installed filebeat package on same machine and provide input to logstash.
I have multiple log file like messages, auth.log, cron.log etc. and all these have configured in filebeat.yml with fields parameter for identification.
fields:
service: auth_logs
I want to all these logs file will go logstash as input beat and output will different index as per file name in elk.
How can I achieve this ? Please help.
Version: 7.3.1
below is the logstash config file
input {
beats {
port => 5044
}
}
output {
elasticsearch {
hosts => hostip
index => "%{[field][service]-%{+YYYY.MM.dd}"
}
}
Thanks for correction but only one index is created i.e, system-index not the other (auth-index). I am getting request on other log file as well.
So how will it be achieve ?
I want to create separate index for log files for multiple instances.
Look at your data in the Kibana Discover app. Do records have the correct additional field set from Filebeat? Do you see both types of documents? Is it possible that Filebeat is not correctly configured?
I have checked kibana and field.log_type is system which is correct for path /var/log/syslog but other field which has path /var/log/auth.log is not coming in kibana at all. Only one document is present i.e, system.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.