Skip to content
This repository was archived by the owner on Aug 17, 2023. It is now read-only.

Commit b59bbbc

Browse files
committed
feat(fluentd): Adding sumologic plugin support
1 parent 0c5dc21 commit b59bbbc

3 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/stores/stores

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
source /opt/fluentd/sbin/stores/deis
44
source /opt/fluentd/sbin/stores/elastic_search
55
source /opt/fluentd/sbin/stores/syslog
6+
source /opt/fluentd/sbin/stores/sumologic
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
if [ -n "$SUMOLOGIC_COLLECTOR_URL" ]
2+
then
3+
IS_HTTPS=`echo "$SUMOLOGIC_COLLECTOR_URL" | grep -c 'https://'`
4+
SUMOLOGIC_HOST=`echo "$SUMOLOGIC_COLLECTOR_URL" | sed 's/https*:\/\///' | cut -d '/' -f 1`
5+
SUMOLOGIC_ENDPOINT=`echo "$SUMOLOGIC_COLLECTOR_URL" | sed "s/.*:\/\/$SUMOLOGIC_HOST//"`
6+
7+
SUMOLOGIC_PORT=443
8+
if [ $IS_HTTPS != 1 ]
9+
then
10+
SUMOLOGIC_PORT=80
11+
fi
12+
13+
cat << EOF >> $FLUENTD_CONF
14+
<store>
15+
buffer_type file
16+
buffer_path /var/log/fluent/logcentral
17+
type sumologic
18+
host $SUMOLOGIC_HOST
19+
port $SUMOLOGIC_PORT
20+
format json
21+
path $SUMOLOGIC_ENDPOINT
22+
</store>
23+
EOF
24+
fi

0 commit comments

Comments
 (0)