Today we will take a look at how to install and configure Log.io, which is a tool for real-time log monitoring in your browser.
Why? Because it's "like tail on steroids", and we love it.
First we install step-by-step (tested on Ubuntu 12.04):
Install latest version of node.js:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
curl https://npmjs.org/install.sh | sudo sh
sudo npm config set unsafe-perm true
sudo npm install -g --prefix=/usr/local log.io
Install earlier version of Forever for log.io to work:
sudo npm install email@example.com -g
sudo log.io server start
sudo log.io harvester start
If you see a grey/black site, you have been successful. Now for configuring the tool!
The configuration file located at /etc/log.io/harvester.conf. It should be fairly self-explaining, though there are a couple of traps to look out for. First of all - don't use spaces or dots in the "instance_name" variable. That will break the tool.
OK: instance_name : 'Log_io'
Not OK: instance_name: 'Log.io 2'
Secondly - you may use dots and spaces in the log labels, but only if you use "" around the entire label.
Now for how to use the service in the browser. First you need to know that it resets on every page reload. When it is live it keeps 1000 lines in memory. You can however always use the History function to read the file's content from before you started viewing.
Stream is accessed by using the square checkboxes next to log label, History by using the circular checkboxes. You get one box pr. open window, from there it's fairly self-explanatory. Color codes are given to each label, and you can view multiple labels in a single Stream.
The footer gives access to creating new Stream and History windows, maximum 4 in total. It also shows how many nodes you have access to, how many logs, uptime and number of log lines received during uptime.
It's like tail on steroids (Alf Harald, 2012)
What is left, you say? Well, we can ask any server to report to this one. Just install the same way, but launch only Harvester on the other servers. Set the harvester.conf to report to correct server IP or hostname, and it just works.
Log.io website: http://logio.org/