Using windows_exporter

55 views
Skip to first unread message

John Dexter

unread,
Sep 10, 2020, 8:54:49 AM9/10/20
to promethe...@googlegroups.com
I'm getting started with Prometheus on a windows system and windows_exporter seems a great way to gather some real metric data easily.
I have it running on localhost but in reality, we have an app-server, db-server and about a dozen workstations.

I see references in docs like windows_os_processes{instance="localhost"

But as a noob to Prometheus what isn't explained is how I would actually set this up on multiple machines and view metrics from them in Prometheus. I assume I install it on each machine and then edit my YAML config but what would this look like?

The docs (https://github.com/prometheus-community/windows_exporter/blob/master/docs/collector.os.md) also say that the example metric above has zero labels... but it apparently has at least one label called 'instance'. Am I missing something obvious?

Sorry if this is really basic, still trying to get my head around the basics here.

Thankyou.

Brian Candler

unread,
Sep 10, 2020, 12:47:34 PM9/10/20
to Prometheus Users
What you're missing is that prometheus itself adds "job" and "instance" labels to each metric at the time it does the scrape:

Therefore, all you need is to install windows_exporter on all the systems, and then configure prometheus to scrape them all.

There are lots of ways to list the targets.  To start with you can use "static_sd_configs" and list the targets inside the main config file, but it's better to use "file_sd_configs" (the format is the same, except that the targets are now in a separate file that you can edit without touching the main config)

There are lots of getting started guides out there.
Reply all
Reply to author
Forward
0 new messages