We have logstash configured for each of these projects in a different configuration file as well as some of the grok expressions are different based on the type of Load Balancer that the project has. For example we have,
If I start logstash service it reads all the conf files and populate the indices but sometimes data from ProjectA is seen on ProjectC and so on.
I did a fresh start and only started one configuration file at a time and that seems to house the data to it's own indices.
Do we need to configure in a different way for a requirement like this?
What does a sample Logstash conf look like?
Because Logstash will mere all of those files into one big one at run time, unless you use pipelines or something else to segregate things.
So all those conf files Are merged / concatonated i.e they are all merged into a single pipeline, so you need an if {} block to make sure you send the right docs to the right index in each of the confs.
This is great! I opted for multiple pipelines and it seems to work.
# This file is where you define your pipelines. You can define multiple.
# For more information on multiple pipelines, see the documentation:
# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html
#- pipeline.id: main
# path.config: "/etc/logstash/conf.d/*.conf"
- pipeline.id: ProjectA-pipeline
path.config: "/etc/logstash/conf.d/ProjectA.conf"
- pipeline.id: ProjectB-pipeline
path.config: "/etc/logstash/conf.d/ProjectB.conf"
- pipeline.id: ProjectN-pipeline
path.config: "/etc/logstash/conf.d/ProjectN.conf"
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.