mirror of https://github.com/k3s-io/k3s
Merge pull request #1761 from satnam6502/fluentd-es-image
Minor tweaks to Fluentd toi Elasticsearch imagepull/6/head
commit
a07d4058a6
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.*
|
||||
</source>
|
||||
|
||||
<match docker.container.*>
|
||||
<match docker.container.**>
|
||||
type elasticsearch
|
||||
log_level info
|
||||
include_tag_key true
|
||||
|
|
Loading…
Reference in New Issue