{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Products","product_name":"Integration Hub","type":"markdown"},"seo":{"title":"Fluentd Logs Sent to Treasure Data","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"fluentd-logs-sent-to-treasure-data","__idx":0},"children":["Fluentd Logs Sent to Treasure Data"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td-agent was discontinued in December 2023 and has been replaced by ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["fluent-package"]},". The fluent-package is the official successor maintained by the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.cncf.io/projects/"},"children":["Cloud Native Computing Foundation"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can send Fluentd logs to the Treasure Data platform."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#capture-fluentd-logs"},"children":["Capture Fluentd logs"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#prerequisites"},"children":["Prerequisites"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#fluentd-logs"},"children":["Fluentd Logs"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#sending-logs-to-treasure-data"},"children":["Sending Logs to Treasure Data"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#viewing-logs-in-treasure-data"},"children":["Viewing Logs in Treasure Data"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#whats-next"},"children":["What's Next?"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"capture-fluentd-logs","__idx":1},"children":["Capture Fluentd logs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can send and store Fluentd logs in Treasure Data."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Fluentd."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Fluentd configuration and syntax, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.fluentd.org/configuration/config-file"},"children":["Configuration File Syntax"]},", to understand the terms and concepts used in this article."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"fluentd-logs","__idx":3},"children":["Fluentd Logs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fluentd marks its own logs with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fluent"]}," tag. You can process Fluentd logs by using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<match fluent.**>"]}," (Of course, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["**"]}," captures other logs) in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<label @FLUENT_LOG>"]},". If you define in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<label @FLUENT_LOG>"]}," your configuration, then Fluentd sends its own logs to this label. This is useful for monitoring Fluentd logs."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, if you have the following configuration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"conf","header":{"controls":{"copy":{}}},"source":"# omit other source / match\n<label @FLUENT_LOG>\n  <match fluent.*>\n    @type stdout\n  </match>\n</label>\n","lang":"conf"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fluentd outputs ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fluent.info"]}," logs to stdout as follows:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"2014-02-27 00:00:00 +0900 [info]: shutting down fluentd\n2014-02-27 00:00:01 +0900 fluent.info: {\"message\":\"shutting down fluentd\"} # by <match fluent.*>\n2014-02-27 00:00:01 +0900 [info]: process finished code = 0\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sending-logs-to-treasure-data","__idx":4},"children":["Sending Logs to Treasure Data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To send Fluentd logs to Treasure Data for storage, you must modify the Fluentd log configuration section. You need to include the modifications in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<match fluent.*>"]}," section, as shown in the following example. Ensure to include your write-only API key instead of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<YOUR TD API KEY>"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"conf","header":{"controls":{"copy":{}}},"source":"<label @FLUENT_LOG>\n  <match fluent.*>\n    @type tdlog\n    apikey <YOUR TD API KEY>\n    auto_create_table\n    use_ssl true\n    <buffer>\n      @type file\n      path /var/log/fluent/buffer/td_logs\n    </buffer>\n  </match>\n</label>\n","lang":"conf"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Save your changes to the configuration file and restart Fluentd."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"viewing-logs-in-treasure-data","__idx":5},"children":["Viewing Logs in Treasure Data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fluentd logs sent to Treasure Data are stored in a database named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fluent"]}," on your instance. Within the fluent database, a series of tables are created corresponding to the different log levels used by the fluentd logger."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/fluent___treasure_data.a4e8162b15e1c778a6d32a0e1d829e1026d19e726e70b5dac4ee913e25117c67.ef656343.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"whats-next","__idx":6},"children":["What's Next?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information on Fluentd's logs see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.fluentd.org/deployment/logging"},"children":["Fluentd Logging"]},"."]}]},"headings":[{"value":"Fluentd Logs Sent to Treasure Data","id":"fluentd-logs-sent-to-treasure-data","depth":1},{"value":"Capture Fluentd logs","id":"capture-fluentd-logs","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Fluentd Logs","id":"fluentd-logs","depth":2},{"value":"Sending Logs to Treasure Data","id":"sending-logs-to-treasure-data","depth":2},{"value":"Viewing Logs in Treasure Data","id":"viewing-logs-in-treasure-data","depth":2},{"value":"What's Next?","id":"whats-next","depth":2}],"frontmatter":{"seo":{"title":"Fluentd Logs Sent to Treasure Data"}},"lastModified":"2026-02-12T08:44:10.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/integration-hub/streaming/td-agent/td-agent-logs-sent-to-treasure-data","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}