This article describes how to install Fluentd (td-agent) on Heroku.
With non-Treasure Data backend
Heroku doesn't allow users to install separate processes within a single dyno. You will thus need to setup Fluentd as a separate Heroku application. This will become you central log aggregation server.
Treasure Data provides a boilerplate repository to get you started. Follow the steps below to create Fluentd (td-agent) as a Heroku application.
Since Treasure Data, the primary sponsor of Fluentd, is a Heroku Addons provider, some of you came here to stream data to Treasure Data through Fluentd.
If
1
http
2
Your App ------> Heroku-hosted Fluentd ------> Treasure Data
Copied!
is what you want, there are two ways to deploy it.
1. Heroku Button
Clicking on the following button automatically launched td-agent on Heroku:
To retrieve your treasure_data_api_key_value, see here.
Test
Let's confirm that the log aggregation server has been set up correctly. Please send a GET request to the log server, http://td-agent-on-heroku.herokuapp.com, as shown below. This will log the event { "json": "message" } with a debug.sample tag. Note how the JSON-formatted data is passed as a query parameter value.