File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 21
21
[SERVICE]
22
22
Flush 5
23
23
Log_Level info
24
- Parsers_File parsers.conf
25
24
Daemon off
25
+ Parsers_File parsers.conf
26
+
27
+ @INCLUDE inputs.conf
28
+ @INCLUDE filters.conf
29
+ @INCLUDE outputs.conf
26
30
31
+ inputs.conf : |
27
32
[INPUT]
28
33
Name tail
29
34
Path {{ .Values.persistence.mountPath }}/Logs/*Error*
@@ -58,11 +63,14 @@ data:
58
63
Read_from_head true
59
64
tag kube.marklogic.logs.audit
60
65
Path_Key path
61
-
66
+
67
+ filters.conf : |
68
+ # Enrich Logs
62
69
[FILTER]
63
70
Name modify
64
71
Match *
65
72
Add pod ${POD_NAME}
73
+ Add namespace {{ .Release.Namespace }}
66
74
67
75
[FILTER]
68
76
Name modify
88
96
Name modify
89
97
Match kube.marklogic.logs.crash
90
98
Add tag kube.marklogic.logs.crash
91
-
99
+
100
+ # Parse Logs
92
101
[FILTER]
93
102
Name parser
94
103
Match kube.marklogic.logs.error
@@ -110,6 +119,7 @@ data:
110
119
Parser json_parser
111
120
Reserve_Data On
112
121
122
+ outputs.conf : |
113
123
# Configure export to logging backend
114
124
[OUTPUT]
115
125
Name es
@@ -118,20 +128,21 @@ data:
118
128
Port {{ .Values.logging.port }}
119
129
HTTP_User {{ .Values.logging.username }}
120
130
HTTP_Passwd {{ .Values.logging.password }}
131
+
121
132
parsers.conf : |
122
133
[PARSER]
123
134
Name error_parser
124
135
Format regex
125
136
Regex ^(?<date_time>(.+?)(?=[a-zA-Z]))(?<log_level>(.+?)(?=:))(.+?)(?=[a-zA-Z])(?<log>.*)
126
- Time_Key date_time
137
+ Time_Key time
127
138
Time_Format %Y-%m-%d %H:%M:%S.%L
128
139
Time_Keep On
129
140
130
141
[PARSER]
131
142
Name access_parser
132
143
Format regex
133
144
Regex ^(?<host>[^ ]*)(.+?)(?<=\- )(?<user>(.+?)(?=\[))(.+?)(?<=\[)(?<date_time>(.+?)(?=\]))(.+?)(?<=")(?<request>[^\ ]+[^\"]+)(.+?)(?=\d)(?<response_code>[^\ ]*)(.+?)(?=\d|-)(?<response_obj_size>[^\ ]*)(.+?)(?=")(?<request_info>.*)
134
- Time_Key date_time
145
+ Time_Key time
135
146
Time_Format %d/%b/%Y:%H:%M:%S %z
136
147
Time_Keep On
137
148
Original file line number Diff line number Diff line change @@ -107,11 +107,7 @@ spec:
107
107
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
108
108
{{- end }}
109
109
- name : {{ .Values.logging.configMapName }}
110
- mountPath : /fluent-bit/etc/fluent-bit.conf
111
- subPath : fluent-bit.conf
112
- - name : {{ .Values.logging.configMapName }}
113
- mountPath : /fluent-bit/etc/parsers.conf
114
- subPath : parsers.conf
110
+ mountPath : /fluent-bit/etc/
115
111
env :
116
112
- name : POD_NAME
117
113
valueFrom :
You can’t perform that action at this time.
0 commit comments