I'm having an issue with pipelines, I think I caused the problem but can't find where it is. I have two servers, one running ELK and Filebeat, the other running Apache and Filebeat.
What I am trying to do is to get all the logs from /var/log/messages to one pipeline, and the ones from /varr/log/httpd/access_log to another one. My goal is to have two seperate indexes.
But unfortunately, all the logs are still going through the first pipeline and not the second one.
@Wellguys, if you have just separated your Logstash configuration into two different files, you aren't running in two separate pipelines. You have to configure that in your pipelines.yml file. If not, all your Logstash *.conf files are concatenated together and run in a single pipeline. That's almost certainly why you're seeing logs in the other ES index.
I restarted the service and it is true that my second pipeline is not running well. I cant't find the index in kibana either.
[2019-01-28][ERROR][logstash.pipeline] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:pipe2
I'm using centos7 and I don't really know how to use "--config.test_and_exit --log.level debug". I enabled it in logstash.yml and restarted logstash but nothing seems to happen. I'm not getting any logs either.
I restarted the service normally again and this time pipe1 is having a problem. Meanwhile, pipe2 is taking all the logs.
Is it not possible to send all data via one port, and then seperate them depending on log source file ?
You can not have two input plugins listening to the same port, which is why one of the pipelines always fails. You could however put the beats input plugin in a third separate pipeline and then use conditionals to direct the data to your other pipelines using pipeline-to-pipeline communication.
Oh yes thats perfect, it works great with a third pipeline. I'll send all my configuration for people who would have the same problem. Thanks for the help everyone!
Hello, I used your configuration for the pipeline. Though i have two different metricbeats in two different servers. So in the analyzer.conf I have 2 beats input listening to different port. I tried to send output to different pipelines based on port but it doesn't work. Is it even possible to use
if [port] == "5045" { do something} . I am aiming to create different indeces based on which server the logs come from. I also added tags to each beat input to send to the pipeline based on tag but still doesn't work. i can't see the new indeces in kibana.
If you want to create different indexes depending on the server you should use something like if [beathostname]. From what I understand, things in "[word]" are fields in logs so It won't work with port number. If you want to use two different ports you only need two pipelines, with a different input port in both.
It doesn't work with the hostname. But I think the problem is that both servers write to the same registry. I will fix that and see if indexing is working.
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.