From bf2d4ebb33b3dd34bad7a17fd0f6daf5b3ce2552 Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Tue, 14 Oct 2014 22:13:34 -0700 Subject: [PATCH] Supply command line args to td-agent --- contrib/logging/fluentd-es-image/run.sh | 6 +++--- contrib/logging/fluentd-es-image/td-agent.conf | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/logging/fluentd-es-image/run.sh b/contrib/logging/fluentd-es-image/run.sh index cfe22a49f7c..084e63c2681 100755 --- a/contrib/logging/fluentd-es-image/run.sh +++ b/contrib/logging/fluentd-es-image/run.sh @@ -24,6 +24,6 @@ OUTER_HOST=`tail -n 1 /outerhost | awk '{print $3}'` # 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 +# 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 37978586dd4..08f7cf5cd71 100644 --- a/contrib/logging/fluentd-es-image/td-agent.conf +++ b/contrib/logging/fluentd-es-image/td-agent.conf @@ -1,7 +1,7 @@ # This configuration file for Fluentd / td-agent is used # to watch changes to Docker log files that live in the # directory /var/lib/docker/containers/ which are then submitted to -# Elasticsearch (running on the machine ES_HOST:9200) which +# Elasticsearch (running on the machine %ES_HOST%:9200) which # assumes the installation of the fluentd-elasticsearch plug-in. # See https://github.com/uken/fluent-plugin-elasticsearch for # more information about the plug-in. This file needs to be @@ -46,7 +46,7 @@ type elasticsearch log_level info include_tag_key true - host ES_HOST + host %ES_HOST% port 9200 logstash_format true flush_interval 5s