Logstash
Logstash on Docker, configured with an HTTP listener.
Installation and Usage
To run as an app on Aptible:
-
Create an app on your Aptible Dashboard for Logstash. In the steps that follow, we'll use
YOUR_LOGSTASH_HANDLE
to refer to the handle you chose for your app. Make sure you substitute it for the actual handle accordingly! -
Use the Aptible CLI to configure Logstash. That's where you'll provide your Logstash filter and output configurations:
LOGSTASH_FILTER_CONFIG
is injected in thefilter { }
block (between the braces), andLOGSTASH_OUTPUT_CONFIG
is injected in theoutput { }
block (likewise). Refer to the Logstash documentation for more information. Just make sure you don't log to stdout or stderr, or you might end up sending Logstash its own logs for processing (would be very bad).
# Example configuration. Note that you MUST set DISABLE_WEAK_CIPHER_SUITES=true
aptible config:set --app YOUR_LOGSTASH_HANDLE \
LOGSTASH_FILTER_CONFIG='' \
LOGSTASH_OUTPUT_CONFIG='' \
FORCE_SSL=true \
DISABLE_WEAK_CIPHER_SUITES=true
- Clone this repository and push it to your Aptible app:
git clone https://github.com/aptible/docker-logstash.git
cd docker-logstash
git remote add aptible [email protected]:YOUR_LOGSTASH_HANDLE.git
git push aptible master
- Create a HTTPS endpoint for your app in Aptible. Make sure your certificate is valid if you intend to use this app as a HTTPS log drain.
Now, you'll probably want to start sending logs to your Logstash instance! To do so, jump to step 2 of "How do I setup a HTTPS log drain?".
Plugins
By default, this image includes a selection of common Logstash codec, filter,
and output plugins. If you need additional plugins, edit ./Gemfile
.
Available Tags
latest
: Currently Logstash 2.2.1
Tests
Tests are run as part of the Dockerfile
build. To execute them separately
within a container, run:
bats test
Deployment
To push the Docker image to Quay, run the following command:
make release
Copyright
MIT License, see LICENSE for details.
Copyright (c) 2019 Aptible. All rights reserved.