Skip to content

Instantly share code, notes, and snippets.

@takus takus/fluent.conf
Created Jun 1, 2016

Embed
What would you like to do?
Configuration for monitoring Fluentd by Datadog
<match smartnews.user_activity>
type copy
<store>
type flowcounter
count_keys *
unit second
aggregate all
tag fluentd.flowcounter.smartnews.user_activity
@label @dogstatsd
</store>
<store>
type s3
...
flush_at_shutdown true
</store>
<store>
type kinesis_streams
...
flush_at_shutdown true
</store>
</match>
<label @dogstatsd>
<match fluentd.flowcounter.**>
type copy
<store>
type record_reformer
renew_record
auto_typecast
tag dogstatsd.count
<record>
key "fluentd.flowcounter.bytes"
value ${bytes}
type "count"
fluentd_source ${tag_suffix[2]}
</record>
</store>
<store>
type record_reformer
renew_record
auto_typecast
tag dogstatsd.count
<record>
key "fluentd.flowcounter.count"
value ${count}
type "count"
fluentd_source ${tag_suffix[2]}
</record>
</store>
</match>
<match dogstatsd.**>
type dogstatsd
flat_tag true
</match>
</label>
@tehranian

This comment has been minimized.

Copy link

tehranian commented Jan 6, 2017

Nice! We came up with a solution very similar to this around the same time you did.

I wish this gist was available back in April... It would have saved me a lot of time! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.