mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 06:32:32 +00:00
Propagate pod and container name for log files
This commit is contained in:
@@ -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) .
|
||||
|
@@ -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
|
||||
|
@@ -6,7 +6,7 @@
|
||||
.PHONY: build push
|
||||
|
||||
|
||||
TAG = 1.2
|
||||
TAG = 1.3
|
||||
|
||||
build:
|
||||
docker build -t gcr.io/google_containers/fluentd-gcp:$(TAG) .
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user