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

Commit

Permalink
feat(fluentd): add gelf plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wuvs committed May 17, 2017
1 parent cb38ca2 commit 560b73d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ This plugin allows for `fluentd` to send all log data to a sumologic endpoint. Y
* `SUMOLOGIC_PORT` : defaults to 80 (unless `IS_HTTPS` is set and then its 443)
* `IS_HTTPS`

### [fluent-plugin-gelf-hs](https://github.com/bodhi-space/fluent-plugin-gelf-hs)
This plugin allows for `fluentd` to send all log data to a remote graylog endpoint. You can configure it using the following environment variables:
* `GELF_HOST=some.host`
* `GELF_PORT=12201`
* `GELF_PROTOCOL="udp/tcp"`

### Deis Output
Deis output is a custom fluentd plugin that was written to forward data directly to deis components while filtering out data that we did not care about. We have 2 pieces of information we care about currently.

Expand Down
1 change: 1 addition & 0 deletions rootfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN buildDeps='g++ gcc make ruby-dev'; \
fluent-gem install --no-document fluent-plugin-elasticsearch -v 1.7.0 && \
fluent-gem install --no-document fluent-plugin-remote_syslog -v 0.3.2 && \
fluent-gem install --no-document fluent-plugin-sumologic-mattk42 -v 0.0.4 && \
fluent-gem install --no-document fluent-plugin-gelf-hs -v 1.0.2 && \
fluent-gem install --no-document influxdb -v 0.3.2 && \
fluent-gem install --no-document nsq-ruby -v 1.7.0 && \
fluent-gem install --local /opt/fluentd/deis-output/pkg/fluent-plugin-deis_output-0.1.0.gem && \
Expand Down
2 changes: 2 additions & 0 deletions rootfs/opt/fluentd/sbin/sources
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ cat << EOF >> $FLUENTD_CONF
@type tail
path /var/log/containers/*.log
pos_file /var/log/containers.log.pos
time_key time
time_format %Y-%m-%dT%H:%M:%S.%L%z
tag kubernetes.*
format json
read_from_head true
Expand Down
18 changes: 18 additions & 0 deletions rootfs/opt/fluentd/sbin/stores/gelf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [ -n "$GELF_HOST" ]
then
echo "Starting fluentd with gelf configuration!"
GELF_PORT=${GELF_PORT:-12201}
GELF_PROTOCOL=${GELF_PROTOCOL:-udp}


cat << EOF >> $FLUENTD_CONF
<store>
@type gelf
host ${GELF_HOST}
port ${GELF_PORT}
protocol ${GELF_PROTOCOL}
</store>
EOF
fi
1 change: 1 addition & 0 deletions rootfs/opt/fluentd/sbin/stores/stores
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ source /opt/fluentd/sbin/stores/elastic_search
source /opt/fluentd/sbin/stores/syslog
source /opt/fluentd/sbin/stores/sumologic
source /opt/fluentd/sbin/stores/custom_stores
source /opt/fluentd/sbin/stores/gelf

0 comments on commit 560b73d

Please sign in to comment.