This repository was archived by the owner on Aug 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22FLUENTD_CONF=" /opt/fluentd/conf/fluentd.conf"
33
4+ if [ $INSTALL_BUILD_TOOLS == " true" ]
5+ then
6+ apt-get update
7+ apt-get install -y \
8+ g++ \
9+ gcc \
10+ make \
11+ ruby \
12+ ruby-dev
13+ fi
14+
15+ source /opt/fluentd/sbin/plugins
416source /opt/fluentd/sbin/sources
517source /opt/fluentd/sbin/filters/filters
618
@@ -15,4 +27,15 @@ cat << EOF >> $FLUENTD_CONF
1527</match>
1628EOF
1729
30+ if [ $INSTALL_BUILD_TOOLS == " true" ]
31+ then
32+ apt-get remove -y --auto-remove --purge \
33+ g++ \
34+ gcc \
35+ make \
36+ ruby-dev
37+ apt-get clean
38+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
39+ fi
40+
1841exec fluentd -c $FLUENTD_CONF
Original file line number Diff line number Diff line change 1+ FILTERS=$(env | grep -E '^(CUSTOM_FILTER_\d*)' | sed 's/=.*//')
2+
3+ for filter in $FILTERS
4+ do
5+ echo "Configuring $filter"
6+ conf=$(eval "echo \"\$$filter\"")
7+ if [ -n "$conf" ]
8+ then
9+ echo -e "\n# $filter" >> $FLUENTD_CONF
10+ echo "$conf" >> $FLUENTD_CONF
11+ fi
12+ done
Original file line number Diff line number Diff line change 11#! /bin/bash
22source /opt/fluentd/sbin/filters/kubernetes
3+ source /opt/fluentd/sbin/filters/custom_filters
Original file line number Diff line number Diff line change 1+ PLUGINS=$(env | grep -E '^(FLUENTD_PLUGIN_\d*)' | sed 's/=.*//')
2+ for plugin_var in $PLUGINS
3+ do
4+ plugin=$(eval "echo \$$plugin_var")
5+ if [ -n "$plugin" ]
6+ then
7+ echo "Installing fluentd plugin $plugin."
8+ fluent-gem install --no-document $plugin
9+ fi
10+ done
Original file line number Diff line number Diff line change 1+ STORES=$(env | grep -E '^(CUSTOM_STORE_\d*)' | sed 's/=.*//')
2+
3+ for store in $STORES
4+ do
5+ echo "Configuring $store"
6+ conf=$(eval "echo \"\$$store\"")
7+ if [ -n "$conf" ]
8+ then
9+ echo -e "\n# $store" >> $FLUENTD_CONF
10+ echo "$conf" >> $FLUENTD_CONF
11+ fi
12+ done
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ source /opt/fluentd/sbin/stores/deis
44source /opt/fluentd/sbin/stores/elastic_search
55source /opt/fluentd/sbin/stores/syslog
66source /opt/fluentd/sbin/stores/sumologic
7+ source /opt/fluentd/sbin/stores/custom_stores
You can’t perform that action at this time.
0 commit comments