apiVersion: v1
data:
fluent-bit.conf: |+
#;this file is generate by flb api server
#;api:start
#;api:filter
[FILTER]
Name kubernetes
Match kube.*
#;api:end
#;api:start
#;api:output
[OUTPUT]
Name es
Match *
Host ${ES_HOST}
Port ${ES_PORT}
Index es_index
Type es
#;api:end
#;api:start
#;api:service
[SERVICE]
Flush 1
Log_Level info
Parsers_File parsers.conf
#;api:end
parsers.conf: |
[PARSER]
Name apache
Format regex
Regex ^(?[^ ]) [^ ] (?[^ ]) [(?[^]])] “(?\S+)(?: +(?[^”]?)(?: +\S)?)?" (?[^ ]) (?[^ ])(?: “(?[^”])" “(?[^”])")?$
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name apache2
Format regex
Regex ^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name apache_error
Format regex
Regex ^\[[^ ]* (?<time>[^\]]*)\] \[(?<level>[^\]]*)\](?: \[pid (?<pid>[^\]]*)\])?( \[client (?<client>[^\]]*)\])? (?<message>.*)$
[PARSER]
Name nginx
Format regex
Regex ^(?<remote>[^ ]*) (?<host>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name json-test
Format json
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name docker
Format json
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Keep On
[PARSER]
Name MicroServiceUI
Format json
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Keep On
[PARSER]
Name Application
Format json
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Keep On
[PARSER]
Name Mobile
Format json
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Keep On
[PARSER]
Name spring-boot
Format regex
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Decode_Field_as escaped_utf8 msg
Regex (?m-ix)^{"log":"(?<logtime>[^ ]* [^ ]*) {1,2}(?<level>[^ ]*)( \[(?<appname>[^,]*),(?<traceid>[^,]*),(?<spanid>[^,]*),(?<exportable>[^\]]*)\])? (?<processid>\d+) --- \[(?<thread>[^\]]*)\] (?<class>[^ ]*) *:(?<msg>.*)","stream".*time":"(?<time>[^"]*)\"}$
[PARSER]
Name java-spring
Format regex
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Regex (?m-ix)^{"log":"(?<logtime>[^ ]* [^ ]*) {1,2}(?<level>[^ ]*)( \[(?<appname>[^,]*),(?<traceid>[^,]*),(?<spanid>[^,]*),(?<exportable>[^\]]*)\])? (?<processid>\d+) --- \[(?<thread>[^\]]*)\] (?<class>[^ ]*) *:(?<msg>.*)","stream".*time":"(?<time>[^"]*)\"}$
[PARSER]
Name springnotrace
Format regex
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Regex (?m-ix)^{"log":"(?<logtime>[^ ]* [^ ]*) (?<level>[^ ]*) (?<process_id>[\d]+) \-\-\- \[(?<span_id>[^\]]+)\](?<msg>.*)","stream".*time":"(?<time>[^"]*)\"}$
[PARSER]
Name ErrLines
Format regex
Decode_Field_as escaped_utf8 errs
Regex (?<errs>(?<=:\").*(?=\","stream))
[PARSER]
Name syslog
Format regex
Regex ^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$
Time_Key time
Time_Format %b %d %H:%M:%S
kind: ConfigMap
metadata:
creationTimestamp: “2020-04-01T18:36:21Z”
name: fluent-bit-conf-choerodon-logging
namespace: logging
resourceVersion: “1574514”
selfLink: /api/v1/namespaces/logging/configmaps/fluent-bit-conf-choerodon-logging
uid: a72c26bc-d305-4a14-85f8-d2ecef468da6