In this demo,
I will show you how to use the WMI exporter.
So I'm logged into a Windows server machine here.
It's running on Amazon, just an EC2 machine.
So you can just, if you would like to test this,
you can just launch an EC2 machine on Amazon.
You only need to allow all access to your IP address,
you also need to allow access to the Prometheus instance.
But in reality you only have to do this demo
if you have Windows machines that you want to monitor
and then you probably have one you can use
instead of spinning a new one up.
First I'm going to download the exporter.
From the GitHub.
So you can go to releases.
So then here on the release page,
you can download the version,
whatever the latest release is,
for your architecture amd64 for example.
You can save it,
view the downloads,
or here in downloads it should also be downloaded.
And then you can either just execute it,
or if you need to pause any parameters like described here,
then you can open a PowerShell
and then just run this command.
We don't need to pause any parameters.
We just going to execute it,
this is gonna install it,
then should be running
and we should be able to open it on localhost9182.
And then localhost9182/metrics gives you the metrics
that this Windows machine is exposing.
So if you then add to the IP address
of this target to our Prometheus co-creation,
we can also scrape the metrics off this machine.
So here I am back on the Prometheus server
and if I go to the co-creation file,
I'll add another job,
WMI exporter,
and this case, we have the IP address.
This is the IP address
and this is the port.
I'll just fix inundation,
move some white space,
and then we should be able to save this.
We start Prometheus,
with a HUP signal.
Yeah, loading co-creating file, looks good.
Let's go to our Prometheus status targets
and here we have WMI exporter, up,
the IP address and it also scraped three seconds ago.
So and then here, we have some more metrics
and those start with WMI.
So for instance,
logical_disk_free_bytes, execute.
So we have our C-drive
and these are the bytes that are free on the C-drive.
So this is in bytes.
So this is how we then add the metrics
for a Windows machine.