Remote Logstalgia: Difference between revisions

From fakedWiki
Jump to: navigation, search
(Created page with "How to combine the logs of two hosts running Varnish, and visualize them on a remote workstation with Logstalgia? Send the output of two or more hosts to netcat listening on one…")
 
No edit summary
Line 4: Line 4:


==== Relay ====
==== Relay ====
Listen on port 31337 for incoming logs, relay to port 1337, allow multiple clients (and disconnects without exiting)
Listen on port 31337 for incoming logs, relay to port 1337, allow multiple clients (and disconnects without exiting).
<pre>
<pre>
host1$ nc -l -k 31337 | nc -l -k 1337
sudo apt-get install netcat-openbsd
nc -l -k 31337 | nc -l -k 1337
</pre>
</pre>


Line 12: Line 13:
Send Varnish log from host1 to relay on host1
Send Varnish log from host1 to relay on host1
<pre>
<pre>
host1$ varnishncsa | nc localhost 31337
varnishncsa | nc localhost 31337
</pre>
</pre>


Line 18: Line 19:
Send Varnish log from host2 to relay on host1
Send Varnish log from host2 to relay on host1
<pre>
<pre>
host2$ varnishncsa | nc host2 31337
varnishncsa | nc host2 31337
</pre>
</pre>


Line 24: Line 25:
Send Varnish log from hostN to relay on host1
Send Varnish log from hostN to relay on host1
<pre>
<pre>
hostN$ varnishncsa | nc host1 31337
varnishncsa | nc host1 31337
</pre>
</pre>




==== Workstation ====
==== Workstation ====
Run Logstalgia on workstation, with output from relay
Run Logstalgia on workstation, with output from relay. Download NetCat for Windows [http://www.stuartaxon.com/2008/05/22/netcat-in-windows/ here]
<pre>
<pre>
C:\> nc host1 1337 | logstalgia.exe --sync
nc.exe host1 1337 | logstalgia.exe --sync
</pre>
</pre>

Revision as of 15:04, 3 February 2011

How to combine the logs of two hosts running Varnish, and visualize them on a remote workstation with Logstalgia?

Send the output of two or more hosts to netcat listening on one of the hosts, which combines the input and listens for a connection from the workstation.

Relay

Listen on port 31337 for incoming logs, relay to port 1337, allow multiple clients (and disconnects without exiting).

sudo apt-get install netcat-openbsd
nc -l -k 31337 | nc -l -k 1337

Host1

Send Varnish log from host1 to relay on host1

varnishncsa | nc localhost 31337

Host2

Send Varnish log from host2 to relay on host1

varnishncsa | nc host2 31337

HostN

Send Varnish log from hostN to relay on host1

varnishncsa | nc host1 31337


Workstation

Run Logstalgia on workstation, with output from relay. Download NetCat for Windows here

nc.exe host1 1337 | logstalgia.exe --sync