fluentd 0.12.43 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

Files changed (253) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +6 -0
  3. data/.gitignore +2 -0
  4. data/.travis.yml +33 -21
  5. data/CONTRIBUTING.md +1 -0
  6. data/ChangeLog +1239 -0
  7. data/README.md +0 -25
  8. data/Rakefile +2 -1
  9. data/Vagrantfile +17 -0
  10. data/appveyor.yml +35 -0
  11. data/example/filter_stdout.conf +5 -5
  12. data/example/in_forward.conf +2 -2
  13. data/example/in_http.conf +2 -2
  14. data/example/in_out_forward.conf +17 -0
  15. data/example/in_syslog.conf +2 -2
  16. data/example/in_tail.conf +2 -2
  17. data/example/in_tcp.conf +2 -2
  18. data/example/in_udp.conf +2 -2
  19. data/example/out_copy.conf +4 -4
  20. data/example/out_file.conf +2 -2
  21. data/example/out_forward.conf +2 -2
  22. data/example/out_forward_buf_file.conf +23 -0
  23. data/example/v0_12_filter.conf +8 -8
  24. data/fluent.conf +29 -0
  25. data/fluentd.gemspec +18 -11
  26. data/lib/fluent/agent.rb +60 -58
  27. data/lib/fluent/command/cat.rb +1 -1
  28. data/lib/fluent/command/debug.rb +7 -5
  29. data/lib/fluent/command/fluentd.rb +97 -2
  30. data/lib/fluent/compat/call_super_mixin.rb +67 -0
  31. data/lib/fluent/compat/filter.rb +50 -0
  32. data/lib/fluent/compat/formatter.rb +109 -0
  33. data/lib/fluent/compat/input.rb +50 -0
  34. data/lib/fluent/compat/output.rb +617 -0
  35. data/lib/fluent/compat/output_chain.rb +60 -0
  36. data/lib/fluent/compat/parser.rb +163 -0
  37. data/lib/fluent/compat/propagate_default.rb +62 -0
  38. data/lib/fluent/config.rb +23 -20
  39. data/lib/fluent/config/configure_proxy.rb +119 -70
  40. data/lib/fluent/config/dsl.rb +5 -18
  41. data/lib/fluent/config/element.rb +72 -8
  42. data/lib/fluent/config/error.rb +0 -3
  43. data/lib/fluent/config/literal_parser.rb +0 -2
  44. data/lib/fluent/config/parser.rb +4 -4
  45. data/lib/fluent/config/section.rb +39 -28
  46. data/lib/fluent/config/types.rb +2 -13
  47. data/lib/fluent/config/v1_parser.rb +1 -3
  48. data/lib/fluent/configurable.rb +48 -16
  49. data/lib/fluent/daemon.rb +15 -0
  50. data/lib/fluent/engine.rb +26 -52
  51. data/lib/fluent/env.rb +6 -4
  52. data/lib/fluent/event.rb +58 -11
  53. data/lib/fluent/event_router.rb +5 -5
  54. data/lib/fluent/filter.rb +2 -50
  55. data/lib/fluent/formatter.rb +4 -293
  56. data/lib/fluent/input.rb +2 -32
  57. data/lib/fluent/label.rb +2 -2
  58. data/lib/fluent/load.rb +3 -2
  59. data/lib/fluent/log.rb +107 -38
  60. data/lib/fluent/match.rb +0 -36
  61. data/lib/fluent/mixin.rb +117 -7
  62. data/lib/fluent/msgpack_factory.rb +62 -0
  63. data/lib/fluent/output.rb +7 -612
  64. data/lib/fluent/output_chain.rb +23 -0
  65. data/lib/fluent/parser.rb +4 -800
  66. data/lib/fluent/plugin.rb +100 -121
  67. data/lib/fluent/plugin/bare_output.rb +63 -0
  68. data/lib/fluent/plugin/base.rb +121 -0
  69. data/lib/fluent/plugin/buf_file.rb +101 -182
  70. data/lib/fluent/plugin/buf_memory.rb +9 -92
  71. data/lib/fluent/plugin/buffer.rb +473 -0
  72. data/lib/fluent/plugin/buffer/chunk.rb +135 -0
  73. data/lib/fluent/plugin/buffer/file_chunk.rb +339 -0
  74. data/lib/fluent/plugin/buffer/memory_chunk.rb +100 -0
  75. data/lib/fluent/plugin/exec_util.rb +80 -75
  76. data/lib/fluent/plugin/file_util.rb +33 -28
  77. data/lib/fluent/plugin/file_wrapper.rb +120 -0
  78. data/lib/fluent/plugin/filter.rb +51 -0
  79. data/lib/fluent/plugin/filter_grep.rb +13 -40
  80. data/lib/fluent/plugin/filter_record_transformer.rb +22 -18
  81. data/lib/fluent/plugin/formatter.rb +93 -0
  82. data/lib/fluent/plugin/formatter_csv.rb +48 -0
  83. data/lib/fluent/plugin/formatter_hash.rb +32 -0
  84. data/lib/fluent/plugin/formatter_json.rb +47 -0
  85. data/lib/fluent/plugin/formatter_ltsv.rb +42 -0
  86. data/lib/fluent/plugin/formatter_msgpack.rb +32 -0
  87. data/lib/fluent/plugin/formatter_out_file.rb +45 -0
  88. data/lib/fluent/plugin/formatter_single_value.rb +34 -0
  89. data/lib/fluent/plugin/formatter_stdout.rb +39 -0
  90. data/lib/fluent/plugin/in_debug_agent.rb +4 -0
  91. data/lib/fluent/plugin/in_dummy.rb +22 -18
  92. data/lib/fluent/plugin/in_exec.rb +18 -8
  93. data/lib/fluent/plugin/in_forward.rb +36 -79
  94. data/lib/fluent/plugin/in_gc_stat.rb +4 -0
  95. data/lib/fluent/plugin/in_http.rb +21 -18
  96. data/lib/fluent/plugin/in_monitor_agent.rb +15 -48
  97. data/lib/fluent/plugin/in_object_space.rb +6 -1
  98. data/lib/fluent/plugin/in_stream.rb +7 -3
  99. data/lib/fluent/plugin/in_syslog.rb +46 -95
  100. data/lib/fluent/plugin/in_tail.rb +58 -640
  101. data/lib/fluent/plugin/in_tcp.rb +8 -1
  102. data/lib/fluent/plugin/in_udp.rb +8 -18
  103. data/lib/fluent/plugin/input.rb +33 -0
  104. data/lib/fluent/plugin/multi_output.rb +95 -0
  105. data/lib/fluent/plugin/out_buffered_null.rb +59 -0
  106. data/lib/fluent/plugin/out_copy.rb +11 -7
  107. data/lib/fluent/plugin/out_exec.rb +15 -11
  108. data/lib/fluent/plugin/out_exec_filter.rb +18 -10
  109. data/lib/fluent/plugin/out_file.rb +34 -5
  110. data/lib/fluent/plugin/out_forward.rb +25 -19
  111. data/lib/fluent/plugin/out_null.rb +0 -14
  112. data/lib/fluent/plugin/out_roundrobin.rb +11 -7
  113. data/lib/fluent/plugin/out_stdout.rb +5 -7
  114. data/lib/fluent/plugin/out_stream.rb +3 -1
  115. data/lib/fluent/plugin/output.rb +979 -0
  116. data/lib/fluent/plugin/owned_by_mixin.rb +42 -0
  117. data/lib/fluent/plugin/parser.rb +244 -0
  118. data/lib/fluent/plugin/parser_apache.rb +24 -0
  119. data/lib/fluent/plugin/parser_apache2.rb +84 -0
  120. data/lib/fluent/plugin/parser_apache_error.rb +21 -0
  121. data/lib/fluent/plugin/parser_csv.rb +31 -0
  122. data/lib/fluent/plugin/parser_json.rb +79 -0
  123. data/lib/fluent/plugin/parser_ltsv.rb +50 -0
  124. data/lib/fluent/plugin/parser_multiline.rb +102 -0
  125. data/lib/fluent/plugin/parser_nginx.rb +24 -0
  126. data/lib/fluent/plugin/parser_none.rb +36 -0
  127. data/lib/fluent/plugin/parser_syslog.rb +82 -0
  128. data/lib/fluent/plugin/parser_tsv.rb +37 -0
  129. data/lib/fluent/plugin/socket_util.rb +119 -117
  130. data/lib/fluent/plugin/storage.rb +84 -0
  131. data/lib/fluent/plugin/storage_local.rb +116 -0
  132. data/lib/fluent/plugin/string_util.rb +16 -13
  133. data/lib/fluent/plugin_helper.rb +39 -0
  134. data/lib/fluent/plugin_helper/child_process.rb +298 -0
  135. data/lib/fluent/plugin_helper/compat_parameters.rb +99 -0
  136. data/lib/fluent/plugin_helper/event_emitter.rb +80 -0
  137. data/lib/fluent/plugin_helper/event_loop.rb +118 -0
  138. data/lib/fluent/plugin_helper/retry_state.rb +177 -0
  139. data/lib/fluent/plugin_helper/storage.rb +308 -0
  140. data/lib/fluent/plugin_helper/thread.rb +147 -0
  141. data/lib/fluent/plugin_helper/timer.rb +85 -0
  142. data/lib/fluent/plugin_id.rb +63 -0
  143. data/lib/fluent/process.rb +21 -30
  144. data/lib/fluent/registry.rb +21 -9
  145. data/lib/fluent/root_agent.rb +115 -40
  146. data/lib/fluent/supervisor.rb +330 -320
  147. data/lib/fluent/system_config.rb +42 -18
  148. data/lib/fluent/test.rb +6 -1
  149. data/lib/fluent/test/base.rb +23 -3
  150. data/lib/fluent/test/driver/base.rb +247 -0
  151. data/lib/fluent/test/driver/event_feeder.rb +98 -0
  152. data/lib/fluent/test/driver/filter.rb +35 -0
  153. data/lib/fluent/test/driver/input.rb +31 -0
  154. data/lib/fluent/test/driver/output.rb +78 -0
  155. data/lib/fluent/test/driver/test_event_router.rb +45 -0
  156. data/lib/fluent/test/filter_test.rb +0 -1
  157. data/lib/fluent/test/formatter_test.rb +2 -1
  158. data/lib/fluent/test/input_test.rb +23 -17
  159. data/lib/fluent/test/output_test.rb +28 -39
  160. data/lib/fluent/test/parser_test.rb +1 -1
  161. data/lib/fluent/time.rb +104 -1
  162. data/lib/fluent/{status.rb → unique_id.rb} +15 -24
  163. data/lib/fluent/version.rb +1 -1
  164. data/lib/fluent/winsvc.rb +72 -0
  165. data/test/compat/test_calls_super.rb +164 -0
  166. data/test/config/test_config_parser.rb +83 -0
  167. data/test/config/test_configurable.rb +547 -274
  168. data/test/config/test_configure_proxy.rb +146 -29
  169. data/test/config/test_dsl.rb +3 -181
  170. data/test/config/test_element.rb +274 -0
  171. data/test/config/test_literal_parser.rb +1 -1
  172. data/test/config/test_section.rb +79 -7
  173. data/test/config/test_system_config.rb +21 -0
  174. data/test/config/test_types.rb +3 -26
  175. data/test/helper.rb +78 -8
  176. data/test/plugin/test_bare_output.rb +118 -0
  177. data/test/plugin/test_base.rb +75 -0
  178. data/test/plugin/test_buf_file.rb +420 -521
  179. data/test/plugin/test_buf_memory.rb +32 -194
  180. data/test/plugin/test_buffer.rb +981 -0
  181. data/test/plugin/test_buffer_chunk.rb +110 -0
  182. data/test/plugin/test_buffer_file_chunk.rb +770 -0
  183. data/test/plugin/test_buffer_memory_chunk.rb +265 -0
  184. data/test/plugin/test_filter.rb +255 -0
  185. data/test/plugin/test_filter_grep.rb +2 -73
  186. data/test/plugin/test_filter_record_transformer.rb +24 -68
  187. data/test/plugin/test_filter_stdout.rb +6 -6
  188. data/test/plugin/test_in_debug_agent.rb +2 -0
  189. data/test/plugin/test_in_dummy.rb +11 -17
  190. data/test/plugin/test_in_exec.rb +6 -25
  191. data/test/plugin/test_in_forward.rb +112 -151
  192. data/test/plugin/test_in_gc_stat.rb +2 -0
  193. data/test/plugin/test_in_http.rb +106 -157
  194. data/test/plugin/test_in_object_space.rb +21 -5
  195. data/test/plugin/test_in_stream.rb +14 -13
  196. data/test/plugin/test_in_syslog.rb +30 -275
  197. data/test/plugin/test_in_tail.rb +95 -282
  198. data/test/plugin/test_in_tcp.rb +14 -0
  199. data/test/plugin/test_in_udp.rb +21 -67
  200. data/test/plugin/test_input.rb +122 -0
  201. data/test/plugin/test_multi_output.rb +180 -0
  202. data/test/plugin/test_out_buffered_null.rb +79 -0
  203. data/test/plugin/test_out_copy.rb +15 -2
  204. data/test/plugin/test_out_exec.rb +75 -25
  205. data/test/plugin/test_out_exec_filter.rb +74 -8
  206. data/test/plugin/test_out_file.rb +61 -7
  207. data/test/plugin/test_out_forward.rb +92 -15
  208. data/test/plugin/test_out_roundrobin.rb +1 -0
  209. data/test/plugin/test_out_stdout.rb +22 -13
  210. data/test/plugin/test_out_stream.rb +18 -0
  211. data/test/plugin/test_output.rb +515 -0
  212. data/test/plugin/test_output_as_buffered.rb +1540 -0
  213. data/test/plugin/test_output_as_buffered_overflow.rb +247 -0
  214. data/test/plugin/test_output_as_buffered_retries.rb +808 -0
  215. data/test/plugin/test_output_as_buffered_secondary.rb +776 -0
  216. data/test/plugin/test_output_as_standard.rb +362 -0
  217. data/test/plugin/test_owned_by.rb +35 -0
  218. data/test/plugin/test_storage.rb +167 -0
  219. data/test/plugin/test_storage_local.rb +8 -0
  220. data/test/plugin_helper/test_child_process.rb +599 -0
  221. data/test/plugin_helper/test_compat_parameters.rb +175 -0
  222. data/test/plugin_helper/test_event_emitter.rb +51 -0
  223. data/test/plugin_helper/test_event_loop.rb +52 -0
  224. data/test/plugin_helper/test_retry_state.rb +399 -0
  225. data/test/plugin_helper/test_storage.rb +411 -0
  226. data/test/plugin_helper/test_thread.rb +164 -0
  227. data/test/plugin_helper/test_timer.rb +100 -0
  228. data/test/scripts/exec_script.rb +0 -6
  229. data/test/scripts/fluent/plugin/out_test.rb +3 -0
  230. data/test/test_config.rb +13 -4
  231. data/test/test_event.rb +24 -13
  232. data/test/test_event_router.rb +8 -7
  233. data/test/test_event_time.rb +187 -0
  234. data/test/test_formatter.rb +13 -51
  235. data/test/test_input.rb +1 -1
  236. data/test/test_log.rb +239 -16
  237. data/test/test_mixin.rb +1 -1
  238. data/test/test_output.rb +53 -66
  239. data/test/test_parser.rb +105 -323
  240. data/test/test_plugin_helper.rb +81 -0
  241. data/test/test_root_agent.rb +4 -52
  242. data/test/test_supervisor.rb +272 -0
  243. data/test/test_unique_id.rb +47 -0
  244. metadata +181 -55
  245. data/CHANGELOG.md +0 -710
  246. data/lib/fluent/buffer.rb +0 -365
  247. data/lib/fluent/plugin/filter_parser.rb +0 -107
  248. data/lib/fluent/plugin/in_status.rb +0 -76
  249. data/lib/fluent/test/helpers.rb +0 -86
  250. data/test/plugin/data/log/foo/bar2 +0 -0
  251. data/test/plugin/test_filter_parser.rb +0 -744
  252. data/test/plugin/test_in_status.rb +0 -38
  253. data/test/test_buffer.rb +0 -624
