mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #7539 from satnam6502/master
Trim cluster log tags to pod name and container name
This commit is contained in:
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.
|
# Install the Elasticsearch Fluentd plug-in.
|
||||||
RUN /usr/sbin/td-agent-gem install fluent-plugin-elasticsearch
|
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 the Fluentd configuration file.
|
||||||
COPY td-agent.conf /etc/td-agent/td-agent.conf
|
COPY td-agent.conf /etc/td-agent/td-agent.conf
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.PHONY: build push
|
.PHONY: build push
|
||||||
|
|
||||||
IMAGE = fluentd-elasticsearch
|
IMAGE = fluentd-elasticsearch
|
||||||
TAG = 1.4
|
TAG = 1.5
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker build -t gcr.io/google_containers/$(IMAGE):$(TAG) .
|
docker build -t gcr.io/google_containers/$(IMAGE):$(TAG) .
|
||||||
|
@ -40,10 +40,16 @@
|
|||||||
path /varlog/containers/*.log
|
path /varlog/containers/*.log
|
||||||
pos_file /varlog/es-containers.log.pos
|
pos_file /varlog/es-containers.log.pos
|
||||||
time_format %Y-%m-%dT%H:%M:%S
|
time_format %Y-%m-%dT%H:%M:%S
|
||||||
tag kubernetes.*
|
tag reform.*
|
||||||
read_from_head true
|
read_from_head true
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
|
<match reform.**>
|
||||||
|
type record_reformer
|
||||||
|
enable_ruby true
|
||||||
|
tag kubernetes.${tag_suffix[3].split('-')[0..-2].join('-')}
|
||||||
|
</match>
|
||||||
|
|
||||||
<match kubernetes.**>
|
<match kubernetes.**>
|
||||||
type elasticsearch
|
type elasticsearch
|
||||||
log_level info
|
log_level info
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"spec": {
|
"spec": {
|
||||||
"containers": [
|
"containers": [
|
||||||
{ "name": "fluentd-elasticsearch",
|
{ "name": "fluentd-elasticsearch",
|
||||||
"image": "gcr.io/google_containers/fluentd-elasticsearch:1.4",
|
"image": "gcr.io/google_containers/fluentd-elasticsearch:1.5",
|
||||||
"env": [
|
"env": [
|
||||||
{ "name": "FLUENTD_ARGS",
|
{ "name": "FLUENTD_ARGS",
|
||||||
"value": "-qq"}
|
"value": "-qq"}
|
||||||
|
Loading…
Reference in New Issue
Block a user