Skip to content

Commit

Permalink
added explicit warning if num_threads is > 1 - remove later
Browse files Browse the repository at this point in the history
  • Loading branch information
Imron Alston committed Mar 28, 2015
1 parent aa45082 commit 0652791
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
45 changes: 29 additions & 16 deletions fluent.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

## File input
## read apache logs with tag=apache.access
<source>
@type tail
format apache
path /var/log/httpd/access_log
tag apache.1
</source>
#<source>
#@type tail
#format none
#path /var/log/httpd/access_log
#tag apache.11
#</source>

<source>
@type tail
Expand All @@ -38,12 +38,12 @@
tag apache.2
</source>

<source>
@type tail
format apache
path /var/log/httpd/access_log
tag apache.3
</source>
#<source>
#@type tail
#format none
#path /var/log/httpd/access_log
#tag apache.33
#</source>

# Listen HTTP for monitoring
# http://localhost:24220/api/plugins
Expand All @@ -66,14 +66,27 @@
</source>

## match tag=apache.access and write to file
<match apache.*>
<match apache.1>
@type scalyr
api_write_token 0Le5BQxEFBZ_od5cA0biuP2lWhIeXIZcNGn4hvB5ftak-
flush_interval 5s
</match>

<match apache.2>
@type scalyr
api_write_token 0Le5BQxEFBZ_od5cA0biuP2lWhIeXIZcNGn4hvB5ftak-
flush_interval 5s
buffer_chunk_limit 64k
buffer_queue_limit 20
</match>

<match apache.3>
@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>

## match tag=debug.** and dump to console
Expand Down
2 changes: 2 additions & 0 deletions lib/fluent/plugin/out_scalyr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0652791

Please sign in to comment.