Setting up a self-hosted ELK Stack

This tutorial will walk you through setting up a self-hosted Elasticsearch - Logstash - Kibana (ELK) stack on Aptible Deploy.

Create an Elasticsearch Database

Use the aptible db:create command to create a new Elasticsearch Database:

aptible db:create "$DB_HANDLE" --type elasticsearch


Add the --size X option to provision a larger-than-default Database.

Set up a Log Drain

In the Dashboard, create a new Log Drain:

Then, select Elasticsearch as the destination

Finally, save the Log Drain:

Set up Kibana

Kibana is an open source, browser-based analytics and search dashboard for Elasticsearch.

Follow the instructions at aptible/docker-kibana to deploy Kibana on Aptible Deploy.

Set up Log Rotation

If you let logs accumulate in Elasticsearch, you’ll need more and more RAM and disk space to store them. To avoid this, set up log archiving.

We recommend archiving logs to S3. Follow the instructions at aptible/elasticsearch-logstash-s3-backup to do so.