---
title: Monitoring Windows server using OTel & Prometheus
description: This tutorial demonstrates how to monitor Windows Server - including IIS and MSSQL - for logs, metrics, and traces using OpenTelemetry Collector and Prometheus Windows Exporter.
url: https://coralogix.com/docs/opentelemetry/monitoring/monitoring--windows-server-using-otel-and-prometheus/
product: infra-monitoring
feature: Infra Monitoring Overview
feature_id: infra-monitoring-general
feature_identifier: infra-monitoring/infra-monitoring-general
last_updated: '2026-10-27'
---

# Monitoring Windows server using OTel & Prometheus

This tutorial demonstrates how to monitor Windows Server - including IIS and MSSQL - for logs, metrics, and traces using OpenTelemetry Collector and Prometheus Windows Exporter.

## Prerequisites

* [admin user](https://support.microsoft.com/en-us/windows/create-a-local-user-or-administrator-account-in-windows-20de74e0-ac7f-3502-a866-32915af2a34d) in Windows with the ability to install services

* `tar.gz` files unpacked

## Configuration

### Windows Exporter

**STEP 1**. Download the [latest MSI from GitHub](https://github.com/prometheus-community/windows_exporter/releases) ([0.22.0.msi](https://github.com/prometheus-community/windows_exporter/releases/download/v0.22.0/windows_exporter-0.22.0-amd64.msi) as of 30 April '23).

**STEP 2**. Open the command line and navigate to `C:\Users\Administrator\Downloads` or the MSI folder.

**STEP 3**. Select which exporter collectors you require - including MSSQL and IIS - from this verbose list: `cpu,cs,logical_disk,net,os,service,system,textfile,iis,mssql`.

**STEP 4**. Open Command Prompt.

[![Command Prompt Windows Server Coralogix OpenTelemetry](/docs/assets/images/commandprompt-1-623x1024-962ed7757056deddb53ecf942394f0e2.webp)](https://coralogix.com/docs/assets/images/commandprompt-1-623x1024-962ed7757056deddb53ecf942394f0e2.webp)

**STEP 5.** Run the following command to install the MSI with the collectors chosen:

```
msiexec /i windows_exporter-0.22.0-amd64.msi ENABLED_COLLECTORS="os,iis"
```

### OpenTelemetry Collector

**STEP 1**. Download the [latest tar.gz from GitHub](https://github.com/open-telemetry/opentelemetry-collector-releases/releases) ([0.76.1.tar.gz](https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.76.1/otelcol-contrib_0.76.1_windows_amd64.tar.gz) as of 30 April '23).

**STEP 2**. Unpack the content into `C:\Program Files\OpenTelemetry Collector`, the same folder the collector MSI installer uses. This may require you to install a program to unpack tar.gz files. Don't install the collector in the root of the `C:` drive: `C:\Program Files` is writable only by administrators, which protects the collector binary and its configuration from changes by other users.

**STEP 3**. Create a `config.yaml` in the same folder, based on the following configuration.

```
receivers:

  filelog:

    include: [ C:\inetpub\logs\LogFiles\*.* ]

  prometheus:

    config:

      scrape_configs:

        - job_name: 'windows_exporter'

          scrape_interval: 15s

          static_configs:

            - targets: ['0.0.0.0:9182']

processors:

  resourcedetection:

    detectors: [system]

    system:

      hostname_sources: ["os"]

  batch:



exporters:

  coralogix:

    domain: "eu2.coralogix.com"

    private_key: "coralogix-api-key"

    application_name: "WinServer"

    subsystem_name: "Host"

    application_name_attributes:

      - "cx.application.name"

    subsystem_name_attributes:

      - "cx.subsystem.name"

    timeout: 30s



service:

  pipelines:

    metrics:

      receivers: [prometheus]

      processors: [resourcedetection, batch]

      exporters: [coralogix]

    logs:

      receivers: [filelog]

      processors: [resourcedetection, batch]

      exporters: [coralogix]
```

**Notes**:

* The example configuration captures metrics from windows\_exporter and logs from IIS. Modify as necessary.

* You are required to input the following variables:

  * `domain`: Your **Coralogix domain**. Choose it with the domain selector at the top of the page, and the configuration updates to match.

  * `private_key`: Your Coralogix [Send-Your-Data API key](https://coralogix.com/docs/user-guides/account-management/api-keys/send-your-data-api-key.md)

  * `application_name` & `subsystem_name`: [Application and subsystem names](https://coralogix.com/docs/user-guides/account-management/account-settings/application-and-subsystem-names.md) as they will appear in your Coralogix UI

**STEP 4**. Install the collector as a service by running the following commands in PowerShell as an administrator:

```
New-Service -Name cx-otelcol -DisplayName cx-otelcol -StartupType Automatic -BinaryPathName '"C:\Program Files\OpenTelemetry Collector\otelcol-contrib.exe" --config "C:\Program Files\OpenTelemetry Collector\config.yaml"'

sc.exe config cx-otelcol start= delayed-auto
```

**STEP 5**. Run the service.

```
sc.exe start cx-otelcol 
```

### Additional Configurations

Configure [Windows exporter dashboards](https://github.com/coralogix/grafana-dashboards/tree/master/windows-prometheus) and the OpenTelemetry Kubernetes Extension to monitor the collector itself.

## Validation & Testing

**STEP 1**. Open Services and check that both `windows_exporter` and `cx-otelcol` service are running.

**STEP 2**. To validate which metrics exist in `windows_exporter`, navigate to <http://localhost:9182/metrics>.

**Notes**:

* `windows_exporter.exe` is unsafe and may require a specific "unblock" in its settings.

* Both `windows_exporter` and `otelcol` can be run without services to check for logs in the command prompt.

**STEP 3**. Navigate to [Grafana Explore](https://coralogix.com/docs/user-guides/visualizations/grafana-plugin.md) to confirm that `windows_*` metrics are arriving in your Coralogix dashboard.

## Additional Links

|           |                                                                                                                                                                                                                                                                                                 |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Github    | [Official OpenTelemetry Collector with Coralogix Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/coralogixexporter)<br />[Coralogix Windows Exporter Dashboards](https://github.com/coralogix/grafana-dashboards/tree/master/windows-prometheus) |
| Tutorials | [Tail Sampling with Coralogix and OpenTelemetry](https://coralogix.com/docs/opentelemetry/tail-sampling/tail-sampling-with-coralogix-and-opentelemetry.md)                                                                                                                                      |
| Blogs     | [How to Configure the OTel Community Demo App to Send Telemetry Data to Coralogix](https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix/)                                                                                                                               |
