Merge pull request #7539 from satnam6502/master

Trim cluster log tags to pod name and container name
pull/6/head
Alex Robinson 2015-04-30 10:29:41 -07:00
commit 58ede77a58
4 changed files with 12 additions and 3 deletions

View File

@ -33,6 +33,9 @@ RUN sed -i -e "s/USER=td-agent/USER=root/" -e "s/GROUP=td-agent/GROUP=root/" /et
# Install the Elasticsearch Fluentd plug-in.
RUN /usr/sbin/td-agent-gem install fluent-plugin-elasticsearch
# Install the record reformer plugin.
RUN /usr/sbin/td-agent-gem install fluent-plugin-record-reformer
# Copy the Fluentd configuration file.
COPY td-agent.conf /etc/td-agent/td-agent.conf

View File

@ -1,7 +1,7 @@
.PHONY: build push
IMAGE = fluentd-elasticsearch
TAG = 1.4
TAG = 1.5
build:
docker build -t gcr.io/google_containers/$(IMAGE):$(TAG) .

View File

@ -40,10 +40,16 @@
path /varlog/containers/*.log
pos_file /varlog/es-containers.log.pos
time_format %Y-%m-%dT%H:%M:%S
tag kubernetes.*
tag reform.*
read_from_head true
</source>
<match reform.**>
type record_reformer
enable_ruby true
tag kubernetes.${tag_suffix[3].split('-')[0..-2].join('-')}
</match>
<match kubernetes.**>
type elasticsearch
log_level info

View File

@ -5,7 +5,7 @@
"spec": {
"containers": [
{ "name": "fluentd-elasticsearch",
"image": "gcr.io/google_containers/fluentd-elasticsearch:1.4",
"image": "gcr.io/google_containers/fluentd-elasticsearch:1.5",
"env": [
{ "name": "FLUENTD_ARGS",
"value": "-qq"}