Need help in configuring live logs from server to logstash


(vp) #1

Hi, I want to access live logs from my server and configure this path in logstash so that I can search exceptions in the logs with filters in logstash and view the result in kibana. Can anyone help me in this.

Thanks


(Magnus Bäck) #2

This is a very broad and open question. Have you looked at the examples in the Logstash documentation? While they won't be exactly what you're looking for they should give you an idea that allows you to ask more specific questions.


(sayalee) #3

You can use any one solution for getting the real time logs:

  1. rysnc approach: Here a script will run after every 2 secs in the background which will fetch the logs from the server, but you need to have the ssh on both servers and the public key of the remote server needs to copied in your server so that it can login to your server.

  2. rsyslog approach: you need to configure the file to receive the real time logs from the server.
    you can refer the site for second approach,
    https://www.digitalocean.com/community/tutorials/how-to-centralize-logs-with-rsyslog-logstash-and-elasticsearch-on-ubuntu-14-04

Hope you have atleast got basic approaches which can be used.


(Magnus Bäck) #4

rysnc approach: Here a script will run after every 2 secs in the background which will fetch the logs from the server, but you need to have the ssh on both servers and the public key of the remote server needs to copied in your server so that it can login to your server.

When attempting to do this, make sure rsync appends to existing files rather than overwriting them. I don't recommend this approach. It's fragile and takes great care to get right.


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.