Skip to content
This repository was archived by the owner on Feb 5, 2021. It is now read-only.

Commit a173a3f

Browse files
committed
Add support for forward input
In order to place the sumologic integration in a broader fluentd infrastructure, add support the forward protocol, allowing to aggregate logs from several external sources, send all in one place to sumologic.
1 parent e61bd62 commit a173a3f

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ ENV K8S_METADATA_FILTER_VERIFY_SSL "true"
5959
ENV K8S_METADATA_FILTER_BEARER_CACHE_SIZE "1000"
6060
ENV K8S_METADATA_FILTER_BEARER_CACHE_TTL "3600"
6161
ENV VERIFY_SSL "true"
62+
ENV FORWARD_INPUT_BIND "0.0.0.0"
63+
ENV FORWARD_INPUT_PORT "24224"
6264

6365
COPY --from=builder /var/lib/gems /var/lib/gems
6466

conf.d/forward/placeholder

Whitespace-only changes.

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if [ $# -gt 0 ] && [ "${1:0:1}" != "-" ]; then
44
else
55
cd `dirname $0`
66

7-
if [ $FLUENTD_SOURCE != file ] && [ $FLUENTD_SOURCE != systemd ]; then
7+
if ! ls /fluentd/etc/fluent.${FLUENTD_SOURCE}.conf > /dev/null; then
88
echo "Unknown source '$FLUENTD_SOURCE'"
99
if [ -e /dev/termination-log ]; then
1010
echo "Unknown source '$FLUENTD_SOURCE'" >/dev/termination-log

etc/fluent.forward.conf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## built-in TCP input
2+
## $ echo <json> | fluent-cat <tag>
3+
<source>
4+
@type forward
5+
@id forward_input
6+
port "#{ENV['FORWARD_INPUT_PORT']}"
7+
bind "#{ENV['FORWARD_INPUT_BIND']}"
8+
</source>
9+
10+
<source>
11+
@type monitor_agent
12+
bind 0.0.0.0
13+
port 24220
14+
</source>
15+
16+
@include /fluentd/conf.d/forward/source.*.conf
17+
@include /fluentd/conf.d/user/*.conf
18+
@include /fluentd/conf.d/out.sumo.conf

0 commit comments

Comments
 (0)