Skip to content

glTail on ArchLinux

Gltail is another real-time data and statistics tool like gltrail. It works by drawing via OpenGL the remote logs of a machine, using SSH transport.

Grab the gltail source code at https://github.com/Fudge/gltail.git

[shell]
arch /usr/local/src # git clone https://github.com/Fudge/gltail.git
Cloning into ‘gltail’…
remote: Counting objects: 911, done.
remote: Compressing objects: 100% (395/395), done.
Receiving objects: 30% (274/911), 124.00 KiB | 103 KiB/s Receiving objects: 30% (280/911), 172.00 KiB | 101 KiB/s Receiving objects: 31% (283/911), 236.00 KiB | 107 KiB/s Receiving objects: 32% (292/911), 236.00 KiB | 107 KiB/s Receiving objects: 33% (301/911), 236.00 KiB | 107 KiB/s remote: Total 911 (delta 543), reused 846 (delta 495)
Receiving objects: 100% (911/911), 363.44 KiB | 97 KiB/s, done.
Resolving deltas: 100% (543/543), done.
arch /usr/local/src #
[/shell]

Before executing, some ruby gems are needed:

[shell]
# gem install -y net-ssh net-ssh-gateway -r
# gem install -y file-tail -r
# gem install -y opengl –pre -r
[/shell]

Reading the README file, the configuration options get explained. I will use the ssh-key approach.

[text]
Configuration:
Open config.yaml in a text editor, and tweak to your liking. You might want to save the
result to another file, and include that on the command line.
Either include a password for each of your servers, or make sure your ssh-keys are
correctly set up.

If you need to specify a SSH key replace
password: secret
with
keys: /path/to/key

Running:
./bin/gl_tail –help
./bin/gl_tail <config.yaml>

You can also press ‘f’ while running to toggle the attempted frames per second. Or ‘b’
to change default blob type, and space to toggle bouncing.

To enable fullscreen mode, press shift + f, or set fullscreen: true in the config section of your config.yaml.
[/text]

Looking at the configuration file in yaml format, sites are defined inside the “servers” tag. The “config” tag holds information about the visualization engine: refresh,colours,resolution,etc.

[text]
arch /usr/local/src/gltail # cat config.yaml
servers:
site1:
host: foobar.com
user: foo
password: topsecret
command: tail -f -n0
files: /var/log/apache/access_log
parser: apache
color: 0.2, 1.0, 0.2, 1.0
rails:
gateway: gw-server.anotherfunsite.com
host: anotherfunsite.com
user: anotherfunuser
port: 222
command: tail -f -n0
files: /var/www/apps/funapp/current/log/production.log
parser: rails
color: 0.2, 0.2, 1.0, 1.0
config:
dimensions: 1200×600
min_blob_size: 0.004
max_blob_size: 0.04
highlight_color: orange
bounce: false
left_column:
size: 25
alignment: -0.99
blocks:
info:
order: 0
size: 10
auto_clean: false
show: total
hosts:
order: 1
size: 3
sites:
order: 2
size: 10
content:
order: 3
size: 5
show: total
color: 1.0, 0.8, 0.4, 1.0
status:
order: 4
size: 10
color: 1.0, 0.8, 0.4, 1.0
types:
order: 5
size: 5
color: 1.0, 0.4, 0.2, 1.0
users:
order: 6
size: 10
smtp:
order: 7
size: 5
logins:
order: 8
size: 5
database:
order: 9
size: 10
memcached:
order: 10
size: 3

right_column:
size: 25
alignment: 0.99
blocks:
urls:
order: 0
size: 15
slow requests:
order: 1
size: 5
show: average
referrers:
order: 2
size: 10
user agents:
order: 3
size: 5
color: 1.0, 1.0, 1.0, 1.0
mail from:
order: 4
size: 5
mail to:
order: 5
size: 5
viruses:
order: 6
size: 5
rejections:
order: 7
size: 5
color: 1.0, 0.2, 0.2, 1.0
warnings:
order: 8
size: 5
resolver:
reverse_ip_lookups: true
reverse_timeout: 0.5
arch /usr/local/src/gltail #
[/text]

You can grab a screen videocapture of gltail here

Published inlinuxlogs