my personal blog about systemcenter

All posts in Grafana

Displaying Windows Performance Counters with Grafana and Influx DB with Windows Backeend

Categories: Grafana, Hyper-V, InfluxDB
Comments Off on Displaying Windows Performance Counters with Grafana and Influx DB with Windows Backeend

Matthew Hodgkins published a blog earlier this year showing how to setup grafana and influxdb on a ubuntu server to publish performance counters from windows

https://hodgkins.io/windows-metric-dashboards-with-influxdb-and-grafana / https://twitter.com/matthodge

Following his guide to make this below was very smooth , and this is a crude step by step on trying to replicate the feature set in Windows

image

Credit : Matthew Hodkins

I wanted to try out the same with a windows backend instead of ubunu , please note this is thrown in with a showel , paths/users/logs nothing is changed and running as user processes , will created a updated post just wanted to get the first parts working

Heading to https://www.influxdata.com/downloads/ to download Telegraf and InfluxDB

image

I installed a Windows Server 2016 downloaded InfluxDB and copied in the files to Program Files

image

Started the influxd , and 15 seconds later we have a default installed influxdb ready for use

image

On the same box i downloaded newest version of grafana http://grafana.org/download/

image

And started up the services

image

image

image

on the 2 hyper-v hosts used in the test i installed the telegraf clients and used the default performance counters it picked up , only change was adding the hostname where it should deliver the counters

image

Logging into Grafana with admin/admin

image

In Grafana go to datasources and add data source , select influxdb

image

add localhost:8086 for influx db and telegraf for database and a dummy username / password

image

And we know have a datasource we can use

image

In dashboards , select create new

image

Select Graph Style

image

It now creates a default view , double click on “Panel Title” and select edit

image

Delete the fake datasource and add our LocalInfluxDB as datasource

and select win_cpu / Percent_Processor_Time , and group by tag (host) , and to $tag_host

image

Setting Y-Max to 100 will show the util as 0-100 instead of the max load

image

Adding a thredshold to show warning/critical (V4 of Grafana supported alerting will get back to that in next post)

image

And the end result , cpu util displayed for the 2 hosts