blob: 945e146dd53602617776ced8ed30e9be3a3ec47f [file] [log] [blame]
Zack Williams7a506d22018-09-24 17:00:13 -07001{{- /*
2Copyright 2017-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/ -}}
16{{- define "onos.log-agent-configmap" }}
17---
18kind: ConfigMap
19apiVersion: v1
20metadata:
Hyunsun Moon90c60502019-10-19 14:46:41 -060021 name: {{ template "onos.fullname" . }}-log-agent-configmap
Zack Williams7a506d22018-09-24 17:00:13 -070022data:
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 Williamsc8c32e02018-11-04 14:43:21 -070042 # remove unneeded fields
43 processors:
44 - drop_fields:
45 fields: ["host", "prospector", "input"]
46
Zack Williams7a506d22018-09-24 17:00:13 -070047 output.kafka:
48 hosts: {{ .Values.log_agent.kafka_brokers | toJson }}
49 topic: 'onos.log'
50 key: '%{[bundle.name]}'
51
52{{- end }}
53