Ubuntu – remote server log viewer/analyzer

log-filesloggingopen sourcersyslogUbuntu

I have an rsyslog server running Ubuntu 12.04 which stores logs from different clients also running Ubuntu 12.04. Now I want to view those logs from my machine which also runs Ubuntu 12.04.

One way is to ssh to the server and view the logs using tail etc. but that's very tiring and not possible at all so isn't there any good opensource tool I can use to access those logs on my machine from the server it will be convenient if its a GUI application or a browser based one. Thanks.

Best Answer

In the trivial case, apache on the remote machine, with DocumentRoot set to /var/log.

Or if you want some kind of automagical transport, and you have ssh-agent set up correctly, try pointing a browser at sftp://remotemachine/var/log.

Edit: firstly, let's be clear about nomenclature. For the purposes of this question, as with X, I will define client and server as follows: the server is the machine from which you are viewing the logs, and the client is the machine on which the logs reside. This is because there may be many of the latter, but there is only one of the former.

If you only want server-side software, you have lots of choices but a transport problem; there is no magic service that you can install locally that somehow gives you file-system-level access to all the clients. The sftp URI is the easiest way I can find to provide that access automagically, and it will require you to do some work with keys and ssh-agent.

If you're willing to install software on each of the clients, that solves the transport problem. httpd on the clients is one easy way of doing it (since you specified server-side browser-based solutions), but there are many others (such as Anadi's suggestion of logstash). But you will need to indicate your willingness to install server on each client for us to explore this.

Related Topic