Zack Williams | 41513bf | 2018-07-07 20:08:35 -0700 | [diff] [blame] | 1 | # 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. |
khenaidoo | 1ee03e4 | 2018-02-20 12:45:41 -0500 | [diff] [blame] | 14 | apiVersion: v1 |
| 15 | data: |
| 16 | fluentd.conf: | |
khenaidoo | 1ee03e4 | 2018-02-20 12:45:41 -0500 | [diff] [blame] | 17 | <source> |
| 18 | @id fluentd-containers.log |
| 19 | @type tail |
| 20 | path /var/log/containers/*.log |
| 21 | exclude_path ["/var/log/containers/*kube-system*.log"] |
| 22 | pos_file /var/log/containers/ag-containers.log.pos |
| 23 | time_format %Y-%m-%dT%H:%M:%S.%NZ |
| 24 | tag voltha.* |
| 25 | log_level debug |
| 26 | format json |
| 27 | read_from_head true |
| 28 | </source> |
| 29 | <match **> |
| 30 | @type forward |
| 31 | heartbeat_type tcp |
| 32 | |
| 33 | # primary host |
| 34 | <server> |
| 35 | host fluentdactv |
| 36 | port 24224 |
| 37 | </server> |
| 38 | # use secondary host |
| 39 | <server> |
| 40 | host fluentdstby |
| 41 | port 24224 |
| 42 | standby |
| 43 | </server> |
| 44 | # use longer flush_interval to reduce CPU usage. |
| 45 | # note that this is a trade-off against latency. |
| 46 | flush_interval 60s |
| 47 | </match> |
| 48 | |
| 49 | fluentd-agg.conf: | |
| 50 | <source> |
| 51 | @type forward |
| 52 | port 24224 |
| 53 | </source> |
| 54 | <match **> |
| 55 | @type file |
| 56 | |
| 57 | path /fluentd/log/voltha |
| 58 | buffer_path /fluentd/log/*.log |
| 59 | append true |
| 60 | time_slice_wait 10m |
| 61 | time_format %Y%m%dT%H%M%S%z |
| 62 | time_slice_format %Y%m%d%H |
| 63 | </match> |
| 64 | kind: ConfigMap |
| 65 | metadata: |
| 66 | name: fluentd-config |
| 67 | namespace: voltha |