Skip to content

Elasticsearch Kibana

Diego Luca Candido edited this page Jan 23, 2019 · 1 revision

Elasticsearch/Kibana @ Fbtrex

Following the implementation details on how to use/install Elasticsearch and Kibana at Fbtrex

The server host both a Kibana and an Elasticsearch server, both firewalled by nginx. Elasticsearch listen only on a private IP for seceurity concern.

   wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
   wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
   apt-get install apt-transport-https
   echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
   apt-get install openjdk-8-jre
   apt-get update && sudo apt-get install kibana elasticsearch
   systemctl start kibana
   systemctl start elasticsearch

Elasticsearch indexes are created through API calls made from a script in /support/elasticsearch All json file in /support/elasticsearch are indexes, initialize.js is the script to create the indexes.

To call initialize.js correctly the following syntax is used:

DEBUG=* support/elasticsearch/initialize.js --name semanticserv --server localhost:9200

Elasticsearch is enabled as default on Fbtrex and can be disabled passing an environment variable:

elastic=disabled

Fbtrex sends data to elasticsearch server through the library Echoes. Echoes supports multiple backend, at the moment only elasticsearch is supported.

Elaticsearch is already implemented inside the dockerfile, exactly Dockerfile.elastic You can run this with as a single docker or with docker-compose up command