Info
Content

Telegraf on Windows (Step By Step)

There are a bunch of different ways to install Telegraf on your Window PC. This tutorial will cover the most basic way of going about it via the Windows user interface.

This is a Windows specific tutorial.

This is a step-by-step tutorial. For more advanced users see the below links:

Dependencies:

  • InfluxDB

1. Download Telegraf

Click the button:

download_telegraf.JPG

And then copy Telegraf's URL in the area labeled "Windows Binaries (64-bit)":

copy_telegraf_url.JPG

Paste it into your browser's omnibar and press enter:

telegraf_omnibar.JPG

The Telegraf ZIP file will then download to your computer:

telegraf_download.JPG

2. Create the Telegraf folder

Open Windows Explorer, click on This PC, double click the C:\drive:

c_drive.JPG

And then drill down to C:\Program Files\:

program_files.JPG

Then create a new folder called "telegraf":

new_folder.JPG

3. Open & extract the ZIP file

Now navigate to your Downloads folder to locate the Telegraf ZIP file:

downloads.JPG

Then click on the Telegraf ZIP file to open your PC's native archive application. In my case I'm using WinRAR:

winrar.JPG

Now right-clickon the Telegraf folder in your archive application, and click "Extract to Specified Folder". This verbiage may differ depending on what archive application you're using, but the gist will be very similar.

extract_to_folder.JPG

In the File Explorer tree that appears, drill down to and click on  C:\Program Files\, then click the telegraf folder we created earlier:

telegraf_folder.JPG

And then click OK.

4. Start Notepad with administrative rights

Click inside the Cortana search bar and type Notepad:

cortana.JPG

Then right-clickon Notepad in the search results and click Run As Administrator:

run_ad_admin.JPG

5. Open the Telegraf config file with Notepad

From Notepad, click File -> Open:

notepad_open.JPG

Then navigate to C:\Program Files\telegraf:

navigate_to_telegraf.JPG

Change the file type to All Files:

all_files.JPG

And double click telegraf.conf:

telegraf_conf.JPG

6. Adjust telegraf.conf to connect to your Influx server

Within telegraf.conf, scroll down to where it says OUTPUTS:

outputs.JPG

Where is says:

# urls = ["http://127.0.0.1:8086"]

Remove the pound symbol (#) and enter the IP address of the computer that hosts InfluxDB. If in case Telegraf is loaded on the SAME computer as InfluxDB, you can use either urls = ["http://127.0.0.1:8086"] or urls = ["http://localhost:8086"].

You can change the name of the database here: (default "telegraf" is fine though)

database_name.JPG

And if your InfluxDB data source requires authentication, be sure to put the username & password here:

authentication.JPG

Now go to File -> Save and close Notepad.

7. Start Telegraf

Return to Windows Explorer and double click Telegraf, and you should see a window like this:

telegraf_window.JPG

At this point, assuming the telegraf.conf file was configured properly and Telegraf has network access to the computer running InfluxDB, Telegraf should begin reporting metrics to Influx.

You can now enter Grafana, select either the Default or Influx data source and begin building Grafana panels with these metrics. In case there's an error, Telegraf will likely output a verbose error message within the Telegraf command window that can be research in order to isolate problems.

 

 

Back to top