Logstash on Docker, configured with an HTTP listener.
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_HANDLEto 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_CONFIGis injected in thefilter { }block (between the braces), andLOGSTASH_OUTPUT_CONFIGis 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 git@beta.aptible.com: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?".
By default, this image includes a selection of common Logstash codec, filter,
and output plugins. If you need additional plugins, edit ./Gemfile.
latest: Currently Logstash 2.2.1
Tests are run as part of the Dockerfile build. To execute them separately
within a container, run:
bats test
To push the Docker image to Quay, run the following command:
make release
MIT License, see LICENSE for details.
Copyright (c) 2016 Aptible. All rights reserved.