Created
August 2, 2022 13:24
-
-
Save hartfordfive/50f5bd735a8b16882b2f3e5cd2de7efd to your computer and use it in GitHub Desktop.
Create logstash offline plugin pack via a docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
logstash_version=8.1.3 | |
logstash_plugin_release=1 | |
logstash_plugin_pack_dir=/tmp/logstash | |
logstash_image=docker.elastic.co/logstash/logstash:${logstash_version} | |
logstash_input_plugin=$(echo ' | |
logstash-input-beats | |
logstash-integration-kafka | |
' | xargs) | |
logstash_filter_plugin=$(echo ' | |
logstash-filter-dissect | |
logstash-filter-json | |
logstash-filter-grok | |
' | xargs) | |
logstash_output_plugin=$(echo ' | |
logstash-output-elasticsearch | |
logstash-output-exec | |
' | xargs) | |
echo " | |
mkdir ${logstash_plugin_pack_dir} | |
bin/logstash-plugin install ${logstash_input_plugin} | |
bin/logstash-plugin install ${logstash_filter_plugin} | |
bin/logstash-plugin install ${logstash_output_plugin} | |
bin/logstash-plugin prepare-offline-pack --output /srv/logstash/logstash-plugins-${logstash_version}-${logstash_plugin_release}.zip \ | |
${logstash_input_plugin} ${logstash_filter_plugin} ${logstash_output_plugin} | |
" | docker run --log-level=${log_level} -i -v $(pwd):${logstash_plugin_pack_dir} --rm ${logstash_image} /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment