Skip to content

Instantly share code, notes, and snippets.

@luhn
Last active June 11, 2019 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luhn/af36a17b46a3eb7640ccb7c5bacea9bc to your computer and use it in GitHub Desktop.
Save luhn/af36a17b46a3eb7640ccb7c5bacea9bc to your computer and use it in GitHub Desktop.
Fluentd Keepalive Bug
version: "3.7"
services:
src:
build:
context: .
dockerfile: src.Dockerfile
dst:
build:
context: .
dockerfile: dst.Dockerfile
container_name: dst
<source>
@type forward
port 24224
bind 0.0.0.0
<security>
self_hostname host2
shared_key mysecret
</security>
</source>
<match **>
@type stdout
</match>
FROM fluent/fluentd:v1.5-debian
COPY dst.conf /fluentd/etc/fluent.conf
<source>
@type exec
tag system.loadavg
command cat /proc/loadavg | cut -d ' ' -f 1,2,3
run_interval 5s
<parse>
@type tsv
keys avg1,avg5,avg15
delimiter " "
</parse>
</source>
<match **>
@type forward
keepalive true
<server>
host dst
port 24224
</server>
<security>
self_hostname host1
shared_key mysecret
</security>
<buffer>
flush_interval 5s
total_limit_size 64m
</buffer>
</match>
FROM fluent/fluentd:v1.5-debian
COPY src.conf /fluentd/etc/fluent.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment