-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfluent.conf
31 lines (30 loc) · 845 Bytes
/
fluent.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## match events whose tag is newrelic.**
<filter newrelic.**>
@type record_transformer
enable_ruby true
auto_typecast true
<record>
hostname ${if record['host']; record['host']; elsif tag_parts[1]; "#{tag_parts[1]}.herokuapp.com"; else 'herokuapp.com'; end}
service ${if record['ident'] && record['pid']; "#{record['ident']}[#{record['pid']}]"; else 'app[web.1]'; end}
tag ${tag}
source "heroku"
</record>
</filter>
## match events whose tag is newrelic.** and send to New Relic
<match newrelic.**>
@type newrelic
api_key "#{ENV['NR_API_KEY']}"
use_ssl true
<buffer>
@type file
path ./buffer/newrelic
flush_at_shutdown true
flush_interval 10s
flush_mode interval
retry_forever true
</buffer>
</match>
## match tag=debug.** and dump to console
<match debug.**>
@type stdout
</match>