As a SW/Ops/DB Engineer

riywo’s technology memo

Webtail + Ncat = Simple Log Monitoring!

webtail is a super simple log monitoring tool. You can monitor a log streaming on a server via your web browser.

I wanted to monitor multi servers log, so I tried ncat in mmap. ncat supports multi sessions.

Here is an example.

## monitor server
mon> ncat -l -k 10000 | webtail

## web servers
web1> tail -F access_log | sed -e 's/^/web1 /' | nc mon 10000
web2> tail -F access_log | sed -e 's/^/web2 /' | nc mon 10000
web3> tail -F access_log | sed -e 's/^/web3 /' | nc mon 10000

You can monitor all web servers logs with a single web page.

Enjoy!

Comments