Zack Williams | 7a506d2 | 2018-09-24 17:00:13 -0700 | [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 | |
Zack Williams | c8c32e0 | 2018-11-04 14:43:21 -0700 | [diff] [blame] | 42 | # remove unneeded fields |
| 43 | processors: |
| 44 | - drop_fields: |
| 45 | fields: ["host", "prospector", "input"] |
| 46 | |
Zack Williams | 7a506d2 | 2018-09-24 17:00:13 -0700 | [diff] [blame] | 47 | output.kafka: |
| 48 | hosts: {{ .Values.log_agent.kafka_brokers | toJson }} |
| 49 | topic: 'onos.log' |
| 50 | key: '%{[bundle.name]}' |
| 51 | |
| 52 | {{- end }} |
| 53 | |