Skip to content

Commit 2e09dbe

Browse files
committed
nginx error logs parser
1 parent d3634c6 commit 2e09dbe

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

helm/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,14 @@ fluent-bit:
377377
Mem_Buf_Limit 5MB
378378
Skip_Long_Lines On
379379
380+
# [INPUT]
381+
# Name tail
382+
# Path /var/log/containers/{NGINX_DEPLOYMENT_NAME}-*.log
383+
# Parser nginx_error
384+
# Tag kube.*
385+
# Mem_Buf_Limit 5MB
386+
# Skip_Long_Lines On
387+
380388
[INPUT]
381389
name kubernetes_events
382390
tag k8s_events
@@ -427,6 +435,14 @@ fluent-bit:
427435
Time_Keep Off
428436
Time_Key time
429437
Time_Format %Y-%m-%dT%H:%M:%S.%L
438+
439+
[PARSER]
440+
Name nginx_error
441+
Format regex
442+
Regex ^(?<timestamp>\S+Z) stderr F (?<error_timestamp>\S+ \S+) \[(?<log_level>\S+)\] (?<process_id>\d+#\d+): \*(?<request_id>\d+) (?<error_message>.*?) client: (?<client_ip>\S+), server: (?<server_name>\S+), request: "(?<request_method>\S+) (?<request_path>\S+) HTTP/\S+", upstream: "(?<upstream_url>[^"]+)", host: "(?<host>\S+)"$
443+
Time_Key timestamp
444+
Time_Format %Y-%m-%dT%H:%M:%S.%LZ
445+
430446
# The config volume is mounted by default, either to the existingConfigMap value, or the default of "fluent-bit.fullname"
431447
volumeMounts:
432448
- name: config

0 commit comments

Comments
 (0)