Analyzing Webserver logs with Logstalgia — LinuxTechLab
There are many tools available to analyze the web server logs but none is as interesting as logstalgia. Logstalgia is a real-time website visualization tool that analyzes the web server logs & presents them in a manner that server logs appear like they are playing ping-pong.
Requests appear as colored balls (the same color as the host) which travel across the screen to arrive at the requested location. Successful requests are hit by the paddle while unsuccessful ones (eg 404 — File Not Found) are missed and pass through.
The paths of requests are summarized within the available space by identifying common path prefixes. Related paths are grouped together under headings. For instance, by default paths ending in png, gif or jpg are grouped under the heading Images. Paths that don’t match any of the specified groups are lumped together under a Miscellaneous section.
Logstalgia requires a video card with OpenGL support to analyze the web server logs & than visualize them. In this tutorial, we will learn to install logstalgia on a Ubuntu machine.
Installation on Ubuntu
We can easily install logstalgia with apt-get command, i.e.,
But the installed package might not be the latest one (which at the time of writing is 1.10 for Linux machines). So we will be using the latest tar package & install the package from source but before we do that we need to install some package dependencies.
Install on other Linux OS
Run the following command from your terminal to install the required dependencies on your Ubuntu machines (If installing on other OS than Ubuntu, install the equivalent dependencies),
Once installed, we will download the latest tar package on our system with the following command,
Now extract the package & enter into the folder,
Next , we will compile the package & install it with the following command,
Analyzing webserver logs
If you have installed the logstalgia on the same system as the webserver, then we only need to run logstalgia command along with the location of web server access logs to start analyzing webserver logs. Execute the following command from the terminal,
Or we can also monitor the logs with tail command & provide it as in STDIN for logstalgia,
If you have installed logstalgia on a separate machine than webserver & want to analyze the web server logs with logstalagia from that machine, then we need to login to web server from the remote machine. Run the following command to connect to web server & start analyzing the web server logs,
$ ssh [email protected] tail -f /var/log/httpd/access.log | losgtaligia — — sync
is the user name along with the webserver (webserver.linuxtechlab.com). This was our tutorial on how to analyze web server logs with Logstalgia in Real-time. With this we end our tutorial, please do send in your questions & queries using the comment box below.
If you think we have helped you or just want to support us, please consider these:-
Donate us some of your hard-earned money:
Linux TechLab is thankful for your continued support.
Originally published at https://linuxtechlab.com on December 31, 2019.