This repository was archived by the owner on May 6, 2020. It is now read-only.
Commit c1b360e H0rla
committed
1 parent 2229d0c commit c1b360e Copy full SHA for c1b360e
File tree 3 files changed +29
-4
lines changed
3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,12 @@ This plugin allows for `fluentd` to send all log data to a remote graylog endpoi
87
87
* ` GELF_HOST=some.host `
88
88
* ` GELF_PORT=12201 `
89
89
* ` GELF_PROTOCOL="udp/tcp" `
90
+ * ` GELF_TLS="true/false" `
91
+ * ` GELF_TLS_OPTIONS_CERT="-----BEGIN CERTIFICATE-----\n[...]\n-----END CERTIFICATE-----" `
92
+ * ` GELF_TLS_OPTIONS_KEY="-----BEGIN PRIVATE KEY-----\n[...]\n-----END PRIVATE KEY-----" `
93
+ * ` GELF_TLS_OPTIONS_ALL_CIPHERS="true/false" `
94
+ * ` GELF_TLS_OPTIONS_TLS_VERSION=":TLSv1/:TLSv1_1/:TLSv1_2" `
95
+ * ` GELF_TLS_OPTIONS_NO_DEFAULT_CA="true/false" `
90
96
91
97
### Deis Output
92
98
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.
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ RUN buildDeps='g++ gcc make ruby-dev'; \
16
16
fluent-gem install --no-document fluent-plugin-elasticsearch -v 1.7.0 && \
17
17
fluent-gem install --no-document fluent-plugin-remote_syslog -v 0.3.2 && \
18
18
fluent-gem install --no-document fluent-plugin-sumologic-mattk42 -v 0.0.4 && \
19
- fluent-gem install --no-document fluent-plugin-gelf-hs -v 1.0.2 && \
19
+ fluent-gem install --no-document fluent-plugin-gelf-hs -v 1.0.4 && \
20
20
fluent-gem install --no-document influxdb -v 0.3.2 && \
21
21
fluent-gem install --no-document nsq-ruby -v 1.7.0 && \
22
22
fluent-gem install --local /opt/fluentd/deis-output/pkg/fluent-plugin-deis_output-0.1.0.gem && \
Original file line number Diff line number Diff line change 5
5
echo " Starting fluentd with gelf configuration!"
6
6
GELF_PORT=${GELF_PORT:- 12201}
7
7
GELF_PROTOCOL=${GELF_PROTOCOL:- udp}
8
+ GELF_TLS=${GELF_TLS:- false}
9
+ GELF_TLS_OPTIONS_TLS_VERSION=${GELF_TLS_OPTIONS_TLS_VERSION:- " :TLSv1_2" }
10
+ GELF_TLS_OPTIONS_NO_DEFAULT_CA=${GELF_TLS_OPTIONS_NO_DEFAULT_CA:- false}
11
+ GELF_TLS_OPTIONS_ALL_CIPHERS=${GELF_TLS_OPTIONS_ALL_CIPHERS:- false}
8
12
13
+ if [ " $GELF_TLS " == true ] && (! [ -n " $GELF_TLS_OPTIONS_CERT " ] || ! [ -n " $GELF_TLS_OPTIONS_KEY " ])
14
+ then
15
+ echo " error: GELF_TLS_OPTIONS_{KEY,CERT} must be both provided"
16
+ elif [ " $GELF_TLS " == true ]
17
+ then
18
+ declare -a arr=(" cert" " key" " no_default_ca" " all_ciphers" " tls_version" )
19
+ TLS_OPTIONS=" "
20
+ for element in " ${arr[@]} "
21
+ do
22
+ tmp=" GELF_TLS_OPTIONS_${element^^} "
23
+ TLS_OPTIONS+=' "' $element ' ":"' ${! tmp} ' ",'
24
+ done
25
+ fi
9
26
10
- cat << EOF >> $FLUENTD_CONF
27
+ cat << EOF >> $FLUENTD_CONF
11
28
<store>
12
29
@type gelf
13
- host ${GELF_HOST}
30
+ host ' ${GELF_HOST} '
14
31
port ${GELF_PORT}
15
- protocol ${GELF_PROTOCOL}
32
+ protocol '${GELF_PROTOCOL} '
33
+ tls ${GELF_TLS}
34
+ tls_options '{$( [ " ${GELF_TLS} " == true ] && echo " ${TLS_OPTIONS::- 1} " ) }'
16
35
</store>
17
36
EOF
18
37
fi
You can’t perform that action at this time.
0 commit comments