Elasticsearch & Kibana on Ubuntu

For one of my personal projects I’ve been looking at Elasticsearch and Kibana for indexing and visualizing data generated by a wireless sensor node network, without restricting myself in future expansion of possible data sources or types.

Elasticsearch is a flexible and powerful open source, distributed, real-time search and analytics engine. It gives you the ability to move easily beyond simple full-text search. Through its robust set of APIs and query DSLs, plus clients for the most popular programming languages, Elasticsearch delivers on the near limitless promises of search technology.

Kibana is Elasticsearch’s data visualization engine, allowing you to natively interact with all your data in Elasticsearch via custom dashboards. Kibana’s dynamic dashboard panels are savable, shareable and exportable, displaying changes to queries into Elasticsearch in real-time. You can perform data analysis in Kibana’s beautiful user interface using pre-designed dashboards or update these dashboards in real-time for on-the-fly data analysis.

Well, that all sounds very promising, but how do you get this installed & running on Ubuntu (again, I use Xubuntu but it will be very similar)? First install Elasticsearch using the repository:

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

sudo add-apt-repository "deb http://packages.elasticsearch.org/elasticsearch/1.4/debian stable main"

sudo apt-get update && sudo apt-get install elasticsearch

sudo update-rc.d elasticsearch defaults 95 10

Then check if you have java installed:

java -version

If this returns something above or equal to 1.7 you’re all set, however if this is not the case you’ll need to install Java:

sudo apt-get install openjdk-7-jre-headless -y

Now configure Elasticsearch by running:

sudo sed -i -e 's|# cluster.name: elasticsearch|cluster.name: kibana|' /etc/elasticsearch/elasticsearch.yml

sudo service elasticsearch restart

Okay, Elasticsearch should be all set now, let’s move on to installing Kibana 4. Kibana as of version 4 comes with it’s own server so no need to install Apache first in order to run this. Just grab the zip, extract it:

sudo tar -C /opt-zxvf kibana-4.0.0-linux-x64.tar.gz

sudo chown {YOUR_USERNAME} -R /opt/kibana-4.0.0-linux-x64

Open config/kibana.yml in an editor and update the elasticsearch_url to point at your Elasticsearch instance (in our case we don’t have to do anything since it’s the same machine). Now you can start Kibana with:


Head over to http://localhost:5601 to see your new Kibana instance in full glory & set it up!

Leave a Reply