data/README.md CHANGED
@@ -26,31 +26,6 @@ Mobile/Web Application Logging | Fluentd can function as middleware to enable as
26
26
  $ fluentd -c conf/fluent.conf &
27
27
  $ echo '{"json":"message"}' | fluent-cat debug.test
28
28
 
29
- ## Development
30
-
31
- ### Prerequisites
32
-
33
- - Ruby 2.1 or later
34
- - git
35
-
36
- `git` should be in `PATH`. On Windows, you can use `Github for Windows` and `GitShell` for easy setup.
37
-
38
- ### Install dependent gems
39
-
40
- Use bundler:
41
-
42
- $ gem install bundler
43
- $ bundle install --path vendor/bundle
44
-
45
- ### Run test
46
-
47
- $ bundle exec rake test
48
-
49
- You can run specified test via `TEST` environment variable:
50
-
51
- $ bundle exec rake test TEST=test/test_specified_path.rb
52
- $ bundle exec rake test TEST=test/test_*.rb
53
-
54
29
  ## Fluentd UI: Admin GUI
55
30
 
56
31
  [Fluentd UI](https://github.com/fluent/fluentd-ui) is a graphical user interface to start/stop/configure Fluentd.
data/Rakefile CHANGED
@@ -15,7 +15,8 @@ Rake::TestTask.new(:base_test) do |t|
15
15
  t.libs << "test"
16
16
  t.test_files = Dir["test/**/test_*.rb"].sort
17
17
  t.verbose = true
18
- #t.warning = true
18
+ t.warning = true
19
+ t.ruby_opts = ["-Eascii-8bit:ascii-8bit"]
19
20
  end
20
21
 
21
22
  task :parallel_test do
data/Vagrantfile ADDED
@@ -0,0 +1,17 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.configure(2) do |config|
5
+ config.vm.box = "ubuntu/trusty64"
6
+ config.vm.network "private_network", type: "dhcp"
7
+ config.vm.provision "shell", inline: <<-SHELL
8
+ sudo apt-get install -y software-properties-common
9
+ sudo apt-add-repository ppa:brightbox/ruby-ng
10
+ sudo apt-get update
11
+ sudo apt-get install -y build-essential git ruby2.3 ruby2.3-dev
12
+ sudo apt-get install -y ruby-switch
13
+ sudo ruby-switch --set ruby2.3
14
+ gem install bundler
15
+ (cd /vagrant; bundle install)
16
+ SHELL
17
+ end
data/appveyor.yml ADDED
@@ -0,0 +1,35 @@
1
+ version: '{build}'
2
+
3
+ # init:
4
+ # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
5
+
6
+ install:
7
+ - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
8
+ - "%devkit%\\devkitvars.bat"
9
+ - ruby --version
10
+ - gem --version
11
+ - bundle install
12
+ build: off
13
+ test_script:
14
+ - bundle exec rake test TESTOPTS=-v
15
+
16
+ branches:
17
+ only:
18
+ - master
19
+ - v0.10
20
+ - v0.12
21
+ - v0.14
22
+
23
+ environment:
24
+ matrix:
25
+ - ruby_version: "22-x64"
26
+ devkit: C:\Ruby23-x64\DevKit
27
+ - ruby_version: "22"
28
+ devkit: C:\Ruby23\DevKit
29
+ - ruby_version: "21-x64"
30
+ devkit: C:\Ruby23-x64\DevKit
31
+ - ruby_version: "21"
32
+ devkit: C:\Ruby23\DevKit
33
+ matrix:
34
+ allow_failures:
35
+ - ruby_version: "21"
@@ -1,22 +1,22 @@
1
1
  <source>
2
- @type dummy
2
+ type dummy
3
3
  tag dummy
4
4
  </source>
5
5
 
6
6
  <filter **>
7
- @type stdout
7
+ type stdout
8
8
  </filter>
9
9
 
10
10
  <filter **>
11
- @type stdout
11
+ type stdout
12
12
  output_type hash
13
13
  </filter>
14
14
 
15
15
  <filter **>
16
- @type stdout
16
+ type stdout
17
17
  format ltsv
18
18
  </filter>
19
19
 
20
20
  <match **>
21
- @type null
21
+ type null
22
22
  </match>
@@ -1,7 +1,7 @@
1
1
  <source>
2
- @type forward
2
+ type forward
3
3
  </source>
4
4
 
5
5
  <match test>
6
- @type stdout
6
+ type stdout
7
7
  </match>
data/example/in_http.conf CHANGED
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type http
2
+ type http
3
3
  bind 0.0.0.0
4
4
  port 9880
5
5
  body_size_limit 32MB
@@ -10,5 +10,5 @@
10
10
  </source>
11
11
 
12
12
  <match test>
13
- @type stdout
13
+ type stdout
14
14
  </match>
@@ -0,0 +1,17 @@
1
+ <source>
2
+ @type forward
3
+ port 24224
4
+ </source>
5
+
6
+ <match test.**>
7
+ @type forward
8
+ buffer_type file
9
+ buffer_path /tmp/fluentd.forward.buffer
10
+ num_threads 10
11
+ flush_interval 1s
12
+ <server>
13
+ host 127.0.0.1
14
+ port 24225
15
+ </server>
16
+ </match>
17
+
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type syslog
2
+ type syslog
3
3
  bind 0.0.0.0
4
4
  port 5140
5
5
  tag test
@@ -11,5 +11,5 @@
11
11
  </source>
12
12
 
13
13
  <match test>
14
- @type stdout
14
+ type stdout
15
15
  </match>
data/example/in_tail.conf CHANGED
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type tail
2
+ type tail
3
3
  format none
4
4
  path /var/log/fluentd_test.log
5
5
  pos_file /var/log/fluentd_test.pos
@@ -10,5 +10,5 @@
10
10
  </source>
11
11
 
12
12
  <match test>
13
- @type stdout
13
+ type stdout
14
14
  </match>
data/example/in_tcp.conf CHANGED
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type tcp
2
+ type tcp
3
3
  format none
4
4
  bind 0.0.0.0
5
5
  port 5170
@@ -9,5 +9,5 @@
9
9
  </source>
10
10
 
11
11
  <match test>
12
- @type stdout
12
+ type stdout
13
13
  </match>
data/example/in_udp.conf CHANGED
@@ -1,5 +1,5 @@
1
1
  <source>
2
- @type udp
2
+ type udp
3
3
  format none
4
4
  bind 0.0.0.0
5
5
  port 5160
@@ -9,5 +9,5 @@
9
9
  </source>
10
10
 
11
11
  <match test>
12
- @type stdout
12
+ type stdout
13
13
  </match>
@@ -1,15 +1,15 @@
1
1
  <source>
2
- @type forward
2
+ type forward
3
3
  </source>
4
4
 
5
5
  <match test>
6
- @type copy
6
+ type copy
7
7
  deep_copy false
8
8
  <store>
9
- @type stdout
9
+ type stdout
10
10
  </store>
11
11
  <store>
12
- @type file
12
+ type file
13
13
  path /var/log/fluentd/out_file_test
14
14
  format json
15
15
  buffer_type memory
@@ -1,9 +1,9 @@
1
1
  <source>
2
- @type forward
2
+ type forward
3
3
  </source>
4
4
 
5
5
  <match test>
6
- @type file
6
+ type file
7
7
  path /var/log/fluentd/out_file_test
8
8
  format json
9
9
  buffer_type memory
@@ -1,10 +1,10 @@
1
1
  <source>
2
- @type dummy
2
+ type dummy
3
3
  tag test
4
4
  </source>
5
5
 
6
6
  <match test>
7
- @type forward
7
+ type forward
8
8
 
9
9
  <server>
10
10
  # first server
@@ -0,0 +1,23 @@
1
+ <source>
2
+ @type dummy
3
+ tag test
4
+ </source>
5
+
6
+ <source>
7
+ @type monitor_agent
8
+ emit_interval 5
9
+ </source>
10
+
11
+ <match test>
12
+ @type forward
13
+ buffer_path /tmp/fluentd.forward
14
+ buffer_type file
15
+ flush_interval 5
16
+ send_timeout 60
17
+ heartbeat_type tcp
18
+ heartbeat_interval 1
19
+ <server>
20
+ host 127.0.0.1
21
+ port 24224
22
+ </server>
23
+ </match>
@@ -9,7 +9,7 @@
9
9
  # $ echo '{"message":"hello world"}' | fluent-cat foo
10
10
 
11
11
  <source>
12
- @type forward
12
+ type forward
13
13
  port 24224
14
14
  </source>
15
15
 
@@ -21,13 +21,13 @@
21
21
  # - {"messag22":"keep this please"} is filtered out.
22
22
 
23
23
  <filter foo>
24
- @type grep
24
+ type grep
25
25
  regexp1 message keep this
26
26
  </filter>
27
27
 
28
28
  # Matches the events that was kept by the above filter
29
29
  <match foo>
30
- @type stdout
30
+ type stdout
31
31
  </match>
32
32
 
33
33
  # For all events with the tag "bar", add the machine's hostname with
@@ -35,7 +35,7 @@
35
35
  # at 123.4.2.4:24224.
36
36
 
37
37
  <filter bar>
38
- @type record_transformer
38
+ type record_transformer
39
39
  <record>
40
40
  hostname ${hostname}
41
41
  </record>
@@ -44,7 +44,7 @@
44
44
  # By the time it is getting matched here, the event has
45
45
  # the "hostname" field.
46
46
  <match bar>
47
- @type forward
47
+ type forward
48
48
  <server>
49
49
  host 123.4.2.4
50
50
  port 24225
@@ -61,12 +61,12 @@
61
61
  # - {"last_name":"FURUHASHI"} throws an error because it has no field called "name"
62
62
 
63
63
  <filter foo.bar>
64
- @type grep
64
+ type grep
65
65
  exclude1 hello .
66
66
  </filter>
67
67
 
68
68
  <filter foo.bar>
69
- @type record_transformer
69
+ type record_transformer
70
70
  enable_ruby true
71
71
  <record>
72
72
  name ${name.downcase}
@@ -74,5 +74,5 @@
74
74
  </filter>
75
75
 
76
76
  <match foo.bar>
77
- @type stdout
77
+ type stdout
78
78
  </match>
data/fluent.conf CHANGED
@@ -31,6 +31,24 @@
31
31
  # tag apache.access
32
32
  #</source>
33
33
 
34
+ ## Mutating event filter
35
+ ## Add hostname and tag fields to apache.access tag events
36
+ #<filter apache.access>
37
+ # @type record_transformer
38
+ # <record>
39
+ # hostname ${hostname}
40
+ # tag ${tag}
41
+ # </record>
42
+ #</filter>
43
+
44
+ ## Selecting event filter
45
+ ## Remove unnecessary events from apache prefixed tag events
46
+ #<filter apache.**>
47
+ # @type grep
48
+ # include1 method GET # pass only GET in 'method' field
49
+ # exclude1 message debug # remove debug event
50
+ #</filter>
51
+
34
52
  # Listen HTTP for monitoring
35
53
  # http://localhost:24220/api/plugins
36
54
  # http://localhost:24220/api/plugins?type=TYPE
@@ -108,3 +126,14 @@
108
126
  # path /var/log/fluent/else
109
127
  # compress gz
110
128
  #</match>
129
+
130
+ ## Label: For handling complex event routing
131
+ #<label @STAGING>
132
+ # <match system.**>
133
+ # @type forward
134
+ # @id staging_forward_output
135
+ # <server>
136
+ # host 192.168.0.101
137
+ # </server>
138
+ # </match>
139
+ #</label>
data/fluentd.gemspec CHANGED
@@ -17,25 +17,32 @@ Gem::Specification.new do |gem|
17
17
  gem.has_rdoc = false
18
18
  gem.license = "Apache-2.0"
19
19
 
20
- gem.required_ruby_version = '>= 1.9.3'
20
+ gem.required_ruby_version = '>= 2.1'
21
21
 
22
- gem.add_runtime_dependency("msgpack", [">= 0.5.11", "< 2"])
22
+ gem.add_runtime_dependency("msgpack", [">= 0.7.0"])
23
23
  gem.add_runtime_dependency("json", [">= 1.4.3"])
24
24
  gem.add_runtime_dependency("yajl-ruby", ["~> 1.0"])
25
- gem.add_runtime_dependency("cool.io", [">= 1.2.2", "< 2.0.0"])
25
+ gem.add_runtime_dependency("cool.io", [">= 1.4.3", "< 2.0.0"])
26
+ gem.add_runtime_dependency("serverengine", [">= 1.6.4"])
26
27
  gem.add_runtime_dependency("http_parser.rb", [">= 0.5.1", "< 0.7.0"])
27
28
  gem.add_runtime_dependency("sigdump", ["~> 0.2.2"])
28
29
  gem.add_runtime_dependency("tzinfo", [">= 1.0.0"])
29
30
  gem.add_runtime_dependency("tzinfo-data", [">= 1.0.0"])
30
- gem.add_runtime_dependency("string-scrub", [">= 0.0.3", "<= 0.0.5"])
31
+ if /mswin|mingw/ =~ RUBY_PLATFORM
32
+ gem.add_runtime_dependency("win32-service", ["~> 0.8.3"])
33
+ gem.add_runtime_dependency("win32-ipc", ["~> 0.6.1"])
34
+ gem.add_runtime_dependency("win32-event", ["~> 0.6.1"])
35
+ gem.add_runtime_dependency("windows-pr", ["~> 1.2.3"])
36
+ end
37
+ gem.add_runtime_dependency("strptime", [">= 0.1.7"])
31
38
 
32
39
  gem.add_development_dependency("rake", [">= 0.9.2"])
33
- gem.add_development_dependency("flexmock", ["~> 2.0"])
34
- gem.add_development_dependency("parallel_tests", ["~> 0.15.3"])
35
- gem.add_development_dependency("simplecov", ["~> 0.7"])
36
- gem.add_development_dependency("rr", ["~> 1.0"])
37
- gem.add_development_dependency("timecop", ["~> 0.3"])
38
- gem.add_development_dependency("test-unit", ["~> 3.2"])
39
- gem.add_development_dependency("test-unit-rr", ["~> 1.0"])
40
+ gem.add_development_dependency("flexmock", ["~> 2.0.5"])
41
+ gem.add_development_dependency("parallel_tests", [">= 0.15.3"])
42
+ gem.add_development_dependency("simplecov", ["~> 0.6.4"])
43
+ gem.add_development_dependency("rr", [">= 1.0.0"])
44
+ gem.add_development_dependency("timecop", [">= 0.3.0"])
45
+ gem.add_development_dependency("test-unit", ["~> 3.1.4"])
46
+ gem.add_development_dependency("test-unit-rr", ["~> 1.0.3"])
40
47
  gem.add_development_dependency("oj", ["~> 2.14"])
41
48
  end