forked from newrelic/newrelic-fluentd-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fluent.conf
67 lines (58 loc) · 1.45 KB
/
fluent.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<system>
log_level "#{ENV['LOG_LEVEL']}"
</system>
<source>
@type forward
port 24224
bind 0.0.0.0
</source>
<source>
@type http
port 443
bind 0.0.0.0
body_size_limit 32m
keepalive_timeout 10s
</source>
<source>
@type http
port 80
bind 0.0.0.0
body_size_limit 32m
keepalive_timeout 10s
</source>
<filter **>
@type parser
<parse>
@type multi_format
<pattern>
format /^(?<datetime>[^\]\[]*)\s(?<extra1>\s*\d+\s*-+\s*)?((\[\s*)?(\x1b\[[0-9;]*m)?(?<level>trace|debug|info|warn|error|alert|fatal)(\x1b\[[0-9;]*m)?(\s*\])?).*?(?<extra2>\s*\d+\s*-+\s*)?.*?\s*((\[)?\s*((\x1b\[[0-9;]*m)?(?<firstWord>[^\s\[\]]*))\s*(\])?)\s*((?<message>.*)(\x1b\[[0-9;]*m)?)$/
ignorecase true
</pattern>
<pattern>
format /^(?<datetime>[^\]\[]*)\s*(?<extra>\d+\s*-+)\s*((\[\s*)?(?<app>[^\s\[\]]*)(\s*\])?)\s*(?<message>.*)$/
</pattern>
<pattern>
format /^(?<message>.*)$/
</pattern>
</parse>
key_name log
reserve_data true
</filter>
<label @FLUENT_LOG>
<filter fluent.*>
@type record_transformer
<record>
fluentd_host "#{Socket.gethostname}"
</record>
</filter>
<match fluent.*>
@type newrelic
api_key "#{ENV['API_KEY']}"
base_uri "#{ENV['BASE_URI']}"
</match>
</label>
<match **>
@type newrelic
api_key "#{ENV['API_KEY']}"
base_uri "#{ENV['BASE_URI']}"
</match>