-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.fluent.conf
115 lines (106 loc) · 2.68 KB
/
example.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Receive events from 24224/tcp
# This is used by log forwarding and the fluent-cat command
<source>
@type forward
port 24224
str1a_param "foo"
str1b_param "foo
bar"
str2a_param 'foo'
str2b_param 'foo
bar'
str2c_param "foo\nbar" # \n is interpreted as actual LF character
array_param [
"a", "b"
]
hash_param {
"k": "v",
"k1": 10
}
host_param "#{Socket.gethostname}" # host_param is actual hostname like `webserver1`.
env_param "foo-#{ENV["FOO_BAR"]}" # NOTE that foo-"#{ENV["FOO_BAR"]}" doesn't work.
tag "test.#{ENV['PROJECT_NAME']}"
</source>
<source>
@type tail
@label @SYSTEM
</source>
# http://this.host:9880/myapp.access?json={"event":"data"}
<source>
@type http
port 9880
</source>
<filter foo.bar>
@type record_transformer
<record>
hostname "#{Socket.gethostname}"
tag ${record["project_name"]}.scope.${tag}_old
key.flatten x
</record>
</filter>
<match myapp.access yourapp.access>
@type file
path /var/log/fluent/access
</match>
<label @SYSTEM>
<filter var.log.middleware.**>
@type grep
# ...
</filter>
<match **>
@type s3
include_tag_key true
buffer_chunk_limit 2M
buffer_queue_limit 32
flush_interval 5s
# ...
</match>
</label>
<system>
# equal to -qq option
log_level error
# equal to --without-source option
without_source
# ...
</system>
# Include config files in the ./config.d directory
@include config.d/*.conf
# =======================
# v1_literal_example.conf
# =======================
<section1>
key1 'text' # text
key2 '\'' # ' (1 char)
key3 '\\' # \ (1 char)
key4 '\t' # \t (2 char)
key5 '\[' # \[ (2 char)
key6 '\\[' # \[ (2 char)
key7 '#t' # #t (2 char)
key8 '\#{test}' # \#{test} (8 char)
key9 '#{test}' # #{test} (7 char)
key10 '\[(?<time>[^\]]*)\] (?<message>.*)' # \[(?<time>[^\]]*\] (?<message>.*)
</section1>
<section2>
key1 "text" # text
key2 "\"" # " (1 char)
key3 "\\" # \ (1 char)
key4 "\t" # TAB (1 char)
key5 "\[" # [ (1 char)
key6 "\\[" # \[ (2 char)
key7 "#t" # #t (2 char)
key8 "\#{test}" # #{test} (7 char)
key9 "#{test}" # replaced by eval('test')
key10 "\\[(?<time>[^\\]]*)\\] (?<message>.*)" # \[(?<time>[^\]]*\] (?<message>.*)
</section2>
<section3>
key1 text # text
key2 \ # \ (1 char)
key3 \\ # \\ (2 char)
key4 \t # \t (2 char)
key5 \[ # \[ (2 char)
key6 \\[ # \\[ (3 char)
key7 #t # #t (2 char)
key8 \#{test} # \#{test} (8 char)
key9 #{test} # #{test} (7 char)
key10 \[(?<time>[^\]]*)\] (?<message>.*) # \[(?<time>[^\]]*\] (?<message>.*)
</section3>