Telegraf
Ship your Metrics via Telegraf to your Logit.io Stack
You can find out more about Telegraf in our getting started guide here. To learn how to install Telegraf and configure the output plugin to send metrics to your Logit.io stack, follow the steps below. You will need to use a specific integration guide for the type of metrics you want to send in order to configure Telegraf.
Metrics
Configure Telegraf to ship Nginx metrics to your Logit.io stacks via Logstash.
Install Telegraf
This integration allows you to configure a Telegraf agent to send your metrics, in multiple formats, to Logit.io.
Choose the installation method for your operating system:
When you paste the command below into Powershell it will download the Telegraf zip file.
Once that is complete, press Enter again and the zip file will be extracted into C:\Program Files\InfluxData\telegraf\telegraf-1.31.2
.
wget https://dl.influxdata.com/telegraf/releases/telegraf-1.31.2_windows_amd64.zip -UseBasicParsing -OutFile telegraf-1.31.2_windows_amd64.zip
Expand-Archive .\telegraf-1.31.2_windows_amd64.zip -DestinationPath 'C:\Program Files\InfluxData\telegraf'
Configure the Telegraf input plugin
You will set the metrics you want to collect in the Telegraf configuration file (called telegraf.conf
by default).
The configuration file that is installed with Telegraf is thousands of lines long, and supports many different
input plugins. You can find the recommended inputs configuration in the documentation for the
type of metrics you want to send. For example, if you are sending Nginx metrics to Logit.io, you can find the
instructions here.
Configure the output plugin
Once you have generated the configuration file, you need to set up the output plug-in to allow Telegraf to transmit your data to Logit.io in Prometheus format. This can be accomplished by incorporating the following code into your configuration file:
[[outputs.http]]
url = "https://@metricsUsername:@metricsPassword@@metrics_id-vm.logit.io:@vmAgentPort/api/v1/write"
data_format = "prometheusremotewrite"
[outputs.http.headers]
Content-Type = "application/x-protobuf"
Content-Encoding = "snappy"
Start Telegraf
From the location where Telegraf was installed (C:\Program Files\InfluxData\telegraf\telegraf-1.31.2
) run the program
providing the chosen configuration file as a parameter:
.\telegraf.exe --config telegraf-demo.conf
Once Telegraf is running you should see output similar to the following, which confirms the inputs,
output and basic configuration the application has been started with: