mirror of https://github.com/k3s-io/k3s
Merge pull request #7539 from satnam6502/master
Trim cluster log tags to pod name and container namepull/6/head
commit
58ede77a58
|
@ -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
|
||||
|
||||
|
|
|
@ -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) .
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"}
|
||||
|
|
Loading…
Reference in New Issue