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.
Create an Elasticsearch Database
Use the aptible db:create
command to create a new Elasticsearch Database:
aptible db:create "$DB_HANDLE" --type elasticsearch
Tip
Add the
--disk-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 in our Running Kibana tutorial to deploy Kibana on Aptible.
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 in our Elasticsearch Log Rotation tutorial to do so.
Updated 5 months ago