[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tip for viewing logfiles on an other host



Monitor with MultiTail the logfile of an other system:
-----------------------------------------------------
For this you need to setup a couple of things. MultiTail runs on system
A, the logfile on system B.
In this example we're going to monitor the apache logfile. Add the
following to /etc/services:

apachelog       20000/tcp

Add this to /etc/inetd.conf:

apachelog stream tcp nowait root /usr/local/sbin/tail_apache_log /usr/local/sbin/tail_apache_log

and create the file /usr/local/sbin/tail_apache_log with the following
content:

#!/bin/sh

/usr/bin/tail -f /var/log/apache2/access.log

make sure that you don't forget to make that script executable (chmod +x
filename).  Then on host A start MultiTail like this:

multitail -cS apache -l "telnet B 20000"

Please note that logfiles go in plaintext across the network. You may
also need to adjust the files /etc/hosts.[allow|deny] on host B to only
allow host A to connect.


Folkert van Heusden

-- 
MultiTail è uno flexible tool per seguire di logfiles e effettuazione
di commissioni. Feltrare, provedere da colore, merge, 'diff-view',
etc. http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com