Versions | v0.14 (td-agent3)

This page is for v0.14, not the latest stable version which is v0.12. For the latest stable version of this article, click here.


Installing Fluentd using .msi Installer (Windows)

This article explains how to install td-agent, the stable Fluentd distribution package maintained by Treasure Data, Inc, on Windows.

Windows version is in 'beta' release stage, and needs a lot of testing from the community. Please report if you encounter any problems.

Table of Contents

What is td-agent?

Fluentd is written in Ruby for flexibility, with performance sensitive parts written in C. However, casual users may have difficulty installing and operating a Ruby daemon.

That’s why Treasure Data, Inc is providing the stable distribution of Fluentd, called td-agent. The differences between Fluentd and td-agent can be found here.

For Windows, we’re using the OS native .msi Installer to distribute td-agent.

msi package now uses Ruby 2.3 due to windows related gem issues. Ruby will be updated to 2.4 after fixed issues.

Step1: Install td-agent

Please download the .msi file from here, and install the software.

If you need Security Tested Binary with a clear life cycle management, please check the Enterprise Offering.

Step2: Run td-agent from Command Prompt

First, please prepare your config file located at C:/opt/td-agent/conf/td-agent.conf. The config below is the simplest example to output any incoming records to td-agent’s log file.

<source>
  @type forward
</source>
<match test.**>
  @type stdout
</match>

After you’ve installed .msi package, you’ll see the program called Td-agent Command Prompt installed. Please double click this icon in the Windows menu (below is how it looks like on Windows Server 2012).

In the prompt, please execute the command below to launch td-agent process.

> fluentd -c conf\td-agent.conf

Then, please launch another Td-agent Command Prompt and type the command below. This will send a record to td-agent process.

> echo {"message":"hello"} | fluent-cat test.event

It’s working properly if td-agent process outputs the message test.event: {"k", "v"}.

Step3: Register td-agent to Windows service

Next, let’s register td-agent to Windows service to permanently run as a server process. Please execute Td-agent Command Prompt again, and type the two commands below.

> fluentd --reg-winsvc i
> fluentd --reg-winsvc-fluentdopt '-c C:/opt/td-agent/conf/td-agent.conf -o C:/opt/td-agent/td-agent.log'

Step4: Run td-agent as Windows service

Please guide yourself to Control Panel -> System and Security -> Administrative Tools -> Services, and you’ll see Fluentd Windows Service is listed.

Please double click Fluentd Window Service, and click Start button. Then the process will be executed as Windows Service.

The log file will be located at C:/opt/td-agent/td-agent.log as we specified in Step 3.

Step5: Install Plugins

Open Td-agent Command Prompt and use fluent-gem command.

> fluent-gem install fluent-plugin-xyz --version=1.2.3

Next Steps

You’re now ready to collect your real logs using Fluentd. Please see the following tutorials to learn how to collect your data from various data sources.

Please refer to the resources below for further steps.

Last updated: 2017-03-04 18:36:06 UTC

Versions | v0.14 (td-agent3)

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.

Interested in the Fluentd Newsletters?