Install On Heroku
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.
With Treasure Data as a Backend
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
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:
You can read more about this approach here.
2. Using Git
This is similar to "With non-Treasure Data Backend", except you do not need to edit the config. Instead, simply update the configuration variable:
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.
In general, the URL format is
The output will be available on STDOUT.
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is a open source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
Last updated