Lines 1-65
Link Here
|
1 |
--- fluent.conf.sample.orig 2017-01-06 21:42:28 UTC |
1 |
--- fluent.conf.sample.orig 2020-08-24 22:30:41.549691000 +0300 |
2 |
+++ fluent.conf.sample |
2 |
+++ fluent.conf.sample 2020-08-24 22:21:09.000000000 +0300 |
3 |
@@ -0,0 +1,100 @@ |
3 |
@@ -0,0 +1,139 @@ |
|
|
4 |
+# In v1 configuration, type and id are @ prefix parameters. |
5 |
+# @type and @id are recommended. type and id are still available for backward compatibility |
4 |
+ |
6 |
+ |
5 |
+## built-in TCP input |
7 |
+## built-in TCP input |
6 |
+## $ echo <json> | fluent-cat <tag> |
8 |
+## $ echo <json> | fluent-cat <tag> |
7 |
+<source> |
9 |
+<source> |
8 |
+ type forward |
10 |
+ @type forward |
|
|
11 |
+ @id forward_input |
9 |
+</source> |
12 |
+</source> |
10 |
+ |
13 |
+ |
11 |
+## built-in UNIX socket input |
14 |
+## built-in UNIX socket input |
12 |
+#<source> |
15 |
+#<source> |
13 |
+# type unix |
16 |
+# @type unix |
14 |
+#</source> |
17 |
+#</source> |
15 |
+ |
18 |
+ |
16 |
+# HTTP input |
19 |
+# HTTP input |
17 |
+# http://localhost:8888/<tag>?json=<json> |
20 |
+# http://localhost:8888/<tag>?json=<json> |
18 |
+<source> |
21 |
+<source> |
19 |
+ type http |
22 |
+ @type http |
|
|
23 |
+ @id http_input |
24 |
+ |
20 |
+ port 8888 |
25 |
+ port 8888 |
21 |
+</source> |
26 |
+</source> |
22 |
+ |
27 |
+ |
23 |
+## File input |
28 |
+## File input |
24 |
+## read apache logs with tag=apache.access |
29 |
+## read apache logs with tag=apache.access |
25 |
+#<source> |
30 |
+#<source> |
26 |
+# type tail |
31 |
+# @type tail |
27 |
+# format apache |
32 |
+# format apache |
28 |
+# path /var/log/httpd-access.log |
33 |
+# path /var/log/httpd-access.log |
29 |
+# tag apache.access |
34 |
+# tag apache.access |
30 |
+#</source> |
35 |
+#</source> |
31 |
+ |
36 |
+ |
|
|
37 |
+## Mutating event filter |
38 |
+## Add hostname and tag fields to apache.access tag events |
39 |
+#<filter apache.access> |
40 |
+# @type record_transformer |
41 |
+# <record> |
42 |
+# hostname ${hostname} |
43 |
+# tag ${tag} |
44 |
+# </record> |
45 |
+#</filter> |
46 |
+ |
47 |
+## Selecting event filter |
48 |
+## Remove unnecessary events from apache prefixed tag events |
49 |
+#<filter apache.**> |
50 |
+# @type grep |
51 |
+# include1 method GET # pass only GET in 'method' field |
52 |
+# exclude1 message debug # remove debug event |
53 |
+#</filter> |
54 |
+ |
32 |
+# Listen HTTP for monitoring |
55 |
+# Listen HTTP for monitoring |
33 |
+# http://localhost:24220/api/plugins |
56 |
+# http://localhost:24220/api/plugins |
34 |
+# http://localhost:24220/api/plugins?type=TYPE |
57 |
+# http://localhost:24220/api/plugins?type=TYPE |
35 |
+# http://localhost:24220/api/plugins?tag=MYTAG |
58 |
+# http://localhost:24220/api/plugins?tag=MYTAG |
36 |
+<source> |
59 |
+<source> |
37 |
+ type monitor_agent |
60 |
+ @type monitor_agent |
|
|
61 |
+ @id monitor_agent_input |
62 |
+ |
38 |
+ port 24220 |
63 |
+ port 24220 |
39 |
+</source> |
64 |
+</source> |
40 |
+ |
65 |
+ |
41 |
+# Listen DRb for debug |
66 |
+# Listen DRb for debug |
42 |
+<source> |
67 |
+<source> |
43 |
+ type debug_agent |
68 |
+ @type debug_agent |
|
|
69 |
+ @id debug_agent_input |
70 |
+ |
44 |
+ bind 127.0.0.1 |
71 |
+ bind 127.0.0.1 |
45 |
+ port 24230 |
72 |
+ port 24230 |
46 |
+</source> |
73 |
+</source> |
47 |
+ |
74 |
+ |
48 |
+ |
|
|
49 |
+## match tag=apache.access and write to file |
75 |
+## match tag=apache.access and write to file |
50 |
+#<match apache.access> |
76 |
+#<match apache.access> |
51 |
+# type file |
77 |
+# @type file |
52 |
+# path /var/log/fluent/access |
78 |
+# path /var/log/fluent/access |
53 |
+#</match> |
79 |
+#</match> |
54 |
+ |
80 |
+ |
55 |
+## match tag=debug.** and dump to console |
81 |
+## match tag=debug.** and dump to console |
56 |
+<match debug.**> |
82 |
+<match debug.**> |
57 |
+ type stdout |
83 |
+ @type stdout |
|
|
84 |
+ @id stdout_output |
58 |
+</match> |
85 |
+</match> |
59 |
+ |
86 |
+ |
60 |
+# match tag=system.** and forward to another fluent server |
87 |
+# match tag=system.** and forward to another fluent server |
61 |
+<match system.**> |
88 |
+<match system.**> |
62 |
+ type forward |
89 |
+ @type forward |
|
|
90 |
+ @id forward_output |
91 |
+ |
63 |
+ <server> |
92 |
+ <server> |
64 |
+ host 192.168.0.11 |
93 |
+ host 192.168.0.11 |
65 |
+ </server> |
94 |
+ </server> |
Lines 72-80
Link Here
|
72 |
+ |
101 |
+ |
73 |
+## match tag=myapp.** and forward and write to file |
102 |
+## match tag=myapp.** and forward and write to file |
74 |
+#<match myapp.**> |
103 |
+#<match myapp.**> |
75 |
+# type copy |
104 |
+# @type copy |
76 |
+# <store> |
105 |
+# <store> |
77 |
+# type forward |
106 |
+# @type forward |
78 |
+# buffer_type file |
107 |
+# buffer_type file |
79 |
+# buffer_path /var/log/fluent/myapp-forward |
108 |
+# buffer_path /var/log/fluent/myapp-forward |
80 |
+# retry_limit 50 |
109 |
+# retry_limit 50 |
Lines 84-103
Link Here
|
84 |
+# </server> |
113 |
+# </server> |
85 |
+# </store> |
114 |
+# </store> |
86 |
+# <store> |
115 |
+# <store> |
87 |
+# type file |
116 |
+# @type file |
88 |
+# path /var/log/fluent/myapp |
117 |
+# path /var/log/fluent/myapp |
89 |
+# </store> |
118 |
+# </store> |
90 |
+#</match> |
119 |
+#</match> |
91 |
+ |
120 |
+ |
92 |
+## match fluent's internal events |
121 |
+## match fluent's internal events |
93 |
+#<match fluent.**> |
122 |
+#<match fluent.**> |
94 |
+# type null |
123 |
+# @type null |
95 |
+#</match> |
124 |
+#</match> |
96 |
+ |
125 |
+ |
97 |
+## match not matched logs and write to file |
126 |
+## match not matched logs and write to file |
98 |
+#<match **> |
127 |
+#<match **> |
99 |
+# type file |
128 |
+# @type file |
100 |
+# path /var/log/fluent/else |
129 |
+# path /var/log/fluent/else |
101 |
+# compress gz |
130 |
+# compress gz |
102 |
+#</match> |
131 |
+#</match> |
103 |
+ |
132 |
+ |
|
|
133 |
+## Label: For handling complex event routing |
134 |
+#<label @STAGING> |
135 |
+# <match system.**> |
136 |
+# @type forward |
137 |
+# @id staging_forward_output |
138 |
+# <server> |
139 |
+# host 192.168.0.101 |
140 |
+# </server> |
141 |
+# </match> |
142 |
+#</label> |