1
0
mirror of https://github.com/krislamo/graylog_demo synced 2025-10-23 05:18:34 +00:00

Secure forward to td-agent on Graylog server

This commit is contained in:
2020-03-23 16:14:43 -04:00
parent eac9696e19
commit 9815a86386
4 changed files with 49 additions and 20 deletions

16
Vagrantfile vendored
View File

@@ -49,12 +49,8 @@ Vagrant.configure("2") do |config|
cp /vagrant/td-agent.repo /etc/yum.repos.d/
yum check-update
yum install -y td-agent
td-agent-gem install fluent-plugin-secure-forward
td-agent-gem install fluent-plugin-gelf-hs gelf
cp /vagrant/td-agent.conf /etc/td-agent/td-agent.conf
mkdir -p /var/log/containers
chown -R td-agent:td-agent /var/log/containers
chmod -R 755 /var/log
systemctl restart td-agent
systemctl -q enable td-agent
SHELL
@@ -66,6 +62,9 @@ Vagrant.configure("2") do |config|
if server == "graylog"
node.vm.provision "shell", inline: <<-SHELL
cp /vagrant/td-agent-server.conf /etc/td-agent/td-agent.conf
systemctl restart td-agent
# Install jq
yum install -y epel-release
yum install -y jq
@@ -144,6 +143,13 @@ Vagrant.configure("2") do |config|
systemctl restart rsyslog
fi
# Configure td-agent
cp /vagrant/td-agent.conf /etc/td-agent/td-agent.conf
mkdir -p /var/log/containers
chown -R td-agent:td-agent /var/log/containers
chmod -R 755 /var/log
systemctl restart td-agent
# Bring up WordPress test containers
cd /vagrant/wordpress
/usr/local/bin/docker-compose up -d 2> /dev/null