diff --git a/cluster/saltbase/salt/fluentd-es/fluentd-es.manifest b/cluster/saltbase/salt/fluentd-es/fluentd-es.manifest index 8f52e230b4..7a2cc148f8 100644 --- a/cluster/saltbase/salt/fluentd-es/fluentd-es.manifest +++ b/cluster/saltbase/salt/fluentd-es/fluentd-es.manifest @@ -6,9 +6,6 @@ containers: volumeMounts: - name: containers mountPath: /var/lib/docker/containers - - name: hosts - mountPath: /outerhost - readOnly: true - name: varlog mountPath: /varlog volumes: @@ -20,7 +17,3 @@ volumes: source: hostDir: path: /var/log - - name: hosts - source: - hostDir: - path: /etc/hosts diff --git a/contrib/logging/fluentd-es-image/Dockerfile b/contrib/logging/fluentd-es-image/Dockerfile index e4481a95c2..6bd50d7d7f 100644 --- a/contrib/logging/fluentd-es-image/Dockerfile +++ b/contrib/logging/fluentd-es-image/Dockerfile @@ -33,10 +33,5 @@ RUN /usr/sbin/td-agent-gem install fluent-plugin-elasticsearch # Copy the Fluentd configuration file. COPY td-agent.conf /etc/td-agent/td-agent.conf -# Copy a script that determines the name of the host machine -# and then patch the Fluentd configuration files and then -# run Fluentd in the foreground. -ADD run.sh /run.sh - -# Always run the this setup script. -ENTRYPOINT ["/run.sh"] +# Run the Fluentd service. +CMD /usr/sbin/td-agent -qq > /var/log/td-agent/td-agent.log diff --git a/contrib/logging/fluentd-es-image/run.sh b/contrib/logging/fluentd-es-image/run.sh deleted file mode 100755 index f933f38496..0000000000 --- a/contrib/logging/fluentd-es-image/run.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright 2014 Google Inc. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# 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. -OUTER_HOST=`tail -n 1 /outerhost | awk '{print $3}'` - -# 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 -qq "$@" diff --git a/contrib/logging/fluentd-es-image/td-agent.conf b/contrib/logging/fluentd-es-image/td-agent.conf index e56ac20d94..640be1133f 100644 --- a/contrib/logging/fluentd-es-image/td-agent.conf +++ b/contrib/logging/fluentd-es-image/td-agent.conf @@ -47,10 +47,14 @@ type elasticsearch log_level info include_tag_key true - host %ES_HOST% + host elasticsearch.default port 9200 logstash_format true flush_interval 5s + # Never wait longer than 5 minutes between retries. + max_retry_wait 300 + # Disable the limit on the number of retries (retry forever). + disable_retry_limit @@ -65,8 +69,12 @@ type elasticsearch log_level info include_tag_key true - host %ES_HOST% + host elasticsearch.default port 9200 logstash_format true flush_interval 5s + # Never wait longer than 5 minutes between retries. + max_retry_wait 300 + # Disable the limit on the number of retries (retry forever). + disable_retry_limit