Propagate pod and container name for log files

This commit is contained in:
Satnam Singh
2015-04-20 17:26:40 -07:00
parent bd11f004be
commit 2444c1f943
15 changed files with 134 additions and 19 deletions

View File

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

View File

@@ -37,14 +37,14 @@
type tail
format json
time_key time
path /var/lib/docker/containers/*/*-json.log
pos_file /var/lib/docker/containers/es-containers.log.pos
path /varlog/containers/*.log
pos_file /varlog/es-containers.log.pos
time_format %Y-%m-%dT%H:%M:%S
tag docker.*
tag kubernetes.*
read_from_head true
</source>
<match docker.**>
<match kubernetes.**>
type elasticsearch
log_level info
include_tag_key true

View File

@@ -6,7 +6,7 @@
.PHONY: build push
TAG = 1.2
TAG = 1.3
build:
docker build -t gcr.io/google_containers/fluentd-gcp:$(TAG) .

View File

@@ -16,14 +16,14 @@
type tail
format none
time_key time
path /var/lib/docker/containers/*/*-json.log
pos_file /var/lib/docker/containers/gcp-containers.log.pos
path /varlog/containers/*/*.log
pos_file /varlog/gcp-containers.log.pos
time_format %Y-%m-%dT%H:%M:%S
tag docker.*
tag kubernetes.*
read_from_head true
</source>
<match docker.**>
<match kubernetes.**>
type google_cloud
flush_interval 5s
# Never wait longer than 5 minutes between retries.