This guide explains how to install and configure Windows Exporter.
Step 1: Install Windows Exporter
Log on to the Windows system as an administrator.
Download the Windows Exporter package to your Windows ECS instance.
Double-click the downloaded
windows_exporter-1.22.0-amd64.msifile, or run the commandmsiexec /i windows_exporter-1.22.0-amd64.msito complete the installation.The default installation directory is
C:\Program Files (x86)\windows_exporter.The default listening port is 9182.
The default collectors are: cpu, cpu_info, memory, process, tcp, cs, logical_disk, net, os, system, textfile, and time.
After installation, the new service appears in the Windows Services console.
Verify the exporter is working by running
curl localhost:{listening port}/metricsor visitinglocalhost:{listening port}/metricsin a browser. The exporter is working correctly if Prometheus metrics are returned.listening port: Replace {listening port} with the actual port number.
Step 2: Configure Windows Exporter
You can modify the configuration file to change the port or adjust which collectors are used. For more information, see the official documentation for Windows Exporter. After modifying the configuration, you must restart the windows_exporter service by running the command sc stop windows_exporter && sc start windows_exporter or using the Windows Services console.
Step 3: Configure tags for the ECS instance
Managed Service for Prometheus uses the tags of Elastic Compute Service (ECS) instances for Service Discovery. To enable discovery, add a tag (for example, ecs_os:windows) to your Windows ECS instance. If you already have a suitable tag to identify all your Windows ECS instances, skip this step.
Next steps
After configuring Windows Exporter, complete the integration in the Managed Service for Prometheus console to view monitoring data. For more information, see Use Managed Service for Prometheus to monitor a Windows ECS instance.