Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 1 | {{- /* |
| 2 | Copyright 2017-present Open Networking Foundation |
| 3 | |
| 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 |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 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. |
| 15 | */ -}} |
| 16 | {{- define "onos.log-agent-configmap" }} |
| 17 | --- |
| 18 | kind: ConfigMap |
| 19 | apiVersion: v1 |
| 20 | metadata: |
| 21 | name: log-agent-configmap |
| 22 | data: |
| 23 | config: | |
| 24 | --- |
| 25 | # filebeat configuration for ONOS |
| 26 | filebeat.inputs: |
| 27 | - type: log |
| 28 | paths: |
| 29 | - "/onos_logs/karaf_json.log" |
| 30 | |
| 31 | fields_under_root: true |
| 32 | |
| 33 | json.keys_under_root: true |
| 34 | json.add_error_key: true |
| 35 | json.overwrite_keys: true |
| 36 | json.message_key: "message" |
| 37 | |
| 38 | multiline.pattern: '^[[:space:]]' |
| 39 | multiline.negate: false |
| 40 | multiline.match: after |
| 41 | |
| 42 | # remove unneeded fields |
| 43 | processors: |
| 44 | - drop_fields: |
| 45 | fields: ["host", "prospector", "input"] |
| 46 | |
| 47 | output.kafka: |
| 48 | hosts: {{ .Values.log_agent.kafka_brokers | toJson }} |
| 49 | topic: 'onos.log' |
| 50 | key: '%{[bundle.name]}' |
| 51 | |
| 52 | {{- end }} |