mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
updated fluentd configmap with 1.1.0 compatible version
This commit is contained in:
parent
ec187f729c
commit
9ab59becbf
@ -1,6 +1,16 @@
|
|||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: fluentd-es-config-v0.1.2
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
data:
|
data:
|
||||||
|
system.conf: |-
|
||||||
|
<system>
|
||||||
|
root_dir /tmp/fluentd-buffers/
|
||||||
|
</system>
|
||||||
|
|
||||||
containers.input.conf: |-
|
containers.input.conf: |-
|
||||||
# This configuration file for Fluentd / td-agent is used
|
# This configuration file for Fluentd / td-agent is used
|
||||||
# to watch changes to Docker log files. The kubelet creates symlinks that
|
# to watch changes to Docker log files. The kubelet creates symlinks that
|
||||||
@ -101,25 +111,19 @@ data:
|
|||||||
# CRI Log Example:
|
# CRI Log Example:
|
||||||
# 2016-02-17T00:04:05.931087621Z stdout F [info:2016-02-16T16:04:05.930-08:00] Some log text here
|
# 2016-02-17T00:04:05.931087621Z stdout F [info:2016-02-16T16:04:05.930-08:00] Some log text here
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id fluentd-containers.log
|
||||||
|
@type tail
|
||||||
path /var/log/containers/*.log
|
path /var/log/containers/*.log
|
||||||
pos_file /var/log/es-containers.log.pos
|
pos_file /var/log/fluentd-containers.log.pos
|
||||||
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
||||||
tag raw.kubernetes.*
|
tag raw.kubernetes.*
|
||||||
|
format json
|
||||||
read_from_head true
|
read_from_head true
|
||||||
format multi_format
|
|
||||||
<pattern>
|
|
||||||
format json
|
|
||||||
time_key time
|
|
||||||
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
|
||||||
</pattern>
|
|
||||||
<pattern>
|
|
||||||
format /^(?<time>.+) (?<stream>stdout|stderr) [^ ]* (?<log>.*)$/
|
|
||||||
time_format %Y-%m-%dT%H:%M:%S.%N%:z
|
|
||||||
</pattern>
|
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Detect exceptions in the log output and forward them as one log entry.
|
# Detect exceptions in the log output and forward them as one log entry.
|
||||||
<match raw.kubernetes.**>
|
<match raw.kubernetes.**>
|
||||||
|
@id raw.kubernetes
|
||||||
@type detect_exceptions
|
@type detect_exceptions
|
||||||
remove_tag_prefix raw
|
remove_tag_prefix raw
|
||||||
message log
|
message log
|
||||||
@ -128,14 +132,28 @@ data:
|
|||||||
max_bytes 500000
|
max_bytes 500000
|
||||||
max_lines 1000
|
max_lines 1000
|
||||||
</match>
|
</match>
|
||||||
|
|
||||||
system.input.conf: |-
|
system.input.conf: |-
|
||||||
|
# Example:
|
||||||
|
# 2015-12-21 23:17:22,066 [salt.state ][INFO ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081
|
||||||
|
<source>
|
||||||
|
@id minion
|
||||||
|
@type tail
|
||||||
|
format /^(?<time>[^ ]* [^ ,]*)[^\[]*\[[^\]]*\]\[(?<severity>[^ \]]*) *\] (?<message>.*)$/
|
||||||
|
time_format %Y-%m-%d %H:%M:%S
|
||||||
|
path /var/log/salt/minion
|
||||||
|
pos_file /var/log/salt.pos
|
||||||
|
tag salt
|
||||||
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# Dec 21 23:17:22 gke-foo-1-1-4b5cbd14-node-4eoj startupscript: Finished running startup script /var/run/google.startup.script
|
# Dec 21 23:17:22 gke-foo-1-1-4b5cbd14-node-4eoj startupscript: Finished running startup script /var/run/google.startup.script
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id startupscript.log
|
||||||
|
@type tail
|
||||||
format syslog
|
format syslog
|
||||||
path /var/log/startupscript.log
|
path /var/log/startupscript.log
|
||||||
pos_file /var/log/es-startupscript.log.pos
|
pos_file /var/log/startupscript.log.pos
|
||||||
tag startupscript
|
tag startupscript
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
@ -143,22 +161,24 @@ data:
|
|||||||
# time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json"
|
# time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json"
|
||||||
# time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such image: -f" statusCode=404
|
# time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such image: -f" statusCode=404
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id docker.log
|
||||||
|
@type tail
|
||||||
format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
|
format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
|
||||||
path /var/log/docker.log
|
path /var/log/docker.log
|
||||||
pos_file /var/log/es-docker.log.pos
|
pos_file /var/log/docker.log.pos
|
||||||
tag docker
|
tag docker
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# 2016/02/04 06:52:38 filePurge: successfully removed file /var/etcd/data/member/wal/00000000000006d0-00000000010a23d1.wal
|
# 2016/02/04 06:52:38 filePurge: successfully removed file /var/etcd/data/member/wal/00000000000006d0-00000000010a23d1.wal
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id etcd.log
|
||||||
|
@type tail
|
||||||
# Not parsing this, because it doesn't have anything particularly useful to
|
# Not parsing this, because it doesn't have anything particularly useful to
|
||||||
# parse out of it (like severities).
|
# parse out of it (like severities).
|
||||||
format none
|
format none
|
||||||
path /var/log/etcd.log
|
path /var/log/etcd.log
|
||||||
pos_file /var/log/es-etcd.log.pos
|
pos_file /var/log/etcd.log.pos
|
||||||
tag etcd
|
tag etcd
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
@ -169,144 +189,167 @@ data:
|
|||||||
# Example:
|
# Example:
|
||||||
# I0204 07:32:30.020537 3368 server.go:1048] POST /stats/container/: (13.972191ms) 200 [[Go-http-client/1.1] 10.244.1.3:40537]
|
# I0204 07:32:30.020537 3368 server.go:1048] POST /stats/container/: (13.972191ms) 200 [[Go-http-client/1.1] 10.244.1.3:40537]
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id kubelet.log
|
||||||
|
@type tail
|
||||||
format multiline
|
format multiline
|
||||||
multiline_flush_interval 5s
|
multiline_flush_interval 5s
|
||||||
format_firstline /^\w\d{4}/
|
format_firstline /^\w\d{4}/
|
||||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
time_format %m%d %H:%M:%S.%N
|
time_format %m%d %H:%M:%S.%N
|
||||||
path /var/log/kubelet.log
|
path /var/log/kubelet.log
|
||||||
pos_file /var/log/es-kubelet.log.pos
|
pos_file /var/log/kubelet.log.pos
|
||||||
tag kubelet
|
tag kubelet
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# I1118 21:26:53.975789 6 proxier.go:1096] Port "nodePort for kube-system/default-http-backend:http" (:31429/tcp) was open before and is still needed
|
# I1118 21:26:53.975789 6 proxier.go:1096] Port "nodePort for kube-system/default-http-backend:http" (:31429/tcp) was open before and is still needed
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id kube-proxy.log
|
||||||
|
@type tail
|
||||||
format multiline
|
format multiline
|
||||||
multiline_flush_interval 5s
|
multiline_flush_interval 5s
|
||||||
format_firstline /^\w\d{4}/
|
format_firstline /^\w\d{4}/
|
||||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
time_format %m%d %H:%M:%S.%N
|
time_format %m%d %H:%M:%S.%N
|
||||||
path /var/log/kube-proxy.log
|
path /var/log/kube-proxy.log
|
||||||
pos_file /var/log/es-kube-proxy.log.pos
|
pos_file /var/log/kube-proxy.log.pos
|
||||||
tag kube-proxy
|
tag kube-proxy
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# I0204 07:00:19.604280 5 handlers.go:131] GET /api/v1/nodes: (1.624207ms) 200 [[kube-controller-manager/v1.1.3 (linux/amd64) kubernetes/6a81b50] 127.0.0.1:38266]
|
# I0204 07:00:19.604280 5 handlers.go:131] GET /api/v1/nodes: (1.624207ms) 200 [[kube-controller-manager/v1.1.3 (linux/amd64) kubernetes/6a81b50] 127.0.0.1:38266]
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id kube-apiserver.log
|
||||||
|
@type tail
|
||||||
format multiline
|
format multiline
|
||||||
multiline_flush_interval 5s
|
multiline_flush_interval 5s
|
||||||
format_firstline /^\w\d{4}/
|
format_firstline /^\w\d{4}/
|
||||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
time_format %m%d %H:%M:%S.%N
|
time_format %m%d %H:%M:%S.%N
|
||||||
path /var/log/kube-apiserver.log
|
path /var/log/kube-apiserver.log
|
||||||
pos_file /var/log/es-kube-apiserver.log.pos
|
pos_file /var/log/kube-apiserver.log.pos
|
||||||
tag kube-apiserver
|
tag kube-apiserver
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# I0204 06:55:31.872680 5 servicecontroller.go:277] LB already exists and doesn't need update for service kube-system/kube-ui
|
# I0204 06:55:31.872680 5 servicecontroller.go:277] LB already exists and doesn't need update for service kube-system/kube-ui
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id kube-controller-manager.log
|
||||||
|
@type tail
|
||||||
format multiline
|
format multiline
|
||||||
multiline_flush_interval 5s
|
multiline_flush_interval 5s
|
||||||
format_firstline /^\w\d{4}/
|
format_firstline /^\w\d{4}/
|
||||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
time_format %m%d %H:%M:%S.%N
|
time_format %m%d %H:%M:%S.%N
|
||||||
path /var/log/kube-controller-manager.log
|
path /var/log/kube-controller-manager.log
|
||||||
pos_file /var/log/es-kube-controller-manager.log.pos
|
pos_file /var/log/kube-controller-manager.log.pos
|
||||||
tag kube-controller-manager
|
tag kube-controller-manager
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# W0204 06:49:18.239674 7 reflector.go:245] pkg/scheduler/factory/factory.go:193: watch of *api.Service ended with: 401: The event in requested index is outdated and cleared (the requested history has been cleared [2578313/2577886]) [2579312]
|
# W0204 06:49:18.239674 7 reflector.go:245] pkg/scheduler/factory/factory.go:193: watch of *api.Service ended with: 401: The event in requested index is outdated and cleared (the requested history has been cleared [2578313/2577886]) [2579312]
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id kube-scheduler.log
|
||||||
|
@type tail
|
||||||
format multiline
|
format multiline
|
||||||
multiline_flush_interval 5s
|
multiline_flush_interval 5s
|
||||||
format_firstline /^\w\d{4}/
|
format_firstline /^\w\d{4}/
|
||||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
time_format %m%d %H:%M:%S.%N
|
time_format %m%d %H:%M:%S.%N
|
||||||
path /var/log/kube-scheduler.log
|
path /var/log/kube-scheduler.log
|
||||||
pos_file /var/log/es-kube-scheduler.log.pos
|
pos_file /var/log/kube-scheduler.log.pos
|
||||||
tag kube-scheduler
|
tag kube-scheduler
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# I1104 10:36:20.242766 5 rescheduler.go:73] Running Rescheduler
|
# I1104 10:36:20.242766 5 rescheduler.go:73] Running Rescheduler
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id rescheduler.log
|
||||||
|
@type tail
|
||||||
format multiline
|
format multiline
|
||||||
multiline_flush_interval 5s
|
multiline_flush_interval 5s
|
||||||
format_firstline /^\w\d{4}/
|
format_firstline /^\w\d{4}/
|
||||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
time_format %m%d %H:%M:%S.%N
|
time_format %m%d %H:%M:%S.%N
|
||||||
path /var/log/rescheduler.log
|
path /var/log/rescheduler.log
|
||||||
pos_file /var/log/es-rescheduler.log.pos
|
pos_file /var/log/rescheduler.log.pos
|
||||||
tag rescheduler
|
tag rescheduler
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf
|
# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id glbc.log
|
||||||
|
@type tail
|
||||||
format multiline
|
format multiline
|
||||||
multiline_flush_interval 5s
|
multiline_flush_interval 5s
|
||||||
format_firstline /^\w\d{4}/
|
format_firstline /^\w\d{4}/
|
||||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
time_format %m%d %H:%M:%S.%N
|
time_format %m%d %H:%M:%S.%N
|
||||||
path /var/log/glbc.log
|
path /var/log/glbc.log
|
||||||
pos_file /var/log/es-glbc.log.pos
|
pos_file /var/log/glbc.log.pos
|
||||||
tag glbc
|
tag glbc
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Example:
|
# Example:
|
||||||
# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf
|
# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf
|
||||||
<source>
|
<source>
|
||||||
type tail
|
@id cluster-autoscaler.log
|
||||||
|
@type tail
|
||||||
format multiline
|
format multiline
|
||||||
multiline_flush_interval 5s
|
multiline_flush_interval 5s
|
||||||
format_firstline /^\w\d{4}/
|
format_firstline /^\w\d{4}/
|
||||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
time_format %m%d %H:%M:%S.%N
|
time_format %m%d %H:%M:%S.%N
|
||||||
path /var/log/cluster-autoscaler.log
|
path /var/log/cluster-autoscaler.log
|
||||||
pos_file /var/log/es-cluster-autoscaler.log.pos
|
pos_file /var/log/cluster-autoscaler.log.pos
|
||||||
tag cluster-autoscaler
|
tag cluster-autoscaler
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# Logs from systemd-journal for interesting services.
|
# Logs from systemd-journal for interesting services.
|
||||||
<source>
|
<source>
|
||||||
type systemd
|
@id journald-docker
|
||||||
|
@type systemd
|
||||||
filters [{ "_SYSTEMD_UNIT": "docker.service" }]
|
filters [{ "_SYSTEMD_UNIT": "docker.service" }]
|
||||||
pos_file /var/log/gcp-journald-docker.pos
|
#pos_file /var/log/journald-docker.pos
|
||||||
|
<storage>
|
||||||
|
@type local
|
||||||
|
persistent true
|
||||||
|
</storage>
|
||||||
read_from_head true
|
read_from_head true
|
||||||
tag docker
|
tag docker
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
<source>
|
<source>
|
||||||
type systemd
|
@id journald-kubelet
|
||||||
|
@type systemd
|
||||||
filters [{ "_SYSTEMD_UNIT": "kubelet.service" }]
|
filters [{ "_SYSTEMD_UNIT": "kubelet.service" }]
|
||||||
pos_file /var/log/gcp-journald-kubelet.pos
|
<storage>
|
||||||
|
@type local
|
||||||
|
persistent true
|
||||||
|
</storage>
|
||||||
read_from_head true
|
read_from_head true
|
||||||
tag kubelet
|
tag kubelet
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
<source>
|
<source>
|
||||||
type systemd
|
@id journald-node-problem-detector
|
||||||
|
@type systemd
|
||||||
filters [{ "_SYSTEMD_UNIT": "node-problem-detector.service" }]
|
filters [{ "_SYSTEMD_UNIT": "node-problem-detector.service" }]
|
||||||
pos_file /var/log/gcp-journald-node-problem-detector.pos
|
<storage>
|
||||||
|
@type local
|
||||||
|
persistent true
|
||||||
|
</storage>
|
||||||
read_from_head true
|
read_from_head true
|
||||||
tag node-problem-detector
|
tag node-problem-detector
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
forward.input.conf: |-
|
forward.input.conf: |-
|
||||||
# Takes the messages sent over TCP
|
# Takes the messages sent over TCP
|
||||||
<source>
|
<source>
|
||||||
type forward
|
@type forward
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
monitoring.conf: |-
|
monitoring.conf: |-
|
||||||
# Prometheus Exporter Plugin
|
# Prometheus Exporter Plugin
|
||||||
# input plugin that exports metrics
|
# input plugin that exports metrics
|
||||||
@ -341,32 +384,32 @@ data:
|
|||||||
host ${hostname}
|
host ${hostname}
|
||||||
</labels>
|
</labels>
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
output.conf: |-
|
output.conf: |-
|
||||||
# Enriches records with Kubernetes metadata
|
# Enriches records with Kubernetes metadata
|
||||||
<filter kubernetes.**>
|
<filter kubernetes.**>
|
||||||
type kubernetes_metadata
|
@type kubernetes_metadata
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<match **>
|
<match **>
|
||||||
type elasticsearch
|
@id elasticsearch
|
||||||
log_level info
|
@type elasticsearch
|
||||||
include_tag_key true
|
@log_level info
|
||||||
host elasticsearch-logging
|
include_tag_key true
|
||||||
port 9200
|
host elasticsearch-logging
|
||||||
logstash_format true
|
port 9200
|
||||||
# Set the chunk limits.
|
logstash_format true
|
||||||
buffer_chunk_limit 2M
|
<buffer>
|
||||||
buffer_queue_limit 8
|
@type file
|
||||||
flush_interval 5s
|
path /var/log/fluentd-buffers/kubernetes.system.buffer
|
||||||
# Never wait longer than 5 minutes between retries.
|
flush_mode interval
|
||||||
max_retry_wait 30
|
retry_type exponential_backoff
|
||||||
# Disable the limit on the number of retries (retry forever).
|
flush_thread_count 2
|
||||||
disable_retry_limit
|
flush_interval 5s
|
||||||
# Use multiple threads for processing.
|
retry_forever
|
||||||
num_threads 2
|
retry_max_interval 30
|
||||||
|
chunk_limit_size 2M
|
||||||
|
queue_limit_length 8
|
||||||
|
overflow_action block
|
||||||
|
</buffer>
|
||||||
</match>
|
</match>
|
||||||
metadata:
|
|
||||||
name: fluentd-es-config-v0.1.2
|
|
||||||
namespace: kube-system
|
|
||||||
labels:
|
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
|
||||||
|
Loading…
Reference in New Issue
Block a user