Windows Exporter exposes Windows system metrics in Prometheus format, allowing Managed Service for Prometheus to scrape and monitor your Windows Elastic Compute Service (ECS) instances. This guide covers installation, configuration, and the ECS tagging required for Service Discovery.
Prerequisites
Before you begin, make sure you have:
A Windows ECS instance with administrator access
Network connectivity between the ECS instance and your Managed Service for Prometheus environment
Step 1: Install Windows Exporter
Log on to your Windows ECS instance as an administrator.
Download the Windows Exporter installation package (
windows_exporter-1.22.0-amd64.msi).Run the installer by using one of these methods: The installer uses the following defaults:
Double-click the
.msifile.Run the following command: ``
powershell msiexec /i windows_exporter-1.22.0-amd64.msi``
Setting Default value Installation directory C:\Program Files (x86)\windows_exporterListening port 9182 Enabled collectors cpu, cpu_info, memory, process, tcp, cs, logical_disk, net, os, system, textfile, time After installation completes, verify that the
windows_exporterservice appears in the Windows Services console.Confirm that the exporter is serving metrics: Alternatively, open
http://localhost:9182/metricsin a browser. If the exporter is running correctly, you see Prometheus-formatted metrics output.Note: If you changed the default port, replace
9182with your configured port number.curl http://localhost:9182/metrics
Step 2: Configure Windows Exporter
You can modify the configuration file to change the listening port or adjust which collectors are used. For more information, see the Windows Exporter documentation.
After you change the configuration, restart the service:
sc stop windows_exporter && sc start windows_exporterAlternatively, restart the service from the Windows Services console.
Step 3: Tag your ECS instance for Service Discovery
Managed Service for Prometheus uses ECS instance tags for Service Discovery. Add a tag to your Windows ECS instances so that Prometheus can automatically discover and scrape them.
For example, add the tag ecs_os:windows to your Windows ECS instance.
Note: If your Windows ECS instances already share a common tag that distinguishes them from other instances, skip this step and use that existing tag.
Next steps
After you configure Windows Exporter, set up the integration in the Managed Service for Prometheus console to start viewing monitoring data. For detailed instructions, see Monitor a Windows ECS instance.