blob: 2329a6fce9f7995ef69914a0d47e792678eaee4c [file] [log] [blame]
Gopinath Tagete2dff4d2018-03-15 17:22:28 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: v1
16data:
17 fluentd.conf: |
18
19 # Uncomment this source in environments where voltha services are forwarding logs to the fluentd port directly.
20 # <source>
21 # @type forward
22 # port 24224
23 # </source>
24
25 <source>
26 @id fluentd-containers.log
27 @type tail
28 path /var/log/containers/*.log
29 exclude_path ["/var/log/containers/*kube-system*.log"]
30 pos_file /var/log/containers/ag-containers.log.pos
31 time_format %Y-%m-%dT%H:%M:%S.%NZ
32 tag voltha.*
33 log_level debug
34 format json
35 read_from_head true
36 </source>
37 <match **>
38 @type forward
39 heartbeat_type tcp
40
41 # primary host
42 <server>
43 host fluentdactv
44 port 24224
45 </server>
46 # use secondary host
47 <server>
48 host fluentdstby
49 port 24224
50 standby
51 </server>
52 # use longer flush_interval to reduce CPU usage.
53 # note that this is a trade-off against latency.
54 flush_interval 60s
55 </match>
56
57 fluentd-agg.conf: |
58 <source>
59 @type forward
60 port 24224
61 </source>
62 <match **>
63 @type file
64
65 path /fluentd/log/voltha
66 buffer_path /fluentd/log/*.log
67 append true
68 time_slice_wait 10m
69 time_format %Y%m%dT%H%M%S%z
70 time_slice_format %Y%m%d%H
71 </match>
72kind: ConfigMap
73metadata:
74 name: fluentd-config
75 namespace: {{ .Values.global.namespace }}