Telegraf is a plugin-driven server agent for collecting, processing, aggregating, and writing metrics. Telegraf comes with the Dynatrace Output Plugin that enables you to easily send Telegraf metrics to Dynatrace.

Enable Telegraf ingestion

Telegraf metric ingestion comes with OneAgent version 1.201+. The easiest scenario is to have Telegraf installed on the host alongside OneAgent. You only need to enable the Dynatrace Output Plugin in your Telegraf configuration (Telegraf version 1.16+) and enable Telgraf metric ingestion at the environment or host level in your Dynatrace configuration. Note that the host-level configuration overrides the environment configuration.

Topology awareness

When OneAgent and Telegraf are installed on the same host, the host ID and host name context are automatically added to each metric as dimensions. Learn how to enrich your metrics with other Dynatrace-specific dimensions and apply Dynatrace-AI causation details to your ingested data.

Metric format

Provided data points must follow the Metrics ingestion protocol.

Communication port

The Telegraf Dynatrace Output Plugin sends metrics to the OneAgent metric API endpoint.

The default metric ingestion port is 14499. If necessary, you can use oneagentctl command-line interface to check or change the port. Changing the metric ingestion port requires restart of OneAgent. Add –restart-service to the command to restart OneAgent automatically.

Check the ingestion port

Use the --get-extensions-ingest-port parameter to show the current local ingestion port, 14499 by default.

  • Linux: ./oneagentctl --get-extensions-ingest-port
  • Windows: .\oneagentctl.exe --get-extensions-ingest-port

Set a custom ingestion port

Use the --set-extensions-ingest-port=<arg> parameter to set a custom local ingestion port.

  • Linux: ./oneagentctl --set-extensions-ingest-port=14499 --restart-service
  • Windows: .\oneagentctl.exe --set-extensions-ingest-port=14499 --restart-service

Configure proxy

Configure your host proxy to allow localhost traffic going to the metric ingestion port, 14499 by default.

If you change the default OneAgent communication port, make sure you also update the Telegraf configuration.

  1. Edit telegraf.conf, the Telegraf configuration file.
  2. Set the url property to url = "<your-custom-port>/metrics/ingest".
  3. Save the file.

Note that changing the port for Telegraf ingested metrics also affects OneAgent REST API and Scripting integration.