Versions | v1.0 (td-agent3) | v0.12 (td-agent2)

HTTP RPC

HTTP RPC enables you to manage your Fluentd instance through HTTP endpoints. You can use this feature as a replacement of Unix signals.

It’s especially useful for environments where signals are not supported well (e.g. Windows).

Table of Contents

Configuration

HTTP RPC is not enabled by default. To use this feature, set the rpc_endpoint option as follows.

<system>
  rpc_endpoint 127.0.0.1:24444
</system>

Now you can manage your Fluentd instance using a HTTP client:

$ curl http://127.0.0.1:24444/api/plugins.flushBuffers
{"ok":true}

As shown in the above example, each endpoint returns a JSON object as its response.

HTTP endpoints

/api/processes.interruptWorkers

Replacement of signal’s SIGINT. Stop the daemon.

/api/processes.killWorkers

Replacement of signal’s SIGTERM. Stop the daemon.

/api/processes.flushBuffersAndKillWorkers

This is essentially a combination of SIGUSR1 and SIGTERM. Flush the buffer then stop the daemon.

/api/plugins.flushBuffers

Replacement of signal’s SIGUSR1. Flush the buffered messages.

/api/config.reload

Replacement of signal’s SIGHUP. Reload configuration.

Last updated: 2018-07-18 16:18:22 +0000

Versions | v1.0 (td-agent3) | v0.12 (td-agent2)

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.