From 163f140726c502dec28bae416ca40bd9b71a9b04 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Tue, 25 Feb 2020 15:44:12 -0500 Subject: [PATCH] Install Fluentd's input during initial provision --- GELFUDPInput.json | 14 ++++++++++++++ Vagrantfile | 9 +++++++++ 2 files changed, 23 insertions(+) create mode 100644 GELFUDPInput.json diff --git a/GELFUDPInput.json b/GELFUDPInput.json new file mode 100644 index 0000000..63340cb --- /dev/null +++ b/GELFUDPInput.json @@ -0,0 +1,14 @@ +{ + "title": "Fluentd", + "type": "org.graylog2.inputs.gelf.udp.GELFUDPInput", + "global": true, + "configuration": { + "bind_address": "0.0.0.0", + "decompress_size_limit": 8388608, + "recv_buffer_size": 1048576, + "number_worker_threads": 4, + "port": 12201, + "recv_buffer_size": 262144 + }, + "node": null +} diff --git a/Vagrantfile b/Vagrantfile index 2304c55..f5e1a04 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -60,6 +60,15 @@ Vagrant.configure("2") do |config| /usr/local/bin/docker-compose up -d 2> /dev/null cd /vagrant/wordpress /usr/local/bin/docker-compose up -d 2> /dev/null + echo "Waiting 60 seconds for Graylog to become available..." + sleep 60 + cd /vagrant + curl -i -X POST \ + -H "Content-Type: application/json" \ + -H "X-Requested-By: cli" \ + -u admin:admin \ + "http://graylog.172.28.128.30.xip.io:8080/api/system/inputs" \ + -d @GELFUDPInput.json SHELL end