This feature is in beta. Please contact the Logz.io Support team or your account manager to request early access.

This project lets you configure a Telegraf agent to send your collected Prometheus-format metrics to Logz.io.

Overview

Telegraf is a plug-in driven server agent for collecting and sending metrics and events from databases, systems, and IoT sensors.

To send your Prometheus-format metrics to Logz.io, you add the outputs.http plug-in to your Telegraf configuration file.

Configuring Telegraf to send your metrics data to Logz.io

Set up Telegraf v1.17 or higher:

Follow the instructions on Get started with Telegraf to:

  1. Download and install Telegraf in the terminal.
  2. Create and configure the ‘telegraf.conf’ file.
  3. Start the Telegraf service.
Add the outputs.http plug-in

After you create a config file for Telegraf, configure the output plug-in to enable your data to be sent to Logz.io in Prometheus-format and add the following code to the configuration file:

For the list of options, see the parameters below the code block.👇

[[outputs.http]]
  url = "http://<<LISTENER-HOST>>:8050"
  data_format = "prometheusremotewrite"
  [outputs.http.headers]
     Content-Type = "application/x-protobuf"
     Content-Encoding = "snappy"
     X-Prometheus-Remote-Write-Version = "0.1.0"
     Authorization = "Bearer <<PROMETHEUS-METRICS-SHIPPING-TOKEN>>"
Parameters

Replace the placeholders in the code block (indicated by the double angle brackets << >>) to match your specifics.

Environment variable Description Required/Default
url The Logz.io Listener URL for for your region, configured to use port 8050 (default), or port 8052 for http traffic, or port 8053 for https traffic. For more details, see the Prometheus configuration file remote write reference. Required
Bearer The Logz.io Prometheus Metrics account token. Required
  • Replace <<LISTENER-HOST>> with the host for your region. For example, listener.logz.io if your account is hosted on AWS US East, or listener-nl.logz.io if hosted on Azure West Europe.
Check Logz.io for your metrics

Give your data some time to get from your system to ours, then log in to your Logz.io Metrics account, and open the Logz.io Metrics tab.