4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
21 namespace: kube-system
23 #Take care that the files will be processed by fluentd in alphabetical order
24 01-fluentd_kubernetes.conf: |-
26 # Look for files of type *kube-system* and add tag kubernetes
29 path /var/log/containers/*kube-system*.log
30 pos_file /fluentd/log/fluentd-kubernetes.log.pos
31 time_format %Y-%m-%dT%H:%M:%S.%NZ
36 # Add kubernetes metadata to "kubernetes" tagged messages
37 <filter kubernetes.**>
38 @type kubernetes_metadata
41 02-fluentd_elasticsearch.conf: |-
43 # Forward all messages with either kubenetes tag to elasticsearch
48 host "{{ caas.elasticsearch_url }}"
49 port "{{ caas.elasticsearch_port }}"
50 scheme "{{ elasticsearch_sheme | default('http') }}"
51 user "{{ elasticsearch_user | default('elastic') }}"
52 password "{{ elasticsearch_passwd | default('changeme') }}"
53 ssl_verify "{{ elasticsearch_ssl | default('true') }}"
54 reload_connections "{{ elasticsearch_reload_connections | default('true') }}"
55 logstash_prefix "{{ elasticsearch_logstash_prefix | default('logstash') }}"
57 reconnect_on_error true
61 flush_at_shutdown "true"