Skip to content

Commit b07c797

Browse files
authored
[FluentBit] Use systemd plugins for retrieving host logs (#247)
1 parent 70318c7 commit b07c797

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

charts/amazon-cloudwatch-observability/values.yaml

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,43 +193,54 @@ containerLogs:
193193
extra_user_agent container-insights
194194
host-log.conf: |
195195
[INPUT]
196-
Name tail
196+
Name systemd
197197
Tag host.dmesg
198-
Path /var/log/dmesg
199-
Key message
198+
Systemd_Filter _TRANSPORT=kernel
200199
DB /var/fluent-bit/state/flb_dmesg.db
201-
Mem_Buf_Limit 5MB
202-
Skip_Long_Lines On
203-
Refresh_Interval 10
204-
Read_from_Head ${READ_FROM_HEAD}
200+
Path /var/log/journal
201+
Read_From_Tail ${READ_FROM_TAIL}
205202
206203
[INPUT]
207-
Name tail
204+
Name systemd
208205
Tag host.messages
209-
Path /var/log/messages
210-
Parser syslog
206+
Systemd_Filter PRIORITY=0
207+
Systemd_Filter PRIORITY=1
208+
Systemd_Filter PRIORITY=2
209+
Systemd_Filter PRIORITY=3
210+
Systemd_Filter PRIORITY=4
211+
Systemd_Filter PRIORITY=5
212+
Systemd_Filter PRIORITY=6
211213
DB /var/fluent-bit/state/flb_messages.db
212-
Mem_Buf_Limit 5MB
213-
Skip_Long_Lines On
214-
Refresh_Interval 10
215-
Read_from_Head ${READ_FROM_HEAD}
214+
Path /var/log/journal
215+
Read_From_Tail ${READ_FROM_TAIL}
216216
217217
[INPUT]
218-
Name tail
218+
Name systemd
219219
Tag host.secure
220-
Path /var/log/secure
221-
Parser syslog
220+
Systemd_Filter SYSLOG_FACILITY=10
222221
DB /var/fluent-bit/state/flb_secure.db
223-
Mem_Buf_Limit 5MB
224-
Skip_Long_Lines On
225-
Refresh_Interval 10
226-
Read_from_Head ${READ_FROM_HEAD}
222+
Path /var/log/journal
223+
Read_From_Tail ${READ_FROM_TAIL}
227224
228225
[FILTER]
229226
Name aws
230227
Match host.*
231228
imds_version v2
232229
230+
[FILTER]
231+
Name grep
232+
Match host.messages
233+
Exclude SYSLOG_FACILITY /^(2|9|10)$/
234+
235+
[FILTER]
236+
Name modify
237+
Match host.*
238+
Rename _HOSTNAME host
239+
Rename MESSAGE message
240+
Rename SYSLOG_IDENTIFIER ident
241+
Rename SYSLOG_PID pid
242+
Remove_regex [A-Z]
243+
233244
[OUTPUT]
234245
Name cloudwatch_logs
235246
Match host.*

0 commit comments

Comments
 (0)