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.
Goto influxdata download portal and download
Telegraf
zip fileCreate a folder and name it as
Telegraf
inC:\Program Files
and extract the .zip content toTelegraf
folder (C:\Program Files\Telegraf
)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
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
In Windows
Services
, you should seeTelegraf
service. Right-click on the Telegraf service, open"Properties"-> Select "Automatic"
for “Startup Type” and click “Start” button to start the Telegraf service.
You should able to see these metrics in your OpenTSDB