Fluentd For New Relic
Library Installation Command For New Relic APM Log
[xxxxxxxx@api00 ~]$ sudo td-agent-gem install fluent-plugin-newrelic
Printed Installation Log
[sudo] password for xxxxxxxx:
Fetching: msgpack-1.4.5.gem (100%)
Building native extensions. This could take a while...
Successfully installed msgpack-1.4.5
Fetching: serverengine-2.2.5.gem (100%)
Successfully installed serverengine-2.2.5
Fetching: strptime-0.2.5.gem (100%)
Building native extensions. This could take a while...
Successfully installed strptime-0.2.5
Fetching: fluentd-1.14.5.gem (100%)
Successfully installed fluentd-1.14.5
Fetching: fluent-plugin-newrelic-1.2.1.gem (100%)
Successfully installed fluent-plugin-newrelic-1.2.1
Parsing documentation for msgpack-1.4.5
Installing ri documentation for msgpack-1.4.5
Parsing documentation for serverengine-2.2.5
Installing ri documentation for serverengine-2.2.5
Parsing documentation for strptime-0.2.5
Installing ri documentation for strptime-0.2.5
Parsing documentation for fluentd-1.14.5
Installing ri documentation for fluentd-1.14.5
Parsing documentation for fluent-plugin-newrelic-1.2.1
Installing ri documentation for fluent-plugin-newrelic-1.2.1
Done installing documentation for msgpack, serverengine, strptime, fluentd, fluent-plugin-newrelic after 6 seconds
5 gems installed
Configuration For New Relic APM Log
<source>
@type tail
@log_level warn
<parse>
@type none
</parse>
path /var/log/{Project Name}/api-req/*/*/%Y-%m-%d.txt
pos_file /tmp/td-agent/log_file.pos
tag live.backend.req
</source>
<match live.backend.req>
@type newrelic
license_key dd9008a388bb995fdcf33102e9a6e00ece27NRAL
base_uri https://log-api.newrelic.com/log/v1
<buffer>
@type memory
flush_interval 5s
</buffer>
</match>