diff --git a/contrib/logging/fluentd-es-image/build.sh b/contrib/logging/fluentd-es-image/build.sh index ae19afa0a0..560583ce85 100755 --- a/contrib/logging/fluentd-es-image/build.sh +++ b/contrib/logging/fluentd-es-image/build.sh @@ -16,7 +16,7 @@ # Build the fluentd-elasticsearch image and push -# to google/fluentd-elasticsearch. +# to kubernetes/fluentd-elasticsearch. sudo docker build -t kubernetes/fluentd-elasticsearch . sudo docker push kubernetes/fluentd-elasticsearch diff --git a/contrib/logging/fluentd-es-image/run.sh b/contrib/logging/fluentd-es-image/run.sh index 17e680afa4..cfe22a49f7 100755 --- a/contrib/logging/fluentd-es-image/run.sh +++ b/contrib/logging/fluentd-es-image/run.sh @@ -20,8 +20,10 @@ # service IPs are done. OUTER_HOST=`tail -n 1 /outerhost | awk '{print $3}'` -# Copy the Fluentd config file and patch it to refer to the -# name of the host machine for ES_HOST. HACK! -cp td-agent.conf /etc/td-agent +# WARNING! HORRIBLE HACK! We expect /outerhost to be mapped to +# the enclosing /etc/host file so we can determine the name of +# the host machine (super fragile). This is a temporary hack until +# service IPs are done. +# Adjust the name of the host machine for ES_HOST. HACK! sed -i -e "s/ES_HOST/${OUTER_HOST}/" /etc/td-agent/td-agent.conf /usr/sbin/td-agent diff --git a/contrib/logging/fluentd-es-image/td-agent.conf b/contrib/logging/fluentd-es-image/td-agent.conf index 08bb16b930..37978586dd 100644 --- a/contrib/logging/fluentd-es-image/td-agent.conf +++ b/contrib/logging/fluentd-es-image/td-agent.conf @@ -39,10 +39,10 @@ time_key time path /var/lib/docker/containers/*/*-json.log time_format %Y-%m-%dT%H:%M:%S - tag docker.container.all + tag docker.container.* - + type elasticsearch log_level info include_tag_key true