Kibana on Dokku
Deploy your own instance of Kibana on Dokku!
This setup is intended to be used as a syslog
container log visualiser,
using the LogTrail Kibana plugin.
To aggregate the logs, you can go with the full ELK stack by running Logstash side-by-side.
Notice
This project makes use of:
For compatibility reasons with dokku-elasticsearch
, deployed versions are:
- ElasticSearch: 7.2.0
- Kibana: 7.2.0
- LogTrail: 7.2.0-0.1.31
Setup
Requirements
Be sure to properly setup a Dokku instance.
The following Dokku plugins need to be installed:
App and database
- Create the
kibana
app:
dokku apps:create kibana
- Create the elasticsearch database (if not done yet for
logstash
):
export ELASTICSEARCH_IMAGE="elasticsearch"
export ELASTICSEARCH_IMAGE_VERSION="7.2.0"
dokku elasticsearch:create logstash
- Correct elasticsearch plugin defaults
Edit /var/lib/dokku/services/elasticsearch/logstash/config/elasticsearch.yml
and add the following lines, note that logstash
in the path would differ if you chose a different name.
node.name: node-1
cluster.initial_master_nodes:
- node-1
- Link elasticsearch to the app
dokku elasticsearch:link logstash kibana
Deploy
- Clone this repository:
git clone https://github.com/rclement/dokku-kibana.git
- Setup Dokku git remote (with your defined domain):
git remote add dokku dokku@example.com:kibana
- Push
kibana
:
git push dokku master
- Fix proxy ports:
dokku proxy:ports-add kibana http:80:5601
dokku proxy:ports-remove kibana http:5601:5601
Run
kibana
should be running at: http://kibana.example.com
Troubleshooting
Error while installing the LogTrail plugin
This error can happen during the LogTrail plugin installation:
The command '/bin/sh -c kibana-plugin install ...' returned a non-zero code: 137
This usually means there is not enough RAM allocated for the virtual machine where Dokku is installed. A minimum of 2GB is recommended.