fluentd-hubspot 0.14.14.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.github/ISSUE_TEMPLATE.md +6 -0
- data/.gitignore +28 -0
- data/.travis.yml +51 -0
- data/AUTHORS +2 -0
- data/CONTRIBUTING.md +42 -0
- data/COPYING +14 -0
- data/ChangeLog +593 -0
- data/Gemfile +9 -0
- data/README.md +76 -0
- data/Rakefile +74 -0
- data/Vagrantfile +17 -0
- data/appveyor.yml +43 -0
- data/bin/fluent-binlog-reader +7 -0
- data/bin/fluent-debug +5 -0
- data/bin/fluent-plugin-config-format +5 -0
- data/bin/fluent-plugin-generate +5 -0
- data/code-of-conduct.md +3 -0
- data/example/copy_roundrobin.conf +39 -0
- data/example/filter_stdout.conf +22 -0
- data/example/in_dummy_blocks.conf +17 -0
- data/example/in_dummy_with_compression.conf +23 -0
- data/example/in_forward.conf +14 -0
- data/example/in_forward_client.conf +37 -0
- data/example/in_forward_shared_key.conf +15 -0
- data/example/in_forward_tls.conf +14 -0
- data/example/in_forward_users.conf +24 -0
- data/example/in_forward_workers.conf +21 -0
- data/example/in_http.conf +14 -0
- data/example/in_out_forward.conf +17 -0
- data/example/in_syslog.conf +15 -0
- data/example/in_tail.conf +14 -0
- data/example/in_tcp.conf +13 -0
- data/example/in_udp.conf +13 -0
- data/example/logevents.conf +25 -0
- data/example/multi_filters.conf +61 -0
- data/example/out_copy.conf +20 -0
- data/example/out_exec_filter.conf +42 -0
- data/example/out_file.conf +13 -0
- data/example/out_forward.conf +35 -0
- data/example/out_forward_buf_file.conf +23 -0
- data/example/out_forward_client.conf +109 -0
- data/example/out_forward_heartbeat_none.conf +16 -0
- data/example/out_forward_shared_key.conf +36 -0
- data/example/out_forward_tls.conf +18 -0
- data/example/out_forward_users.conf +65 -0
- data/example/out_null.conf +36 -0
- data/example/secondary_file.conf +41 -0
- data/example/suppress_config_dump.conf +7 -0
- data/example/v0_12_filter.conf +78 -0
- data/example/v1_literal_example.conf +36 -0
- data/fluent.conf +139 -0
- data/fluentd.gemspec +51 -0
- data/lib/fluent/agent.rb +163 -0
- data/lib/fluent/clock.rb +62 -0
- data/lib/fluent/command/binlog_reader.rb +234 -0
- data/lib/fluent/command/bundler_injection.rb +45 -0
- data/lib/fluent/command/cat.rb +330 -0
- data/lib/fluent/command/debug.rb +102 -0
- data/lib/fluent/command/fluentd.rb +301 -0
- data/lib/fluent/command/plugin_config_formatter.rb +258 -0
- data/lib/fluent/command/plugin_generator.rb +301 -0
- data/lib/fluent/compat/call_super_mixin.rb +67 -0
- data/lib/fluent/compat/detach_process_mixin.rb +25 -0
- data/lib/fluent/compat/exec_util.rb +129 -0
- data/lib/fluent/compat/file_util.rb +54 -0
- data/lib/fluent/compat/filter.rb +68 -0
- data/lib/fluent/compat/formatter.rb +111 -0
- data/lib/fluent/compat/formatter_utils.rb +85 -0
- data/lib/fluent/compat/handle_tag_and_time_mixin.rb +62 -0
- data/lib/fluent/compat/handle_tag_name_mixin.rb +53 -0
- data/lib/fluent/compat/input.rb +59 -0
- data/lib/fluent/compat/output.rb +728 -0
- data/lib/fluent/compat/output_chain.rb +60 -0
- data/lib/fluent/compat/parser.rb +310 -0
- data/lib/fluent/compat/parser_utils.rb +40 -0
- data/lib/fluent/compat/propagate_default.rb +62 -0
- data/lib/fluent/compat/record_filter_mixin.rb +34 -0
- data/lib/fluent/compat/set_tag_key_mixin.rb +50 -0
- data/lib/fluent/compat/set_time_key_mixin.rb +69 -0
- data/lib/fluent/compat/socket_util.rb +165 -0
- data/lib/fluent/compat/string_util.rb +34 -0
- data/lib/fluent/compat/structured_format_mixin.rb +26 -0
- data/lib/fluent/compat/type_converter.rb +90 -0
- data/lib/fluent/config.rb +56 -0
- data/lib/fluent/config/basic_parser.rb +123 -0
- data/lib/fluent/config/configure_proxy.rb +418 -0
- data/lib/fluent/config/dsl.rb +149 -0
- data/lib/fluent/config/element.rb +218 -0
- data/lib/fluent/config/error.rb +26 -0
- data/lib/fluent/config/literal_parser.rb +251 -0
- data/lib/fluent/config/parser.rb +107 -0
- data/lib/fluent/config/section.rb +223 -0
- data/lib/fluent/config/types.rb +136 -0
- data/lib/fluent/config/v1_parser.rb +190 -0
- data/lib/fluent/configurable.rb +200 -0
- data/lib/fluent/daemon.rb +15 -0
- data/lib/fluent/engine.rb +266 -0
- data/lib/fluent/env.rb +28 -0
- data/lib/fluent/error.rb +30 -0
- data/lib/fluent/event.rb +334 -0
- data/lib/fluent/event_router.rb +269 -0
- data/lib/fluent/filter.rb +21 -0
- data/lib/fluent/formatter.rb +23 -0
- data/lib/fluent/input.rb +21 -0
- data/lib/fluent/label.rb +46 -0
- data/lib/fluent/load.rb +35 -0
- data/lib/fluent/log.rb +546 -0
- data/lib/fluent/match.rb +178 -0
- data/lib/fluent/mixin.rb +31 -0
- data/lib/fluent/msgpack_factory.rb +62 -0
- data/lib/fluent/output.rb +29 -0
- data/lib/fluent/output_chain.rb +23 -0
- data/lib/fluent/parser.rb +23 -0
- data/lib/fluent/plugin.rb +183 -0
- data/lib/fluent/plugin/bare_output.rb +63 -0
- data/lib/fluent/plugin/base.rb +165 -0
- data/lib/fluent/plugin/buf_file.rb +184 -0
- data/lib/fluent/plugin/buf_memory.rb +34 -0
- data/lib/fluent/plugin/buffer.rb +617 -0
- data/lib/fluent/plugin/buffer/chunk.rb +221 -0
- data/lib/fluent/plugin/buffer/file_chunk.rb +364 -0
- data/lib/fluent/plugin/buffer/memory_chunk.rb +90 -0
- data/lib/fluent/plugin/compressable.rb +92 -0
- data/lib/fluent/plugin/exec_util.rb +22 -0
- data/lib/fluent/plugin/file_util.rb +22 -0
- data/lib/fluent/plugin/file_wrapper.rb +120 -0
- data/lib/fluent/plugin/filter.rb +93 -0
- data/lib/fluent/plugin/filter_grep.rb +75 -0
- data/lib/fluent/plugin/filter_parser.rb +119 -0
- data/lib/fluent/plugin/filter_record_transformer.rb +322 -0
- data/lib/fluent/plugin/filter_stdout.rb +53 -0
- data/lib/fluent/plugin/formatter.rb +50 -0
- data/lib/fluent/plugin/formatter_csv.rb +52 -0
- data/lib/fluent/plugin/formatter_hash.rb +33 -0
- data/lib/fluent/plugin/formatter_json.rb +55 -0
- data/lib/fluent/plugin/formatter_ltsv.rb +42 -0
- data/lib/fluent/plugin/formatter_msgpack.rb +33 -0
- data/lib/fluent/plugin/formatter_out_file.rb +51 -0
- data/lib/fluent/plugin/formatter_single_value.rb +34 -0
- data/lib/fluent/plugin/formatter_stdout.rb +75 -0
- data/lib/fluent/plugin/formatter_tsv.rb +34 -0
- data/lib/fluent/plugin/in_debug_agent.rb +64 -0
- data/lib/fluent/plugin/in_dummy.rb +139 -0
- data/lib/fluent/plugin/in_exec.rb +108 -0
- data/lib/fluent/plugin/in_forward.rb +455 -0
- data/lib/fluent/plugin/in_gc_stat.rb +56 -0
- data/lib/fluent/plugin/in_http.rb +433 -0
- data/lib/fluent/plugin/in_monitor_agent.rb +448 -0
- data/lib/fluent/plugin/in_object_space.rb +93 -0
- data/lib/fluent/plugin/in_syslog.rb +209 -0
- data/lib/fluent/plugin/in_tail.rb +905 -0
- data/lib/fluent/plugin/in_tcp.rb +85 -0
- data/lib/fluent/plugin/in_udp.rb +81 -0
- data/lib/fluent/plugin/in_unix.rb +201 -0
- data/lib/fluent/plugin/input.rb +37 -0
- data/lib/fluent/plugin/multi_output.rb +157 -0
- data/lib/fluent/plugin/out_copy.rb +46 -0
- data/lib/fluent/plugin/out_exec.rb +105 -0
- data/lib/fluent/plugin/out_exec_filter.rb +317 -0
- data/lib/fluent/plugin/out_file.rb +302 -0
- data/lib/fluent/plugin/out_forward.rb +912 -0
- data/lib/fluent/plugin/out_null.rb +74 -0
- data/lib/fluent/plugin/out_relabel.rb +32 -0
- data/lib/fluent/plugin/out_roundrobin.rb +84 -0
- data/lib/fluent/plugin/out_secondary_file.rb +133 -0
- data/lib/fluent/plugin/out_stdout.rb +75 -0
- data/lib/fluent/plugin/out_stream.rb +130 -0
- data/lib/fluent/plugin/output.rb +1291 -0
- data/lib/fluent/plugin/owned_by_mixin.rb +42 -0
- data/lib/fluent/plugin/parser.rb +191 -0
- data/lib/fluent/plugin/parser_apache.rb +28 -0
- data/lib/fluent/plugin/parser_apache2.rb +84 -0
- data/lib/fluent/plugin/parser_apache_error.rb +26 -0
- data/lib/fluent/plugin/parser_csv.rb +39 -0
- data/lib/fluent/plugin/parser_json.rb +81 -0
- data/lib/fluent/plugin/parser_ltsv.rb +42 -0
- data/lib/fluent/plugin/parser_msgpack.rb +50 -0
- data/lib/fluent/plugin/parser_multiline.rb +105 -0
- data/lib/fluent/plugin/parser_nginx.rb +28 -0
- data/lib/fluent/plugin/parser_none.rb +36 -0
- data/lib/fluent/plugin/parser_regexp.rb +63 -0
- data/lib/fluent/plugin/parser_syslog.rb +121 -0
- data/lib/fluent/plugin/parser_tsv.rb +42 -0
- data/lib/fluent/plugin/socket_util.rb +22 -0
- data/lib/fluent/plugin/storage.rb +84 -0
- data/lib/fluent/plugin/storage_local.rb +159 -0
- data/lib/fluent/plugin/string_util.rb +22 -0
- data/lib/fluent/plugin_helper.rb +70 -0
- data/lib/fluent/plugin_helper/cert_option.rb +159 -0
- data/lib/fluent/plugin_helper/child_process.rb +364 -0
- data/lib/fluent/plugin_helper/compat_parameters.rb +331 -0
- data/lib/fluent/plugin_helper/event_emitter.rb +93 -0
- data/lib/fluent/plugin_helper/event_loop.rb +161 -0
- data/lib/fluent/plugin_helper/extract.rb +104 -0
- data/lib/fluent/plugin_helper/formatter.rb +147 -0
- data/lib/fluent/plugin_helper/inject.rb +151 -0
- data/lib/fluent/plugin_helper/parser.rb +147 -0
- data/lib/fluent/plugin_helper/retry_state.rb +201 -0
- data/lib/fluent/plugin_helper/server.rb +738 -0
- data/lib/fluent/plugin_helper/socket.rb +241 -0
- data/lib/fluent/plugin_helper/socket_option.rb +69 -0
- data/lib/fluent/plugin_helper/storage.rb +349 -0
- data/lib/fluent/plugin_helper/thread.rb +179 -0
- data/lib/fluent/plugin_helper/timer.rb +91 -0
- data/lib/fluent/plugin_id.rb +80 -0
- data/lib/fluent/process.rb +22 -0
- data/lib/fluent/registry.rb +116 -0
- data/lib/fluent/root_agent.rb +323 -0
- data/lib/fluent/rpc.rb +94 -0
- data/lib/fluent/supervisor.rb +741 -0
- data/lib/fluent/system_config.rb +159 -0
- data/lib/fluent/test.rb +58 -0
- data/lib/fluent/test/base.rb +78 -0
- data/lib/fluent/test/driver/base.rb +224 -0
- data/lib/fluent/test/driver/base_owned.rb +70 -0
- data/lib/fluent/test/driver/base_owner.rb +135 -0
- data/lib/fluent/test/driver/event_feeder.rb +98 -0
- data/lib/fluent/test/driver/filter.rb +57 -0
- data/lib/fluent/test/driver/formatter.rb +30 -0
- data/lib/fluent/test/driver/input.rb +31 -0
- data/lib/fluent/test/driver/multi_output.rb +53 -0
- data/lib/fluent/test/driver/output.rb +102 -0
- data/lib/fluent/test/driver/parser.rb +30 -0
- data/lib/fluent/test/driver/test_event_router.rb +45 -0
- data/lib/fluent/test/filter_test.rb +77 -0
- data/lib/fluent/test/formatter_test.rb +65 -0
- data/lib/fluent/test/helpers.rb +134 -0
- data/lib/fluent/test/input_test.rb +174 -0
- data/lib/fluent/test/log.rb +79 -0
- data/lib/fluent/test/output_test.rb +156 -0
- data/lib/fluent/test/parser_test.rb +70 -0
- data/lib/fluent/test/startup_shutdown.rb +46 -0
- data/lib/fluent/time.rb +412 -0
- data/lib/fluent/timezone.rb +133 -0
- data/lib/fluent/unique_id.rb +39 -0
- data/lib/fluent/version.rb +21 -0
- data/lib/fluent/winsvc.rb +71 -0
- data/templates/new_gem/Gemfile +3 -0
- data/templates/new_gem/README.md.erb +43 -0
- data/templates/new_gem/Rakefile +13 -0
- data/templates/new_gem/fluent-plugin.gemspec.erb +27 -0
- data/templates/new_gem/lib/fluent/plugin/filter.rb.erb +14 -0
- data/templates/new_gem/lib/fluent/plugin/formatter.rb.erb +14 -0
- data/templates/new_gem/lib/fluent/plugin/input.rb.erb +11 -0
- data/templates/new_gem/lib/fluent/plugin/output.rb.erb +11 -0
- data/templates/new_gem/lib/fluent/plugin/parser.rb.erb +15 -0
- data/templates/new_gem/test/helper.rb.erb +8 -0
- data/templates/new_gem/test/plugin/test_filter.rb.erb +18 -0
- data/templates/new_gem/test/plugin/test_formatter.rb.erb +18 -0
- data/templates/new_gem/test/plugin/test_input.rb.erb +18 -0
- data/templates/new_gem/test/plugin/test_output.rb.erb +18 -0
- data/templates/new_gem/test/plugin/test_parser.rb.erb +18 -0
- data/templates/plugin_config_formatter/param.md-compact.erb +25 -0
- data/templates/plugin_config_formatter/param.md.erb +34 -0
- data/templates/plugin_config_formatter/section.md.erb +12 -0
- data/test/command/test_binlog_reader.rb +346 -0
- data/test/command/test_fluentd.rb +618 -0
- data/test/command/test_plugin_config_formatter.rb +275 -0
- data/test/command/test_plugin_generator.rb +66 -0
- data/test/compat/test_calls_super.rb +166 -0
- data/test/compat/test_parser.rb +92 -0
- data/test/config/assertions.rb +42 -0
- data/test/config/test_config_parser.rb +513 -0
- data/test/config/test_configurable.rb +1587 -0
- data/test/config/test_configure_proxy.rb +566 -0
- data/test/config/test_dsl.rb +415 -0
- data/test/config/test_element.rb +403 -0
- data/test/config/test_literal_parser.rb +297 -0
- data/test/config/test_section.rb +184 -0
- data/test/config/test_system_config.rb +168 -0
- data/test/config/test_types.rb +191 -0
- data/test/helper.rb +153 -0
- data/test/plugin/data/2010/01/20100102-030405.log +0 -0
- data/test/plugin/data/2010/01/20100102-030406.log +0 -0
- data/test/plugin/data/2010/01/20100102.log +0 -0
- data/test/plugin/data/log/bar +0 -0
- data/test/plugin/data/log/foo/bar.log +0 -0
- data/test/plugin/data/log/foo/bar2 +0 -0
- data/test/plugin/data/log/test.log +0 -0
- data/test/plugin/test_bare_output.rb +118 -0
- data/test/plugin/test_base.rb +115 -0
- data/test/plugin/test_buf_file.rb +843 -0
- data/test/plugin/test_buf_memory.rb +42 -0
- data/test/plugin/test_buffer.rb +1220 -0
- data/test/plugin/test_buffer_chunk.rb +198 -0
- data/test/plugin/test_buffer_file_chunk.rb +844 -0
- data/test/plugin/test_buffer_memory_chunk.rb +338 -0
- data/test/plugin/test_compressable.rb +84 -0
- data/test/plugin/test_file_util.rb +96 -0
- data/test/plugin/test_filter.rb +357 -0
- data/test/plugin/test_filter_grep.rb +119 -0
- data/test/plugin/test_filter_parser.rb +700 -0
- data/test/plugin/test_filter_record_transformer.rb +556 -0
- data/test/plugin/test_filter_stdout.rb +202 -0
- data/test/plugin/test_formatter_csv.rb +111 -0
- data/test/plugin/test_formatter_hash.rb +35 -0
- data/test/plugin/test_formatter_json.rb +51 -0
- data/test/plugin/test_formatter_ltsv.rb +59 -0
- data/test/plugin/test_formatter_msgpack.rb +28 -0
- data/test/plugin/test_formatter_out_file.rb +95 -0
- data/test/plugin/test_formatter_single_value.rb +38 -0
- data/test/plugin/test_in_debug_agent.rb +28 -0
- data/test/plugin/test_in_dummy.rb +192 -0
- data/test/plugin/test_in_exec.rb +245 -0
- data/test/plugin/test_in_forward.rb +1120 -0
- data/test/plugin/test_in_gc_stat.rb +39 -0
- data/test/plugin/test_in_http.rb +588 -0
- data/test/plugin/test_in_monitor_agent.rb +516 -0
- data/test/plugin/test_in_object_space.rb +64 -0
- data/test/plugin/test_in_syslog.rb +271 -0
- data/test/plugin/test_in_tail.rb +1216 -0
- data/test/plugin/test_in_tcp.rb +118 -0
- data/test/plugin/test_in_udp.rb +152 -0
- data/test/plugin/test_in_unix.rb +126 -0
- data/test/plugin/test_input.rb +126 -0
- data/test/plugin/test_multi_output.rb +180 -0
- data/test/plugin/test_out_copy.rb +160 -0
- data/test/plugin/test_out_exec.rb +310 -0
- data/test/plugin/test_out_exec_filter.rb +613 -0
- data/test/plugin/test_out_file.rb +873 -0
- data/test/plugin/test_out_forward.rb +685 -0
- data/test/plugin/test_out_null.rb +105 -0
- data/test/plugin/test_out_relabel.rb +28 -0
- data/test/plugin/test_out_roundrobin.rb +146 -0
- data/test/plugin/test_out_secondary_file.rb +442 -0
- data/test/plugin/test_out_stdout.rb +170 -0
- data/test/plugin/test_out_stream.rb +93 -0
- data/test/plugin/test_output.rb +870 -0
- data/test/plugin/test_output_as_buffered.rb +1932 -0
- data/test/plugin/test_output_as_buffered_compress.rb +165 -0
- data/test/plugin/test_output_as_buffered_overflow.rb +250 -0
- data/test/plugin/test_output_as_buffered_retries.rb +839 -0
- data/test/plugin/test_output_as_buffered_secondary.rb +877 -0
- data/test/plugin/test_output_as_standard.rb +374 -0
- data/test/plugin/test_owned_by.rb +35 -0
- data/test/plugin/test_parser.rb +359 -0
- data/test/plugin/test_parser_apache.rb +42 -0
- data/test/plugin/test_parser_apache2.rb +46 -0
- data/test/plugin/test_parser_apache_error.rb +45 -0
- data/test/plugin/test_parser_csv.rb +103 -0
- data/test/plugin/test_parser_json.rb +114 -0
- data/test/plugin/test_parser_labeled_tsv.rb +128 -0
- data/test/plugin/test_parser_multiline.rb +100 -0
- data/test/plugin/test_parser_nginx.rb +48 -0
- data/test/plugin/test_parser_none.rb +52 -0
- data/test/plugin/test_parser_regexp.rb +281 -0
- data/test/plugin/test_parser_syslog.rb +242 -0
- data/test/plugin/test_parser_tsv.rb +122 -0
- data/test/plugin/test_storage.rb +167 -0
- data/test/plugin/test_storage_local.rb +335 -0
- data/test/plugin/test_string_util.rb +26 -0
- data/test/plugin_helper/test_child_process.rb +794 -0
- data/test/plugin_helper/test_compat_parameters.rb +331 -0
- data/test/plugin_helper/test_event_emitter.rb +51 -0
- data/test/plugin_helper/test_event_loop.rb +52 -0
- data/test/plugin_helper/test_extract.rb +194 -0
- data/test/plugin_helper/test_formatter.rb +255 -0
- data/test/plugin_helper/test_inject.rb +519 -0
- data/test/plugin_helper/test_parser.rb +264 -0
- data/test/plugin_helper/test_retry_state.rb +422 -0
- data/test/plugin_helper/test_server.rb +1677 -0
- data/test/plugin_helper/test_storage.rb +542 -0
- data/test/plugin_helper/test_thread.rb +164 -0
- data/test/plugin_helper/test_timer.rb +132 -0
- data/test/scripts/exec_script.rb +32 -0
- data/test/scripts/fluent/plugin/formatter1/formatter_test1.rb +7 -0
- data/test/scripts/fluent/plugin/formatter2/formatter_test2.rb +7 -0
- data/test/scripts/fluent/plugin/formatter_known.rb +8 -0
- data/test/scripts/fluent/plugin/out_test.rb +81 -0
- data/test/scripts/fluent/plugin/out_test2.rb +80 -0
- data/test/scripts/fluent/plugin/parser_known.rb +4 -0
- data/test/test_clock.rb +164 -0
- data/test/test_config.rb +179 -0
- data/test/test_configdsl.rb +148 -0
- data/test/test_event.rb +515 -0
- data/test/test_event_router.rb +331 -0
- data/test/test_event_time.rb +186 -0
- data/test/test_filter.rb +121 -0
- data/test/test_formatter.rb +312 -0
- data/test/test_input.rb +31 -0
- data/test/test_log.rb +828 -0
- data/test/test_match.rb +137 -0
- data/test/test_mixin.rb +351 -0
- data/test/test_output.rb +273 -0
- data/test/test_plugin.rb +251 -0
- data/test/test_plugin_classes.rb +253 -0
- data/test/test_plugin_helper.rb +81 -0
- data/test/test_plugin_id.rb +101 -0
- data/test/test_process.rb +14 -0
- data/test/test_root_agent.rb +611 -0
- data/test/test_supervisor.rb +373 -0
- data/test/test_test_drivers.rb +135 -0
- data/test/test_time_formatter.rb +282 -0
- data/test/test_time_parser.rb +211 -0
- data/test/test_unique_id.rb +47 -0
- metadata +898 -0
data/Gemfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
source 'https://rubygems.org/'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
|
6
|
+
if File.exist?(local_gemfile)
|
7
|
+
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
|
8
|
+
instance_eval File.read(local_gemfile)
|
9
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
Fluentd: Open-Source Log Collector
|
2
|
+
===================================
|
3
|
+
|
4
|
+
[<img src="https://travis-ci.org/fluent/fluentd.svg" />](https://travis-ci.org/fluent/fluentd) [![Code Climate](https://codeclimate.com/github/fluent/fluentd/badges/gpa.svg)](https://codeclimate.com/github/fluent/fluentd)
|
5
|
+
|
6
|
+
[Fluentd](http://fluentd.org/) collects events from various data sources and writes them to files, RDBMS, NoSQL, IaaS, SaaS, Hadoop and so on. Fluentd helps you unify your logging infrastructure (Learn more about the [Unified Logging Layer](http://www.fluentd.org/blog/unified-logging-layer)).
|
7
|
+
|
8
|
+
<p align="center">
|
9
|
+
<img src="http://docs.fluentd.org/images/fluentd-architecture.png" width="500px"/>
|
10
|
+
</p>
|
11
|
+
|
12
|
+
An event consists of *tag*, *time* and *record*. Tag is a string separated with '.' (e.g. myapp.access). It is used to categorize events. Time is a UNIX time recorded at occurrence of an event. Record is a JSON object.
|
13
|
+
|
14
|
+
## Example Use Cases
|
15
|
+
|
16
|
+
Use Case | Description | Diagram
|
17
|
+
-------- | ------------|:---------:
|
18
|
+
Centralizing Apache/Nginx Server Logs | Fluentd can be used to tail access/error logs and transport them reliably to remote systems. | <img src="https://www.fluentd.org/assets/img/recipes/elasticsearch-s3-fluentd.png" height="150"/>
|
19
|
+
Syslog Alerting | Fluentd can "grep" for events and send out alerts. | <img src="https://www.fluentd.org/images/syslog-fluentd-alert.png" height="100"/>
|
20
|
+
Mobile/Web Application Logging | Fluentd can function as middleware to enable asynchronous, scalable logging for user action events. | <img src="https://www.fluentd.org/assets/img/datasources/asynchronous_logging.png" height="150"/>
|
21
|
+
|
22
|
+
## Quick Start
|
23
|
+
|
24
|
+
$ gem install fluentd
|
25
|
+
$ fluentd -s conf
|
26
|
+
$ fluentd -c conf/fluent.conf &
|
27
|
+
$ echo '{"json":"message"}' | fluent-cat debug.test
|
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
|
+
## Fluentd UI: Admin GUI
|
55
|
+
|
56
|
+
[Fluentd UI](https://github.com/fluent/fluentd-ui) is a graphical user interface to start/stop/configure Fluentd.
|
57
|
+
|
58
|
+
<p align="center"><img width="500" src="http://www.fluentd.org/images/blog/fluentd-ui.gif"/></p>
|
59
|
+
|
60
|
+
## More Information
|
61
|
+
|
62
|
+
- Website: http://fluentd.org/
|
63
|
+
- Documentation: http://docs.fluentd.org/
|
64
|
+
- Source repository: http://github.com/fluent
|
65
|
+
- Discussion: http://groups.google.com/group/fluentd
|
66
|
+
- Slack / Community: http://slack.fluentd.org
|
67
|
+
- Newsletters: http://get.treasuredata.com/Fluentd_education
|
68
|
+
- Author: Sadayuki Furuhashi
|
69
|
+
- Copyright: (c) 2011 FURUHASHI Sadayuki
|
70
|
+
- License: Apache License, Version 2.0
|
71
|
+
|
72
|
+
## Contributors:
|
73
|
+
|
74
|
+
Patches contributed by [great developers](https://github.com/fluent/fluentd/contributors).
|
75
|
+
|
76
|
+
[<img src="https://ga-beacon.appspot.com/UA-24890265-6/fluent/fluentd" />](https://github.com/fluent/fluentd)
|
data/Rakefile
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
require 'rake/testtask'
|
6
|
+
require 'rake/clean'
|
7
|
+
|
8
|
+
task test: [:base_test]
|
9
|
+
|
10
|
+
# 1. update ChangeLog and lib/fluent/version.rb
|
11
|
+
# 2. bundle && bundle exec rake build:all
|
12
|
+
# 3. release 3 packages built on pkg/ directory
|
13
|
+
namespace :build do
|
14
|
+
desc 'Build gems for all platforms'
|
15
|
+
task :all do
|
16
|
+
Bundler.with_clean_env do
|
17
|
+
%w[ruby x86-mingw32 x64-mingw32].each do |name|
|
18
|
+
ENV['GEM_BUILD_FAKE_PLATFORM'] = name
|
19
|
+
Rake::Task["build"].execute
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
desc 'Run test_unit based test'
|
26
|
+
Rake::TestTask.new(:base_test) do |t|
|
27
|
+
# To run test with dumping all test case names (to find never ending test case)
|
28
|
+
# $ bundle exec rake test TESTOPTS=-v
|
29
|
+
#
|
30
|
+
# To run test for only one file (or file path pattern)
|
31
|
+
# $ bundle exec rake base_test TEST=test/test_specified_path.rb
|
32
|
+
# $ bundle exec rake base_test TEST=test/test_*.rb
|
33
|
+
t.libs << "test"
|
34
|
+
t.test_files = if ENV["WIN_RAPID"]
|
35
|
+
["test/test_event.rb", "test/test_supervisor.rb", "test/plugin_helper/test_event_loop.rb"]
|
36
|
+
else
|
37
|
+
Dir["test/**/test_*.rb"].sort
|
38
|
+
end
|
39
|
+
t.verbose = true
|
40
|
+
t.warning = true
|
41
|
+
t.ruby_opts = ["-Eascii-8bit:ascii-8bit"]
|
42
|
+
end
|
43
|
+
|
44
|
+
task :parallel_test do
|
45
|
+
FileUtils.rm_rf('./test/tmp')
|
46
|
+
sh("parallel_test ./test/*.rb ./test/plugin/*.rb")
|
47
|
+
FileUtils.rm_rf('./test/tmp')
|
48
|
+
end
|
49
|
+
|
50
|
+
desc 'Run test with simplecov'
|
51
|
+
task :coverage do |t|
|
52
|
+
ENV['SIMPLE_COV'] = '1'
|
53
|
+
Rake::Task["test"].invoke
|
54
|
+
end
|
55
|
+
|
56
|
+
desc 'Build Coverity tarball & upload it'
|
57
|
+
task :coverity do
|
58
|
+
# https://scan.coverity.com/projects/fluentd?tab=overview
|
59
|
+
# See "View Defects" after sign-in.
|
60
|
+
#
|
61
|
+
# Setup steps:
|
62
|
+
# 1. get coverity build tool and set PATH to bin/: https://scan.coverity.com/download
|
63
|
+
# 2. set environment variables:
|
64
|
+
# * $COVERITY_USER (your email address)
|
65
|
+
# * $COVERITY_TOKEN (token for Fluentd project: https://scan.coverity.com/projects/fluentd?tab=project_settings)
|
66
|
+
sh "cov-build --dir cov-int --no-command --fs-capture-search ./"
|
67
|
+
sh "tar czf cov-fluentd.tar.gz cov-int"
|
68
|
+
user = ENV['COVERITY_USER']
|
69
|
+
token = ENV['COVERITY_TOKEN']
|
70
|
+
sh "curl --form token=#{token} --form email=#{user} --form file=@cov-fluentd.tar.gz --form version=\"Master\" --form description=\"GIT Master\" https://scan.coverity.com/builds?project=Fluentd"
|
71
|
+
FileUtils.rm_rf(['./cov-int', 'cov-fluentd.tar.gz'])
|
72
|
+
end
|
73
|
+
|
74
|
+
task default: [:test, :build]
|
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,43 @@
|
|
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
|
15
|
+
# - bundle exec rake test TESTOPTS=-v
|
16
|
+
|
17
|
+
branches:
|
18
|
+
only:
|
19
|
+
- master
|
20
|
+
- v0.10
|
21
|
+
- v0.12
|
22
|
+
- v0.14
|
23
|
+
|
24
|
+
# https://www.appveyor.com/docs/installed-software/#ruby
|
25
|
+
environment:
|
26
|
+
matrix:
|
27
|
+
- ruby_version: "23-x64"
|
28
|
+
devkit: C:\Ruby23-x64\DevKit
|
29
|
+
- ruby_version: "23"
|
30
|
+
devkit: C:\Ruby23\DevKit
|
31
|
+
- ruby_version: "22-x64"
|
32
|
+
devkit: C:\Ruby23-x64\DevKit
|
33
|
+
- ruby_version: "21-x64"
|
34
|
+
devkit: C:\Ruby23-x64\DevKit
|
35
|
+
- ruby_version: "22"
|
36
|
+
devkit: C:\Ruby23\DevKit
|
37
|
+
WIN_RAPID: true
|
38
|
+
- ruby_version: "21"
|
39
|
+
devkit: C:\Ruby23\DevKit
|
40
|
+
WIN_RAPID: true
|
41
|
+
matrix:
|
42
|
+
allow_failures:
|
43
|
+
- ruby_version: "21"
|
data/bin/fluent-debug
ADDED
data/code-of-conduct.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
<source>
|
2
|
+
@type dummy
|
3
|
+
@label @test
|
4
|
+
tag test.copy
|
5
|
+
auto_increment_key id
|
6
|
+
</source>
|
7
|
+
|
8
|
+
<source>
|
9
|
+
@type dummy
|
10
|
+
@label @test
|
11
|
+
tag test.rr
|
12
|
+
auto_increment_key id
|
13
|
+
</source>
|
14
|
+
|
15
|
+
<label @test>
|
16
|
+
<match test.copy>
|
17
|
+
@type copy
|
18
|
+
<store>
|
19
|
+
@type stdout
|
20
|
+
output_type json
|
21
|
+
</store>
|
22
|
+
<store>
|
23
|
+
@type stdout
|
24
|
+
output_type ltsv
|
25
|
+
</store>
|
26
|
+
</match>
|
27
|
+
|
28
|
+
<match test.rr>
|
29
|
+
@type roundrobin
|
30
|
+
<store>
|
31
|
+
@type stdout
|
32
|
+
output_type json
|
33
|
+
</store>
|
34
|
+
<store>
|
35
|
+
@type stdout
|
36
|
+
output_type ltsv
|
37
|
+
</store>
|
38
|
+
</match>
|
39
|
+
</label>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<source>
|
2
|
+
@type dummy
|
3
|
+
tag dummy
|
4
|
+
</source>
|
5
|
+
|
6
|
+
<filter **>
|
7
|
+
@type stdout
|
8
|
+
</filter>
|
9
|
+
|
10
|
+
<filter **>
|
11
|
+
@type stdout
|
12
|
+
output_type hash
|
13
|
+
</filter>
|
14
|
+
|
15
|
+
<filter **>
|
16
|
+
@type stdout
|
17
|
+
format ltsv
|
18
|
+
</filter>
|
19
|
+
|
20
|
+
<match **>
|
21
|
+
@type null
|
22
|
+
</match>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<source>
|
2
|
+
@type dummy
|
3
|
+
tag dummy
|
4
|
+
rate 100
|
5
|
+
dummy {"message":"yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay"}
|
6
|
+
</source>
|
7
|
+
|
8
|
+
<match dummy>
|
9
|
+
@type null
|
10
|
+
never_flush true
|
11
|
+
<buffer>
|
12
|
+
@type memory
|
13
|
+
overflow_action block
|
14
|
+
chunk_limit_size 1k
|
15
|
+
total_limit_size 2k
|
16
|
+
</buffer>
|
17
|
+
</match>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<source>
|
2
|
+
@type dummy
|
3
|
+
@label @main
|
4
|
+
tag "test.data"
|
5
|
+
size 2
|
6
|
+
rate 10
|
7
|
+
dummy {"message":"yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay"}
|
8
|
+
auto_increment_key number
|
9
|
+
</source>
|
10
|
+
|
11
|
+
<label @main>
|
12
|
+
<match test.data>
|
13
|
+
@type buffered_stdout
|
14
|
+
<buffer>
|
15
|
+
@type file
|
16
|
+
path "#{Dir.pwd}/compressed_buffers"
|
17
|
+
flush_at_shutdown false
|
18
|
+
chunk_limit_size 1m
|
19
|
+
flush_interval 10s
|
20
|
+
compress gzip
|
21
|
+
</buffer>
|
22
|
+
</match>
|
23
|
+
</label>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<system>
|
2
|
+
rpc_endpoint 0.0.0.0:24444
|
3
|
+
</system>
|
4
|
+
|
5
|
+
<source>
|
6
|
+
@type forward
|
7
|
+
port 24224
|
8
|
+
bind 0.0.0.0
|
9
|
+
<security>
|
10
|
+
self_hostname input.testing.local
|
11
|
+
shared_key secure_communication_is_awesome
|
12
|
+
user_auth yes
|
13
|
+
allow_anonymous_source no
|
14
|
+
<user>
|
15
|
+
username user1
|
16
|
+
password yes_this_is_user1
|
17
|
+
</user>
|
18
|
+
<user>
|
19
|
+
username user2
|
20
|
+
password yes_this_is_really_user2
|
21
|
+
</user>
|
22
|
+
<user>
|
23
|
+
username user3
|
24
|
+
password noooooo_this_may_not_be_user3
|
25
|
+
</user>
|
26
|
+
<client>
|
27
|
+
# host 127.0.0.1
|
28
|
+
network 127.0.0.0/24
|
29
|
+
shared_key using_different_key_makes_us_secure
|
30
|
+
users user1,user2
|
31
|
+
</client>
|
32
|
+
</security>
|
33
|
+
</source>
|
34
|
+
|
35
|
+
<match {test,test2,test3,test4}>
|
36
|
+
@type stdout
|
37
|
+
</match>
|