Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Commit 200df17

Browse files
committed
Adding sumologic plugin support
1 parent 2ab194a commit 200df17

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

rootfs/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN apt-get update \
1717
&& fluent-gem install --no-document fluent-plugin-kubernetes_metadata_filter \
1818
&& fluent-gem install --no-document fluent-plugin-elasticsearch \
1919
&& fluent-gem install --no-document fluent-plugin-remote_syslog -v 0.3.2 \
20+
&& fluent-gem install --no-document fluent-plugin-sumologic-mattk42 \
2021
&& fluent-gem install --no-document influxdb -v 0.3.2 \
2122
&& fluent-gem install --no-document nsq-ruby \
2223
&& fluent-gem install --local /opt/fluentd/deis-output/pkg/fluent-plugin-deis_output-0.1.0.gem \

rootfs/opt/fluentd/sbin/boot

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,31 @@ cat << EOF >> $FLUENTD_CONF
198198
EOF
199199
fi
200200

201+
if [ -n "$SUMOLOGIC_COLLECTOR_URL" ]
202+
then
203+
IS_HTTPS=`echo "$SUMOLOGIC_COLLECTOR_URL" | grep -c 'https://'`
204+
SUMOLOGIC_HOST=`echo "$SUMOLOGIC_COLLECTOR_URL" | sed 's/https*:\/\///' | cut -d '/' -f 1`
205+
SUMOLOGIC_ENDPOINT=`echo "$SUMOLOGIC_COLLECTOR_URL" | sed "s/.*:\/\/$SUMOLOGIC_HOST//"`
206+
207+
SUMOLOGIC_PORT=443
208+
if [ $IS_HTTPS != 1 ]
209+
then
210+
SUMOLOGIC_PORT=80
211+
fi
212+
213+
cat << EOF >> $FLUENTD_CONF
214+
<store>
215+
buffer_type file
216+
buffer_path /var/log/fluent/logcentral
217+
type sumologic
218+
host $SUMOLOGIC_HOST
219+
port $SUMOLOGIC_PORT
220+
format json
221+
path $SUMOLOGIC_ENDPOINT
222+
</store>
223+
EOF
224+
fi
225+
201226
cat << EOF >> $FLUENTD_CONF
202227
<store>
203228
@type deis

0 commit comments

Comments
 (0)