mirror of
https://github.com/krislamo/graylog_demo
synced 2024-11-09 21:50:35 +00:00
Add fault-tolerant file buffers for logs
This commit is contained in:
parent
b4e33f4b41
commit
86fcc23047
6
Vagrantfile
vendored
6
Vagrantfile
vendored
@ -88,6 +88,8 @@ Vagrant.configure("2") do |config|
|
|||||||
node.vm.provision "shell", inline: <<-SHELL
|
node.vm.provision "shell", inline: <<-SHELL
|
||||||
|
|
||||||
cp /vagrant/td-agent-server.conf /etc/td-agent/td-agent.conf
|
cp /vagrant/td-agent-server.conf /etc/td-agent/td-agent.conf
|
||||||
|
mkdir -p /var/log/graylog_buffer
|
||||||
|
chown -R td-agent:td-agent /var/log/graylog_buffer
|
||||||
systemctl restart td-agent
|
systemctl restart td-agent
|
||||||
|
|
||||||
# Install jq
|
# Install jq
|
||||||
@ -159,8 +161,8 @@ Vagrant.configure("2") do |config|
|
|||||||
|
|
||||||
# Configure td-agent
|
# Configure td-agent
|
||||||
cp /vagrant/td-agent.conf /etc/td-agent/td-agent.conf
|
cp /vagrant/td-agent.conf /etc/td-agent/td-agent.conf
|
||||||
mkdir -p /var/log/containers
|
mkdir -p /var/log/containers /var/log/fluentd_buffer
|
||||||
chown -R td-agent:td-agent /var/log/containers
|
chown -R td-agent:td-agent /var/log/containers /var/log/fluentd_buffer
|
||||||
chmod -R 755 /var/log
|
chmod -R 755 /var/log
|
||||||
systemctl restart td-agent
|
systemctl restart td-agent
|
||||||
|
|
||||||
|
@ -34,5 +34,9 @@
|
|||||||
protocol tcp
|
protocol tcp
|
||||||
host localhost
|
host localhost
|
||||||
port 12201
|
port 12201
|
||||||
flush_interval 5s
|
<buffer>
|
||||||
|
@type file
|
||||||
|
path /var/log/graylog_buffer
|
||||||
|
flush_interval 0s
|
||||||
|
</buffer>
|
||||||
</match>
|
</match>
|
||||||
|
@ -54,4 +54,9 @@
|
|||||||
host 172.28.128.30
|
host 172.28.128.30
|
||||||
port 2514
|
port 2514
|
||||||
</server>
|
</server>
|
||||||
|
<buffer>
|
||||||
|
@type file
|
||||||
|
path /var/log/fluentd_buffer
|
||||||
|
flush_interval 0s
|
||||||
|
</buffer>
|
||||||
</match>
|
</match>
|
||||||
|
Loading…
Reference in New Issue
Block a user