I have successfully installed the Elastic stack(Elasticsearch + Logstash + Kibana) and can use it with Logback logs on the local machine. But now I need to read the logs from the remote server. I think there is no need to install entire ELK stack on the remote server, at least because ELK consumes some resources. Now I have only one remote server and my plan looks like this: I can setup the ELK stack on the my local machine and when I need to check the logs, I can connect the Logstash to the remote server and read the logs. Easily. But I have two questions:
Is this a fine way to do this? I also thought about adding Filebeats to this pipeline, but I think I don't need it, because I will not have a constantly turned on computer that will constantly receive logs. I am looking for a simple solution for reading logs five to ten times a day.
Ok, thanks. And what I need to do next if we take into account the requirements(I will not have a constantly turned on computer that will constantly receive logs)? Is it better to connect Filebeat to Elasticsearch or Logstash on the local machine?
I tried to use Filebeat, but it always tried to reconnect to Logstash("Attempting to reconnect to backoff"), I think it didn't think for such use. Or do I need to change some configuration for read logs on demand(let's call it like that)?
filebeat can send it directly to elasticsearch, if the processors in the filebeat are enough, you could skip the logstash
obviously, according to your requirements and scale, logstash should help with the load, and having 2 logstashs to forward mesasges to the elasticsearch cluster
you can configure the output of your filebeat to send to more than one logstash according to the documentation
loadbalance
If set to true and multiple Logstash hosts are configured, the output plugin load balances published events onto all Logstash hosts. If set to false, the output plugin sends all events to only one host (determined at random) and will switch to another host if the selected one becomes unresponsive. The default value is false.
But I don't need this. I want to produce logs on the remote server, and when I need to check the logs I want to connect to this server and read them using ELK on my local machine. Please check my first post.
So, how can I do this?
I already installed Filebeat on the machine where the logs reside, but it always tried to reconnect to Logstash("Attempting to reconnect to backoff") if Logstash is offline. I already said about this, please check it.
For Filebeat to be able to connect to Logstash they need to be up at the same time. If this is not possible another route might be to have Filebeat send data directly to Elasticsearch and use an ingest node pipeline to process it there.
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.