1. ProTop Knowledge Base
  2. ProTop Trends Dashboard

Using your ProTop API Key with Telegraf

We use ProTop's API Key feature to protect our ProTop Portal from unwanted data. How do we pass this key along with the Telegraf data we are sending to the Portal so it will recognize and load it?

NOTE: This article assumes you already have an active ProTop API Key. If you do not, start with Using ProTop API Keys.

Telegraf.conf (same for Linux and Windows)

1. Edit your telegraf.conf file, find the "urls" line that contains your custid (e.g. acme). It will look something like this:

[[outputs.influxdb]]
urls = ["http://dashboard.wss.com/data-acme"]

2. Add this line below your urls line:

 http_headers = {"X-API-KEY" = "your-api-key-from-the-ProTop-Portal"}

3. Restart Telegraf.

4. Verify your Telegraf data is appearing on the Portal by clicking Trend Data, selecting your site in the first dropdown, selecting a database resource from the second dropdown, and selecting Server from the third dropdown.

You should now see Telegraf data populating in the chart.