Ok, getting metrics(CPU, Memory & Network) from Windows OS is completely different from Linux. In Linux, people can easily develop scripts to get system metrics by simply reading /proc pseudo files. In fact, there are so many open source tools to do this in Linux, like tcollector which is my favourite.

Now, Let’s look at this Telegraf tool and what it does. I found Telegraf tool is a really simple, elegant way to collect Windows OS metrics and lightweight too, unlike others which some are paid and crappy. This tool doesn’t provide any wizard installation to set up, but one has to run a command in Windows Powershell to install it as Windows service. It supports multiple TSDB backend storage like Graphite, OpenTSDB, etc but I have tested only with OpenTSDB.

As they said in Github repo and I quote

Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.

Design goals are to have a minimal memory footprint with a plugin system so that developers in the community can easily add support for collecting metrics from local or remote services.

  1. Goto influxdata download portal and download Telegraf zip file

  2. Create a folder and name it as Telegraf in C:\Program Files and extract the .zip content to Telegraf folder (C:\Program Files\Telegraf)

  3. Download telegraf configuration from here (telegraf.conf) and place it in C:\Program Files\Telegraf

  • Specify OpenTSDB server IP in outputs.opentsdb section in the configuration

Application Location

  • Open “Windows PowerShell” with administrator rights(Run as administrator) and paste below command to create “windows service”

    C:\"Program Files"\Telegraf\telegraf.exe --config C:\"Program Files"\Telegraf\telegraf.conf –-service install
    

    Command Run

  • In Windows Services, you should see Telegraf service. Right-click on the Telegraf service, open "Properties"-> Select "Automatic" for “Startup Type” and click “Start” button to start the Telegraf service.

Windows Service

You should able to see these metrics in your OpenTSDB