Last active
January 15, 2021 18:00
-
-
Save harabchuk/abd53d1e80168e2d94f58eb0f75aa4f7 to your computer and use it in GitHub Desktop.
Fluentd GELF forwarder
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 | |
docker build -t fluentd-gelf-forwarder . |
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
FROM fluent/fluentd:v1.12-debian-1 | |
LABEL Description="Fluentd GELF forwarder" | |
USER root | |
RUN gem install fluent-plugin-input-gelf \ | |
&& gem install fluent-plugin-gelf-hs \ | |
&& gem sources --clear-all | |
COPY ./fluentd.conf /fluentd/etc/ | |
ENV FLUENTD_CONF=fluentd.conf | |
USER fluent | |
EXPOSE 12201 | |
EXPOSE 12201/udp |
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
<source> | |
@type gelf | |
tag faas | |
bind 0.0.0.0 | |
port 12201 | |
protocol_type udp | |
</source> | |
<match **> | |
@type copy | |
<store> | |
@type gelf | |
host your-graylog-host.com | |
port 12201 | |
protocol tcp | |
flush_interval 5s | |
max_retry_wait 30 | |
num_threads 4 | |
</store> | |
<store> | |
@type stdout | |
</store> | |
</match> |
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 | |
docker run -p 12201:12201/udp -ti fluentd-gelf-forwarder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment