Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Apache, Monitoring

Visualizing Apache Logs with Logstalgia

Submitted by on December 4, 2014 – 12:01 am

The Logstalgia is a cool graphical utility for visualizing the Apache access_log files. The practical value of Logstalgia is debatable, but it’s entertainment value is not in question. The managers and NOC operators can stare at it for hours. Here are the instructions to install and user Logstalgia on CentOS/RHEL.

NOTE: the logstalgia folks got too fancy with pre-requisites and rendered their tool pretty much useless on anything but the latest and greatest Ubuntu. If you read Russian, here’s a decent attempt to get Logstalgia working on RHEL/CentOS 6. Otherwise, you’re SOL.

Install the prerequisites:

yum install SDL-devel SDL_image-devel ftgl-devel pcre-devel libpng-devel libjpeg-devel gcc-c++ make gcc glew glew-devel

Boostlib installation

Logstalgia requires boostlib v. 1.46+. If you’re using anything older than CentOS/RHEL 7, you will need to install from third-party repo. If you already have an older version of boostlib installed, you would need to remove it prior to installing a newer release:

yum erase boost boost-devel

Install from third-part repo:
cd /tmp
wget http://repo.enetres.net/enetres.repo -O /etc/yum.repos.d/enetres.repo
yum install boost-devel

Install GLM
cd /tmp
v="0.9.4.6"
wget http://downloads.sourceforge.net/project/ogl-math/glm-${v}/glm-${v}.zip
unzip glm-${v}.zip
cp -r glm/ /usr/include/

Download and compile Logstalgia source code:
cd /tmp
v="1.0.7"
wget https://github.com/acaudwell/Logstalgia/releases/download/logstalgia-${v}/logstalgia-${v}.tar.gz
tar zxvf logstalgia-${v}.tar.gz
cd logstalgia-${v}
./configure
make
make install

Keep in mind that Logstalgia is a graphical tool requiring X-Window server. If you are running it via PuTTY on Windows, you will need to enable X11 forwarding in PuTTY and have the Xming service running. Once you have that, log into your Web server of interest and run the following command (substituting the correct path to your access_log file):
tail -f /var/log/httpd/krazyworks.com/access_log | logstalgia --sync

The end result should look something like the following, or even more exciting, if your site gets good traffic:

logstalgia01

 

When running Logstalgia on a Unix system, you can SSH to a remote Web server and visualize its logs. Something like this:

ssh user@another.server "tail -f /var/log/httpd/access_log" | logstalgia --sync

You should also check out the man page for logstalgia, as it has a surprising number of options that will keep you occupied for some time. The following example will run logstalgia in 1280 by 800-pixel resolution and replay the access_log at thirty times the original rate:
logstalgia -1280x800 -s 30 -u 5 /var/log/httpd/krazyworks.com/access_log

 

Print Friendly, PDF & Email

Leave a Reply