To collect system metrics such as CPU, memory, and disk usage from Windows hosts, install Windows Exporter on your Elastic Compute Service (ECS) instances. Windows Exporter exposes metrics in Prometheus format, which Managed Service for Prometheus can automatically discover and scrape.
Prerequisites
Before you begin, ensure that you have:
A Windows ECS instance
Administrator access to the Windows instance
Network connectivity on port 9182 (default) between the ECS instance and Managed Service for Prometheus
Install Windows Exporter
Log on to your Windows ECS instance as an administrator.
Download the Windows Exporter installer (
windows_exporter-1.22.0-amd64.msi).Run the installer using one of these methods: The installer uses these defaults:
Double-click the
.msifile.Run the following command: ``
cmd 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 Verify that the
windows_exporterservice appears in the Windows Services console.
Verify the installation
Run the following command to confirm that the exporter returns metrics. Replace <port> with the listening port (default: 9182).
curl localhost:<port>/metricsConfigure Windows Exporter
You can modify the configuration file to change the port or adjust which collectors are used. For more configuration options, see the Windows Exporter documentation.
Tag your ECS instance for service discovery
Managed Service for Prometheus uses ECS instance tags to discover monitoring targets. Add a tag to each Windows ECS instance that runs the exporter -- for example, ecs_os:windows.
Complete the Prometheus integration
After you install and configure Windows Exporter and tag your ECS instances, complete the integration in the Managed Service for Prometheus console to start collecting and viewing monitoring data. See Monitor a Windows ECS instance with Managed Service for Prometheus.