Confess the horrible hack for outer host

This commit is contained in:
Satnam Singh 2014-10-13 18:55:58 +00:00
parent c7447a719f
commit d140c71a0d

View File

@ -14,7 +14,14 @@
# 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}'`
# 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
sed -i -e "s/ES_HOST/${OUTER_HOST}/" /etc/td-agent/td-agent.conf
/usr/sbin/td-agent