Windows services in Grafana

Working with Windows server 2016 and sending metrics to Grafana 8.
I’m using telegraf plugin which is supposed to monitor windows services. Not set any particular ones yet so it would account for all but once set I’ll be limiting to probably a dozen.

I’m not sure what would be the best layout for monitoring services state over time,trying State Timeline, so like when status changes from Running to Stopped or Stop Pending.

I can see I can select State in query editor but unsure what aggregator to use with that. Can someone help please setting this up?


Please post some sample data ?

2022-06-30 09:10:06,Running,Virus Scan
2022-06-30 10:10:06,Stopped, SQL Server
2022-06-30 11:10:06,Uknown, SQL Server
2022-06-30 11:30:06,Warming Up, SQL Server

The above looks great. Exactly what I’m after. How is it CSV though? What type of visualisation is this? I can’t find anything with Type or Data in query editor. My data sample looks like this

win_services,host=somehost,display_name=sync\ Host8F9a08F98,service_name=One_sync_service8F9a08F98 startup_mode=2i, state=4i epochformattimestamp

So there are some comas but it’s like some are missing.

Cool. This is State Timeline viz. Well that csv is just a sample since we do not have access to your datasource hence we cannot guess what is in your datasource. What is your final telegraf data ingest destination, your datasource?

Telegraf posts it to InfluxDB.

and this data is in one column?

display_name=sync\ Host8F9a08F98,
service_name=One_sync_service8F9a08F98 startup_mode=2i, 
state=4i epochformattimestamp

Yes, that’s all one line when I run telegraf with test flag for this win_services plugin specifically.

you might want to reconsider that so that telegraf parses each column separately

measurement = win_services
state=4i epochformattimestamp

not sure about

display_name=sync\ Host8F9a08F98,
service_name=One_sync_service8F9a08F98 startup_mode=2i, 

so that it looks like this

That’s the default telegraf sends. When I look at Grafana’s end all I can select is state and startup_mode. Sorry if I’m talking rubbish but it’s all quite new to me so just saying what I’m seeing.
Here is how telegraf defines the win_services plugin

1 Like

No rubbish, it is what it is. This one?

Yep that’s the one, except I removed all for starters to have all services listed and in Query editor indeed I can add an AND clause and select service_name =

Ok could you mock up the visual how you would like to see it, where what should be?

Your first example was very good showing when a given service was in Running and where in other state over time. For telegraf it looks like 4 is for running, 1 for stopped and 3 for stop pending which states I see most the time. Anything other than running should be considered bad.

1 Like