How to install and configure Log.io, a tool for real-time log monitoring in your browser.

Log.io - real-time log monitor

A screenshot of a working installation

A look at how to install and configure Log.io, which is a tool for real-time log monitoring in your browser.

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):

Installation

Install latest version of node.js:

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

Install npm:

curl https://npmjs.org/install.sh | sudo sh

Install log.io:

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 forever@0.9.0 -g

Launch Server:

sudo log.io server start

Launch Harvester:

sudo log.io harvester start

Visit localhost:8998

If you see a grey/black site, you have been successful. Now for configuring the tool!

Configuration

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.

Examples:
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)

Expand

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.

Enjoy!

Log.io website: http://logio.org/

Jan-Helge Hansen

Jan-Helge Hansen

Les flere artikler fra Jan-Helge Hansen.

Prosjektkoordinator i Frontkom, ivrig opptatt av SEO og sosiale medier. Finnes blant annet på . Blir glad av raske nettsider.