Telegraf provides integration to monitoring many technologies through a large number of Telegraf input plugins. From there Telegraf can process the metrics and send them to Lightstep Observability using the OpenTelemetry output plugin.

To complete the integration, you will:

  • Configure a Telegraf input plugin to ingest metrics
  • Configure Telegraf to report metrics to the OpenTelemetry Collector using an output plugin

Configure the Telegraf input plugin

In the Telegraf configuration file, add the configuration for any of the Telegraf input plugins. You can learn more about configuring Telegraf from the official documentation.

This example illustrates the process by configuring the Directory Monitor plugin. It ingests files in the configured directory and moves them to the finished_directory after processing. By default it expects the InfluxDB line protocol format. But it can be configured to work with more than a dozen other data formats, including OpenTelemetry.

  directory = "/telegraf/in"
  finished_directory = "/telegraf/done"

The Telegraf repository provides additional documentation for all plugins in their respective directories.

Configure the OpenTelemetry output plugin

To deliver metrics to Lightstep Observability you configure the Telegraf OpenTelmetry output plugin. This plugin sends metrics to Lightstep using gRPC.

This example shows the plugin configured without TLS:

  service_address = ""
  insecure_skip_verify = true

  # Additional gRPC request metadata
    lightstep-access-token = "$LS_ACCESS_TOKEN"

For more details regarding configuring the OpenTelemetry output plugin see the official Telegraf documentation.

Validate metrics are reporting to Lightstep

You can validate that metrics are reporting to Lightstep on the Metrics details page in Project settings.

  1. In Lightstep, click Project settings > Metric details.

  2. Search for Telegraf metric names. Search for metric

  3. If needed, select the metric to edit the description and how the units are displayed in Lightstep.

View metrics in Lightstep

After you have Lightstep ingesting metrics from Telegraf, you can use the Lightstep Terraform Provider to create a dashboard for the metrics.

Additional resources