Skip to content

Commit d9c3c1b

Browse files
committed
Remove elastic search as default output. Add option for each log file type to toggle if that log file type is collected in values file.
1 parent 6ac1284 commit d9c3c1b

File tree

2 files changed

+41
-22
lines changed

2 files changed

+41
-22
lines changed

charts/templates/configmap.yaml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,46 +23,68 @@ data:
2323
Log_Level info
2424
Daemon off
2525
Parsers_File parsers.conf
26-
26+
2727
@INCLUDE inputs.conf
2828
@INCLUDE filters.conf
2929
@INCLUDE outputs.conf
3030
3131
inputs.conf: |
32+
{{- if .Values.logging.trackFiles.errorLogs }}
3233
[INPUT]
3334
Name tail
3435
Path {{ .Values.persistence.mountPath }}/Logs/*Error*
3536
Read_from_head true
3637
Tag kube.marklogic.logs.error
3738
Path_Key path
39+
{{- end }}
3840
41+
{{- if .Values.logging.trackFiles.accessLogs }}
3942
[INPUT]
4043
Name tail
4144
Path {{ .Values.persistence.mountPath }}/Logs/*Access*
4245
Read_from_head true
4346
tag kube.marklogic.logs.access
4447
Path_Key path
45-
48+
{{- end }}
49+
50+
{{- if .Values.logging.trackFiles.requestLogs }}
4651
[INPUT]
4752
Name tail
4853
Path {{ .Values.persistence.mountPath }}/Logs/*Request*
4954
Read_from_head true
5055
tag kube.marklogic.logs.request
5156
Path_Key path
52-
57+
{{- end }}
58+
59+
{{- if .Values.logging.trackFiles.crashLogs }}
5360
[INPUT]
5461
Name tail
5562
Path {{ .Values.persistence.mountPath }}/Logs/CrashLog.txt
5663
Read_from_head true
5764
tag kube.marklogic.logs.crash
5865
Path_Key path
59-
66+
{{- end }}
67+
68+
{{- if .Values.logging.trackFiles.auditLogs }}
6069
[INPUT]
6170
Name tail
6271
Path {{ .Values.persistence.mountPath }}/Logs/AuditLog.txt
6372
Read_from_head true
6473
tag kube.marklogic.logs.audit
6574
Path_Key path
75+
{{- end }}
76+
77+
outputs.conf: |
78+
# Example output config for ElasticSearch output
79+
# [OUTPUT]
80+
# Name es
81+
# Match *
82+
# Host {{ .Values.logging.host }}
83+
# Port {{ .Values.logging.port }}
84+
# HTTP_User {{ .Values.logging.username }}
85+
# HTTP_Passwd {{ .Values.logging.password }}
86+
# Configure desired output below, documentation on how to set up output can be found here
87+
# https://docs.fluentbit.io/manual/pipeline/outputs
6688
6789
filters.conf: |
6890
# Enrich Logs
@@ -71,7 +93,7 @@ data:
7193
Match *
7294
Add pod ${POD_NAME}
7395
Add namespace {{ .Release.Namespace }}
74-
96+
7597
[FILTER]
7698
Name modify
7799
Match kube.marklogic.logs.error
@@ -86,7 +108,7 @@ data:
86108
Name modify
87109
Match kube.marklogic.logs.request
88110
Add tag kube.marklogic.logs.request
89-
111+
90112
[FILTER]
91113
Name modify
92114
Match kube.marklogic.logs.audit
@@ -96,7 +118,7 @@ data:
96118
Name modify
97119
Match kube.marklogic.logs.crash
98120
Add tag kube.marklogic.logs.crash
99-
121+
100122
# Parse Logs
101123
[FILTER]
102124
Name parser
@@ -111,23 +133,13 @@ data:
111133
Key_Name log
112134
Parser access_parser
113135
Reserve_Data On
114-
136+
115137
[FILTER]
116138
Name parser
117139
Match kube.marklogic.logs.request
118140
Key_Name log
119141
Parser json_parser
120142
Reserve_Data On
121-
122-
outputs.conf: |
123-
# Configure export to logging backend
124-
[OUTPUT]
125-
Name es
126-
Match *
127-
Host {{ .Values.logging.host }}
128-
Port {{ .Values.logging.port }}
129-
HTTP_User {{ .Values.logging.username }}
130-
HTTP_Passwd {{ .Values.logging.password }}
131143
132144
parsers.conf: |
133145
[PARSER]

charts/values.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,15 @@ startupProbe:
119119

120120
logging:
121121
enabled: true
122-
username: admin
123-
password: admin
124122
configMapName: fluent-bit-config
125-
host: elasticsearch.default.svc.cluster.local
126-
port: 9200
123+
trackFiles:
124+
errorLogs: true
125+
accessLogs: true
126+
requestLogs: true
127+
crashLogs: true
128+
auditLogs: true
129+
# Example values for ElasticSearch output
130+
# username: admin
131+
# password: admin
132+
# host: elasticsearch.default.svc.cluster.local
133+
# port: 9200

0 commit comments

Comments
 (0)