OpenStack Controller Logs – view using a browser

OpenStack is made up of various services. These services have their own logs stored under /var/log directory. While working on OpenStack related projects it is quite common to monitor the logs for any problems or errors. While the tail command is the most popular, there are many benefits of using web browser to view the logs. In this blog let us see how we can view OpenStack Controller Logs using a browser.

Using a browser for OpenStack Controller Logs

We can easily use browser tabs to view multiple logs simultaneously. Searching a log file is lot more user friendly on a browser. The best part of this solution is that you do not need to install additional software. OpenStack controller requires Apache web server for several purposes. We will show how to leverage the same web server to stream the logs.

Configuring Apache

OpenStack uses Apache web server for different projects. We will leverage the same web server to display logs of different services.

  • Step 1 – The first step is to create a directory under /var/www/html. This directory will be used as part of the URL on the web browser. For example if you create a directory called openstacklogs, then point your web browser to – http://<horizon-controller-ip/openstacklogs

  • Step 2 – Give read and execute permissions to the log directories of OpenStack services. For example if you want to allow Nova and Neutron logs to be viewable using web browser, execute the steps below.

  • Step 3 – Create symlinks for these log directories as shown below.

These steps ensure that Apache is able to show the OpenStack Controller Logs as browsable content. You can now point your browser to http://<horizon-controller-ip>/openstacklogs. Here is screenshot of the same from my setup.

OpenStack Controller Logs using Web Browser