blob: a40251706809bd2afbefeb5db358bceae7b05b3a [file] [log] [blame]
Jack Lucasd41dbdb2021-02-16 11:07:28 -05001{{/*
2#============LICENSE_START========================================================
3# ================================================================================
4# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
5# Modifications Copyright © 2018 Amdocs, Bell Canada
6# Copyright (c) 2021 J. F. Lucas. All rights reserved.
7# ================================================================================
8# Licensed under the Apache License, Version 2.0 (the "License");
9# you may not use this file except in compliance with the License.
10# You may obtain a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS,
16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17# See the License for the specific language governing permissions and
18# limitations under the License.
19# ============LICENSE_END=========================================================
20*/}}
21{{/*
22dcaegen2-services-common.filebeatConfiguration:
23This template generates configuration data for filebeat (log file aggregation).
24
25The template is used to create a configMap mounted by a filebeat sidecar pod
26running alongside a DCAE microservice pod.
27
28See dcaegen2-services-common.configMap for more information.
29*/}}
30{{- define "dcaegen2-services-common.filebeatConfiguration" -}}
31filebeat.prospectors:
32#it is mandatory, in our case it's log
33- input_type: log
34 #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
35 paths:
36 - /var/log/onap/*/*/*/*.log
37 - /var/log/onap/*/*/*.log
38 - /var/log/onap/*/*.log
39 #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
40 ignore_older: 48h
41 # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit
42 clean_inactive: 96h
43
44
45# Name of the registry file. If a relative path is used, it is considered relative to the
46# data path. Else full qualified file name.
47#filebeat.registry_file: ${path.data}/registry
48
49
50output.logstash:
51 #List of logstash server ip addresses with port number.
52 #But, in our case, this will be the loadbalancer IP address.
53 #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
54 hosts: ["{{.Values.filebeatConfig.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.filebeatConfig.logstashPort}}"]
55 #If enable will do load balancing among availabe Logstash, automatically.
56 loadbalance: true
57
58 #The list of root certificates for server verifications.
59 #If certificate_authorities is empty or not set, the trusted
60 #certificate authorities of the host system are used.
61 #ssl.certificate_authorities: $ssl.certificate_authorities
62
63 #The path to the certificate for SSL client authentication. If the certificate is not specified,
64 #client authentication is not available.
65 #ssl.certificate: $ssl.certificate
66
67 #The client certificate key used for client authentication.
68 #ssl.key: $ssl.key
69
70 #The passphrase used to decrypt an encrypted key stored in the configured key file
71 #ssl.key_passphrase: $ssl.key_passphrase
72
73logging:
74 level: debug
75
76 # enable file rotation with default configuration
77 to_files: true
78
79 # do not log to syslog
80 to_syslog: false
81
82 files:
83 path: /usr/share/filebeat/logs
84 name: mybeat.log
85 keepfiles: 7
86{{- end -}}