Wednesday, February 6, 2013

Installing Kibana under Passenger for Apache in Ubuntu 12.04

Kibana is a very nice frontend for Logstash gathered logs sent to ElasticSearch. It's likely to be merged with Logstash at some point, but at the moment it's installed on its own.

Kibana now conforms to Rack conventions, which makes it easy to deploy using Passenger. At the time of writing the downloadable zip file (v0.2.0) does not, so you need to download it from Github.

Install dependencies:
apt-get install libapache2-mod-passenger apache2 ruby ruby1.8-dev libopenssl-ruby rubygems git -y
Get Kibana and rubygems needed
cd /var/www
git clone --branch=kibana-ruby https://github.com/rashidkpc/Kibana.git --depth=1 kibana
cd kibana
gem install bundle
bundle install
Set up a virtualhost for Apache:
<VirtualHost *:80>
    ServerName kibana
    DocumentRoot /var/www/kibana/public
    <Directory /var/www/kibana/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>
Then just restart apache, and browse to your newly installed Kibana!
Notes:
Elasticsearch server is set to localhost:9200 by default. If this is not the case, configuration is found in /var/www/KibanaConfig.rb

3 comments:

  1. I tried following the second set of steps and got the following error message when issuing the command "gem install bundle":

    File not found: lib

    Is this likely to cause problems? Do you have an idea on how to solve this?

    ReplyDelete
    Replies
    1. Edit your ~/.gemrc and add

      gem: --no-rdoc --no-ri

      to the file. After that retry gem install bundle

      Delete
  2. Hello, Thanks for the great contribution, now I have installed the logstash-elasticsearch and kibana on the centralized server, but I don't have any idea of what I will run on clients that need to send logs to the server. I am running ubuntu 12.4 on a cloud env. thank you

    ReplyDelete