From 0652791b850816a043b50b9e7a0da4f32c9ff023 Mon Sep 17 00:00:00 2001 From: Imron Alston Date: Sat, 28 Mar 2015 09:36:02 -0400 Subject: [PATCH] added explicit warning if num_threads is > 1 - remove later --- fluent.conf | 45 +++++++++++++++++++++------------ lib/fluent/plugin/out_scalyr.rb | 2 ++ 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/fluent.conf b/fluent.conf index 1467ff2..b034507 100644 --- a/fluent.conf +++ b/fluent.conf @@ -24,12 +24,12 @@ ## File input ## read apache logs with tag=apache.access - - @type tail - format apache - path /var/log/httpd/access_log - tag apache.1 - +# + #@type tail + #format none + #path /var/log/httpd/access_log + #tag apache.11 +# @type tail @@ -38,12 +38,12 @@ tag apache.2 - - @type tail - format apache - path /var/log/httpd/access_log - tag apache.3 - +# + #@type tail + #format none + #path /var/log/httpd/access_log + #tag apache.33 +# # Listen HTTP for monitoring # http://localhost:24220/api/plugins @@ -66,14 +66,27 @@ ## match tag=apache.access and write to file - + + @type scalyr + api_write_token 0Le5BQxEFBZ_od5cA0biuP2lWhIeXIZcNGn4hvB5ftak- + flush_interval 5s + + + + @type scalyr + api_write_token 0Le5BQxEFBZ_od5cA0biuP2lWhIeXIZcNGn4hvB5ftak- + flush_interval 5s + buffer_chunk_limit 64k + buffer_queue_limit 20 + + + @type scalyr api_write_token 0Le5BQxEFBZ_od5cA0biuP2lWhIeXIZcNGn4hvB5ftak- session_info { - "ruby": "1.9.3" - #"region": "us-east-1" + "session-info": "test" } - flush_interval 5s + flush_interval 6s ## match tag=debug.** and dump to console diff --git a/lib/fluent/plugin/out_scalyr.rb b/lib/fluent/plugin/out_scalyr.rb index d2ecf23..a540aac 100644 --- a/lib/fluent/plugin/out_scalyr.rb +++ b/lib/fluent/plugin/out_scalyr.rb @@ -17,6 +17,8 @@ def configure( conf ) super @last_timestamp = 0 @add_events_uri = URI @add_events + + raise Fluent::ConfigError, "num_threads is currently limited to 1. You specified #{@num_threads}." if @num_threads > 1 end def start