{"id":13596126,"url":"https://github.com/prometheus-community/windows_exporter","last_synced_at":"2025-05-12T05:23:50.200Z","repository":{"id":37268072,"uuid":"66566232","full_name":"prometheus-community/windows_exporter","owner":"prometheus-community","description":"Prometheus exporter for Windows machines","archived":false,"fork":false,"pushed_at":"2025-05-09T12:54:52.000Z","size":6901,"stargazers_count":3155,"open_issues_count":21,"forks_count":720,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-05-11T03:06:15.866Z","etag":null,"topics":["prometheus","prometheus-exporter","windows","wmi"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prometheus-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-08-25T14:41:36.000Z","updated_at":"2025-05-09T12:54:55.000Z","dependencies_parsed_at":"2023-07-15T04:01:50.048Z","dependency_job_id":"5a73c996-92e3-4fbc-9d11-e3229ee86cac","html_url":"https://github.com/prometheus-community/windows_exporter","commit_stats":{"total_commits":835,"total_committers":158,"mean_commits":5.284810126582278,"dds":0.8119760479041916,"last_synced_commit":"7775ef95e69a56d0e89f7ae6a5b09665b6876ab3"},"previous_names":["martinlindhe/windows_exporter","martinlindhe/wmi_exporter"],"tags_count":110,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-community%2Fwindows_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-community%2Fwindows_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-community%2Fwindows_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-community%2Fwindows_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prometheus-community","download_url":"https://codeload.github.com/prometheus-community/windows_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253509782,"owners_count":21919589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prometheus","prometheus-exporter","windows","wmi"],"created_at":"2024-08-01T16:02:09.080Z","updated_at":"2025-05-11T03:06:29.010Z","avatar_url":"https://github.com/prometheus-community.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"config.file# windows_exporter\n\n[![CI](https://github.com/prometheus-community/windows_exporter/actions/workflows/release.yml/badge.svg)](https://github.com/prometheus-community/windows_exporter)\n[![Linting](https://github.com/prometheus-community/windows_exporter/actions/workflows/lint.yml/badge.svg)](https://github.com/prometheus-community/windows_exporter)\n[![GitHub license](https://img.shields.io/github/license/prometheus-community/windows_exporter)](https://github.com/prometheus-community/windows_exporter/blob/master/LICENSE.txt)\n[![Current Release](https://img.shields.io/github/release/prometheus-community/windows_exporter.svg?logo=github)](https://github.com/prometheus-community/windows_exporter/releases/latest)\n[![GitHub Repo stars](https://img.shields.io/github/stars/prometheus-community/windows_exporter?style=flat\u0026logo=github)](https://github.com/prometheus-community/windows_exporter/stargazers)\n[![GitHub all releases](https://img.shields.io/github/downloads/prometheus-community/windows_exporter/total?logo=github)](https://github.com/prometheus-community/windows_exporter/releases/latest)\n[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus-community/windows_exporter)](https://goreportcard.com/report/github.com/prometheus-community/windows_exporter)\n\nA Prometheus exporter for Windows machines.\n\n## Collectors\n\nName     | Description | Enabled by default\n---------|-------------|--------------------\n[ad](docs/collector.ad.md) | Active Directory Domain Services |\n[adcs](docs/collector.adcs.md) | Active Directory Certificate Services |\n[adfs](docs/collector.adfs.md) | Active Directory Federation Services |\n[cache](docs/collector.cache.md) | Cache metrics |\n[cpu](docs/collector.cpu.md) | CPU usage | \u0026#10003;\n[cpu_info](docs/collector.cpu_info.md) | CPU Information |\n[cs](docs/collector.cs.md) | \"Computer System\" metrics (system properties, num cpus/total memory) |\n[container](docs/collector.container.md) | Container metrics |\n[diskdrive](docs/collector.diskdrive.md) | Diskdrive metrics |\n[dfsr](docs/collector.dfsr.md) | DFSR metrics |\n[dhcp](docs/collector.dhcp.md) | DHCP Server |\n[dns](docs/collector.dns.md) | DNS Server |\n[exchange](docs/collector.exchange.md) | Exchange metrics |\n[filetime](docs/collector.filetime.md) | FileTime metrics |\n[fsrmquota](docs/collector.fsrmquota.md) | Microsoft File Server Resource Manager (FSRM) Quotas collector |\n[hyperv](docs/collector.hyperv.md) | Hyper-V hosts |\n[iis](docs/collector.iis.md) | IIS sites and applications |\n[license](docs/collector.license.md) | Windows license status |\n[logical_disk](docs/collector.logical_disk.md) | Logical disks, disk I/O | \u0026#10003;\n[memory](docs/collector.memory.md) | Memory usage metrics | \u0026#10003;\n[mscluster](docs/collector.mscluster.md) | MSCluster metrics |\n[msmq](docs/collector.msmq.md) | MSMQ queues |\n[mssql](docs/collector.mssql.md) | [SQL Server Performance Objects](https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/use-sql-server-objects#SQLServerPOs) metrics  |\n[netframework](docs/collector.netframework.md) | .NET Framework metrics |\n[net](docs/collector.net.md) | Network interface I/O | \u0026#10003;\n[os](docs/collector.os.md) | OS metrics (memory, processes, users) | \u0026#10003;\n[pagefile](docs/collector.pagefile.md) | pagefile metrics |\n[performancecounter](docs/collector.performancecounter.md) | Custom performance counter metrics |\n[physical_disk](docs/collector.physical_disk.md) | physical disk metrics | \u0026#10003;\n[printer](docs/collector.printer.md) | Printer metrics |\n[process](docs/collector.process.md) | Per-process metrics |\n[remote_fx](docs/collector.remote_fx.md) | RemoteFX protocol (RDP) metrics |\n[scheduled_task](docs/collector.scheduled_task.md) | Scheduled Tasks metrics |\n[service](docs/collector.service.md) | Service state metrics | \u0026#10003;\n[smb](docs/collector.smb.md) | SMB Server |\n[smbclient](docs/collector.smbclient.md) | SMB Client |\n[smtp](docs/collector.smtp.md) | IIS SMTP Server |\n[system](docs/collector.system.md) | System calls | \u0026#10003;\n[tcp](docs/collector.tcp.md) | TCP connections |\n[terminal_services](docs/collector.terminal_services.md) | Terminal services (RDS)\n[textfile](docs/collector.textfile.md) | Read prometheus metrics from a text file |\n[thermalzone](docs/collector.thermalzone.md) | Thermal information |\n[time](docs/collector.time.md) | Windows Time Service |\n[udp](docs/collector.udp.md) | UDP connections |\n[update](docs/collector.update.md) | Windows Update Service |\n[vmware](docs/collector.vmware.md) | Performance counters installed by the Vmware Guest agent |\n\nSee the linked documentation on each collector for more information on reported metrics, configuration settings and usage examples.\n\n### Filtering enabled collectors\n\nThe `windows_exporter` will expose all metrics from enabled collectors by default.  This is the recommended way to collect metrics to avoid errors when comparing metrics of different families.\n\nFor advanced use the `windows_exporter` can be passed an optional list of collectors to filter metrics. The `collect[]` parameter may be used multiple times. In Prometheus configuration you can use this syntax under the [scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#\u003cscrape_config\u003e).\n\n```\n  params:\n    collect[]:\n      - foo\n      - bar\n```\n\nThis can be useful for having different Prometheus servers collect specific metrics from nodes.\n\n## Flags\n\nwindows_exporter accepts flags to configure certain behaviours. The ones configuring the global behaviour of the exporter are listed below, while collector-specific ones are documented in the respective collector documentation above.\n\n| Flag                                 | Description                                                                                                                                                                                      | Default value |\n|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|\n| `--web.listen-address`               | host:port for exporter.                                                                                                                                                                          | `:9182`       |\n| `--telemetry.path`                   | URL path for surfacing collected metrics.                                                                                                                                                        | `/metrics`    |\n| `--telemetry.max-requests`           | Maximum number of concurrent requests. 0 to disable.                                                                                                                                             | `5`           |\n| `--collectors.enabled`               | Comma-separated list of collectors to use. Use `[defaults]` as a placeholder which gets expanded containing all the collectors enabled by default.                                               | `[defaults]`  |\n| `--collectors.print`                 | If true, print available collectors and exit.                                                                                                                                                    |               |\n| `--scrape.timeout-margin`            | Seconds to subtract from the timeout allowed by the client. Tune to allow for overhead or high loads.                                                                                            | `0.5`         |\n| `--web.config.file`                  | A [web config][web_config] for setting up TLS and Auth                                                                                                                                           | None          |\n| `--config.file`                      | [Using a config file](#using-a-configuration-file) from path or URL                                                                                                                              | None          |\n| `--log.file`                         | Output file of log messages. One of [stdout, stderr, eventlog, \\\u003cpath to log file\u003e]\u003cbr\u003e**NOTE:** The MSI installer will add a default argument to the installed service setting this to eventlog | stderr        |\n\n## Installation\n\nThe latest release can be downloaded from the [releases page](https://github.com/prometheus-community/windows_exporter/releases).\n\nAll binaries and installation packages are signed with an self-signed certificate. The public key can be found [here](https://github.com/prometheus-community/windows_exporter/blob/master/installer/codesign.cer).\nOnce import into the trusted root certificate store, the binaries and installation packages will be trusted.\n\nEach release provides a .msi installer. The installer will setup the windows_exporter as a Windows service, as well as create an exception in the Windows Firewall.\n\nIf the installer is run without any parameters, the exporter will run with default settings for enabled collectors, ports, etc.\n\nThe installer provides a configuration file to customize the exporter.\n\nThe configuration file\n* is located in the same directory as the exporter executable.\n* has the YAML format and is provided with the `--config.file` parameter.\n* can be used to enable or disable collectors, set collector-specific parameters, and set global parameters.\n\nThe following parameters are available:\n\n| Name                 | Description                                                                                                                                                                        |\n|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ENABLED_COLLECTORS` | As the `--collectors.enabled` flag, provide a comma-separated list of enabled collectors                                                                                           |\n| `CONFIG_FILE`        | Use the `--config.file` flag to specify a config file. If empty, no config file will be set. The special value `config.yaml` set the path to the config.yaml at install dir        |                                                                                     |\n| `LISTEN_ADDR`        | The IP address to bind to. Defaults to an empty string. (any local address)                                                                                                        |\n| `LISTEN_PORT`        | The port to bind to. Defaults to `9182`.                                                                                                                                           |\n| `METRICS_PATH`       | The path at which to serve metrics. Defaults to `/metrics`                                                                                                                         |\n| `TEXTFILE_DIRS`      | Use the `--collector.textfile.directories` flag to specify one or more directories, separated by commas, where the collector should read text files containing metrics             |\n| `REMOTE_ADDR`        | Allows setting comma separated remote IP addresses for the Windows Firewall exception (allow list). Defaults to an empty string (any remote address).                              |\n| `EXTRA_FLAGS`        | Allows passing full CLI flags. Defaults to an empty string. For `--collectors.enabled` and `--config.file`, use the specialized properties  `ENABLED_COLLECTORS` and `CONFIG_FILE` |\n| `ADDLOCAL`           | Enables features within the windows_exporter installer. Supported values: `FirewallException`                                                                                      |\n| `REMOVE`             | Disables features within the windows_exporter installer. Supported values: `FirewallException`                                                                                     |\n| `APPLICATIONFOLDER`  | Directory to install windows_exporter. Defaults to `C:\\Program Files\\windows_exporter`                                                                                             |\n\n\nParameters are sent to the installer via `msiexec`.\nOn PowerShell, the `--%` should be passed before defining properties.\n\nExample invocations:\n\n```powershell\nmsiexec /i \u003cpath-to-msi-file\u003e --% ENABLED_COLLECTORS=os,iis LISTEN_PORT=5000\n```\n\nExample service collector with a custom query.\n```powershell\nmsiexec /i \u003cpath-to-msi-file\u003e --% ENABLED_COLLECTORS=os,service EXTRA_FLAGS=\"--collectors.exchange.enabled=\"\"ADAccessProcesses\"\"\"\n```\n\nDefine a config file.\n```powershell\nmsiexec /i \u003cpath-to-msi-file\u003e --% CONFIG_FILE=\"D:\\config.yaml\"\n```\n\nAlternative install directory\n```powershell\nmsiexec /i \u003cpath-to-msi-file\u003e --% ADDLOCAL=FirewallException APPLICATIONFOLDER=\"F:\\Program Files\\windows_exporter\"\n```\n\nOn some older versions of Windows,\nyou may need to surround parameter values with double quotes to get the installation command parsing properly:\n```powershell\nmsiexec /i C:\\Users\\Administrator\\Downloads\\windows_exporter.msi --% ENABLED_COLLECTORS=\"ad,iis,logon,memory,process,tcp,textfile,thermalzone\" TEXTFILE_DIRS=\"C:\\custom_metrics\\\"\n```\n\nTo install the exporter with creating a firewall exception, use the following command:\n\n```powershell\nmsiexec /i \u003cpath-to-msi-file\u003e --% ADDLOCAL=FirewallException\n```\n\nPowerShell versions 7.3 and above require [PSNativeCommandArgumentPassing](https://learn.microsoft.com/en-us/powershell/scripting/learn/experimental-features?view=powershell-7.3) to be set to `Legacy` when using `--% EXTRA_FLAGS`:\n\n```powershell\n$PSNativeCommandArgumentPassing = 'Legacy'\nmsiexec /i \u003cpath-to-msi-file\u003e ENABLED_COLLECTORS=os,service --% EXTRA_FLAGS=\"--collectors.exchange.enabled=\"\"ADAccessProcesses\"\"\"\n```\n\n## Docker Implementation\n\nThe windows_exporter can be run as a Docker container. The Docker image is available on\n\n* [Docker Hub](https://hub.docker.com/r/prometheuscommunity/windows-exporter): `docker.io/prometheuscommunity/windows-exporter`\n* [GitHub Container Registry](https://github.com/prometheus-community/windows_exporter/pkgs/container/windows-exporter): `ghcr.io/prometheus-community/windows-exporter`\n* [quay.io Registry](https://quay.io/repository/prometheuscommunity/windows-exporter): `quay.io/prometheuscommunity/windows-exporter`\n\n### Tags\n\nThe Docker image is tagged with the version of the exporter. The `latest` tag is also available and points to the latest release.\n\nAdditionally, a flavor `hostprocess` with `-hostprocess` as suffix is based on the https://github.com/microsoft/windows-host-process-containers-base-image\nwhich is designed to run as a Windows host process container. The size of that images is smaller than the default one.\n\n## Kubernetes Implementation\n\nSee detailed steps to install on Windows Kubernetes [here](./kubernetes/kubernetes.md).\n\n## Supported versions\n\n`windows_exporter` supports Windows Server versions 2016 and later, and desktop Windows version 10 and 11 (21H2 or later).\n\nWindows Server 2012 and 2012R2 are supported as best-effort only, but not guaranteed to work.\n\n## Usage\n\n    go get -u github.com/prometheus/promu\n    go get -u github.com/prometheus-community/windows_exporter\n    cd $env:GOPATH/src/github.com/prometheus-community/windows_exporter\n    promu build -v\n    .\\windows_exporter.exe\n\nThe prometheus metrics will be exposed on [localhost:9182](http://localhost:9182)\n\n### HTTP Endpoints\n\nwindows_exporter provides the following HTTP endpoints:\n\n* `/metrics`: Exposes metrics in the [Prometheus text format](https://prometheus.io/docs/instrumenting/exposition_formats/).\n* `/health`: Returns 200 OK when the exporter is running.\n* `/debug/pprof/`: Exposes the [pprof](https://golang.org/pkg/net/http/pprof/) endpoints. Only, if `--debug.enabled` is set.\n\n## Examples\n\n### Enable only service collector and specify a custom query\n\n    .\\windows_exporter.exe --collectors.enabled \"service\" --collector.service.include=\"windows_exporter\"\n\n### Enable only process collector and specify a custom query\n\n    .\\windows_exporter.exe --collectors.enabled \"process\" --collector.process.include=\"firefox.+\"\n\nWhen there are multiple processes with the same name, WMI represents those after the first instance as `process-name#index`. So to get them all, rather than just the first one, the [regular expression](https://en.wikipedia.org/wiki/Regular_expression) must use `.+`. See [process](docs/collector.process.md) for more information.\n\n### Using [defaults] with `--collectors.enabled` argument\n\nUsing `[defaults]`  with `--collectors.enabled` argument which gets expanded with all default collectors.\n\n    .\\windows_exporter.exe --collectors.enabled \"[defaults],process,container\"\n\nThis enables the additional process and container collectors on top of the defaults.\n\n### Using a configuration file\n\nYAML configuration files can be specified with the `--config.file` flag. e.g. `.\\windows_exporter.exe --config.file=config.yml`. If you are using the absolute path, make sure to quote the path, e.g. `.\\windows_exporter.exe --config.file=\"C:\\Program Files\\windows_exporter\\config.yml\"`\n\nIt is also possible to load the configuration from a URL. e.g. `.\\windows_exporter.exe --config.file=\"https://example.com/config.yml\"`\n\nIf you need to skip TLS verification, you can use the `--config.file.insecure-skip-verify` flag. e.g. `.\\windows_exporter.exe --config.file=\"https://example.com/config.yml\" --config.file.insecure-skip-verify`\n\n```yaml\ncollectors:\n  enabled: cpu,net,service\ncollector:\n  service:\n    include: windows_exporter\nlog:\n  level: warn\n```\n\nAn example configuration file can be found [here](docs/example_config.yml).\n\n#### Configuration file notes\n\nConfiguration file values can be mixed with CLI flags. E.G.\n\n`.\\windows_exporter.exe --collectors.enabled=cpu,logon`\n\n```yaml\nlog:\n  level: debug\n```\n\nCLI flags enjoy a higher priority over values specified in the configuration file.\n\n## License\n\nUnder [MIT](LICENSE)\n\n[web_config]: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-community%2Fwindows_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprometheus-community%2Fwindows_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-community%2Fwindows_exporter/lists"}