Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

fluent-plugin-dynatrace, a plugin for fluentd

This project is developed, maintained and supported by Dynatrace.

A fluentd output plugin for sending logs to the Dynatrace Generic log ingest API v2.


  • An instance of fluentd >= v1.0 from which logs should be exported
  • Ruby version >= 2.4.0
  • An ActiveGate with the Generic log ingest API v2 enabled as described in the Dynatrace documentation
  • A Dynatrace API token with the logs.ingest (Ingest Logs) scope


The plugin is published on Rubygems at

To install it, run the following command:

fluent-gem install fluent-plugin-dynatrace

If you are using td-agent, run:

td-agent-gem install fluent-plugin-dynatrace

Configuration options

Below is an example configuration which sends all logs with tags starting with dt to Dynatrace.

<match dt.**>
  @type              dynatrace
  active_gate_url    https://{your-environment-activegate}:8021/e/{your-tenant}/api/v2/logs/ingest
  api_token          api_token
  ssl_verify_none    false
  inject_timestamp   false

If configured with custom <buffer> settings, it is recommended to set flush_thread_count to 1. The output plugin is limited to a single outgoing connection to Dynatrace and multiple export threads will have limited impact on export latency.

match directive

  • required

The match directive is required to use an output plugin and tells fluentd which tags should be sent to the output plugin. In the above example, any tag that starts with dt. will be sent to Dynatrace. For more information see how do match patterns work?.


  • required

The @type directive tells fluentd which plugin should be used for the corresponding match block. This should always be dynatrace when you want to use the Dynatrace output plugin.


  • required

This is the full URL of the Generic log ingest API v2 endpoint on your ActiveGate.


  • required

This is the Dynatrace API token which will be used to authenticate log ingest requests. It should be assigned only the logs.ingest (Ingest Logs) scope.


  • optional
  • default: false

It is recommended to leave this optional configuration set to false unless absolutely required. Setting ssl_verify_none to true causes the output plugin to skip certificate verification when sending log ingest requests to SSL and TLS protected HTTPS endpoints. This option may be required if you are using a self-signed certificate, an expired certificate, or a certificate which was generated for a different domain than the one in use.


  • optional
  • default: false

If set to true, the timestamp of the log message will be injected into the body of the message in a format readable by Dynatrace.


An full example demonstrating how to set up Fluentd on Kubernetes and export logs to Dynatrace can be found in the example folder.


fluent-plugin-dynatrace supports Ruby versions >= 2.4.0 but it is recommended that at least 2.7.2 is used for development. Ruby versions can be managed with tools like chruby or rbenv.

Install Dependencies

bundle install

Run All Tests

rake test

Run Specific Tests

# Run one test file
rake test TEST=test/plugin/out_dynatrace_test.rb

Code Style Checks

# Check for code style violations
rake rubocop

# Fix auto-fixable style violations
rake rubocop:auto_correct

Run all checks and build

# Runs rubocop, tests, and builds the gem
rake check