Supply command line args to td-agent

This commit is contained in:
Satnam Singh 2014-10-14 22:13:34 -07:00 committed by Satnam Singh
parent 3f52a97052
commit bf2d4ebb33
2 changed files with 5 additions and 5 deletions

View File

@ -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 $@

View File

@ -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