HOWTO: Installing Kibana

HOWTO: Installing Kibana

Kibana is a visualization of the data source platform that allows you to interact with your data through a stunning, powerful graphics, which can be combined into custom panels that help you easily analyze your data.

In this post we'll show you how to use Kibana to install and start working with the data.

In the first half of this article we will describe the process of installing the required components. In the second half you will learn how 10 minutes to visualize the data on the example of the complete works of Shakespeare: histograms, pie charts, etc.

Before you get started, we need to install tools such as Java, Elasticsearch and Kibana.

Elasticsearch require Java, so we will install that now. Add the Oracle Java PPA to apt, update apt package database and install the latest stable version of Oracle Java 8:

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer

Install Elasticsearch

Elasticsearch can be installed with a package manager by adding Elastic's package source list. Run the following command to import the Elasticsearch public GPG key into apt:

wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Create the Elasticsearch source list:

echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list

Update your apt package database:

sudo apt-get update

Install Elasticsearch with this command:

sudo apt-get -y install elasticsearch

Elasticsearch is now installed. Let's edit the configuration:

sudo nano /etc/elasticsearch/elasticsearch.yml

You will want to restrict outside access to your Elasticsearch instance (port 9200), so outsiders can't read your data or shutdown your Elasticsearch cluster through the HTTP API. Find the line that specifies network.host, uncomment it, and replace its value with "localhost" so it looks like this:

network.host: localhost

Now start Elasticsearch:

sudo service elasticsearch restart

Then run the following command to start Elasticsearch on boot up:

sudo update-rc.d elasticsearch defaults 95 10

Install Kibana

Before installing Kibana, let's set up a kibana user and group, which will own and run Kibana:

sudo groupadd -g 999 kibana
sudo useradd -u 999 -g 999 kibana

If those commands fail because the 999 GID or UID already exist, replace the number with IDs that are free.

Download and extract Kibana 4 archive to your home directory with the following command:

cd ~
wget https://download.elastic.co/kibana/kibana/kibana-4.3.0-linux-x64.tar.gz
tar xvf kibana-*.tar.gz

Let's copy the Kibana files to a more appropriate location.

sudo mkdir -p /opt/kibana
sudo cp -R ~/kibana-4*/* /opt/kibana/
sudo chown -R kibana: /opt/kibana

Kibana can be started by running:

bash /opt/kibana/bin/kibana

But if you want it to run as a service download a Kibana init script, enable the Kibana service, and start it:

cd /etc/init.d && sudo curl -o kibana https://gist.githubusercontent.com/thisismitch/8b15ac909aed214ad04a/raw/fc5025c3fc499ad8262aff34ba7fde8c87ead7c0/kibana-4.x-init
cd /etc/default && sudo curl -o kibana https://gist.githubusercontent.com/thisismitch/8b15ac909aed214ad04a/raw/fc5025c3fc499ad8262aff34ba7fde8c87ead7c0/kibana-4.x-default
sudo chmod +x /etc/init.d/kibana
sudo update-rc.d kibana defaults 96 9
sudo service kibana start

To access the interface Kiba enter into your browser http://localhost: 5601/. If you did everything correctly, you should see this page.

kibana

Part 2: Visualization

Comments 0

Add a new comment: