Caution
Grafana Agent has reached End-of-Life (EOL) on November 1, 2025. Agent is no longer receiving vendor support and will no longer receive security or bug fixes. Current users of Agent Static mode, Agent Flow mode, and Agent Operator should proceed with migrating to Grafana Alloy. If you have already migrated to Alloy, no further action is required. Read more about why we recommend migrating to Grafana Alloy.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
prometheus.exporter.windows
The prometheus.exporter.windows component embeds
windows_exporter which exposes a
wide variety of hardware and OS metrics for Windows-based systems.
The windows_exporter itself comprises various collectors, which can be
enabled and disabled at will. For more information on collectors, refer to the
collectors-list section.
Usage
prometheus.exporter.windows "LABEL" {
}Arguments
The following arguments can be used to configure the exporter’s behavior. All arguments are optional. Omitted fields take their default values.
enabled_collectors defines a hand-picked list of enabled-by-default
collectors. If set, anything not provided in that list is disabled by
default. See the Collectors list for the default set.
Blocks
The following blocks are supported inside the definition of
prometheus.exporter.windows to configure collector-specific options:
dfsr block
exchange block
The collectors specified by enabled_list can include the following:
ADAccessProcessesTransportQueuesHttpProxyActiveSyncAvailabilityServiceOutlookWebAccessAutodiscoverWorkloadManagementRpcClientAccess
For example, enabled_list may be set to "AvailabilityService,OutlookWebAccess".
iis block
text_file block
When text_file_directory is set, only files with the extension .prom inside the specified directory are read. Each .prom file found must end with an empty line feed to work properly.
smtp block
For a server name to be included, it must match the regular expression specified by whitelist and must not match the regular expression specified by blacklist.
service block
The where_clause argument can be used to limit the response to the services you specify, reducing the size of the response.
process block
Processes must match the regular expression specified by whitelist and must not match the regular expression specified by blacklist to be included.
network block
NIC names must match the regular expression specified by whitelist and must not match the regular expression specified by blacklist to be included.
mssql block
msmq block
Specifying enabled_classes is useful to limit the response to the MSMQs you specify, reducing the size of the response.
logical_disk block
Volume names must match the regular expression specified by whitelist and must not match the regular expression specified by blacklist to be included.
Exported fields
The following fields are exported and can be referenced by other components.
For example, the targets can either be passed to a discovery.relabel
component to rewrite the targets’ label sets, or to a prometheus.scrape
component that collects the exposed metrics.
The exported targets will use the configured in-memory traffic address specified by the run command.
Component health
prometheus.exporter.windows is only reported as unhealthy if given
an invalid configuration. In those cases, exported fields retain their last
healthy values.
Debug information
prometheus.exporter.windows does not expose any component-specific
debug information.
Debug metrics
prometheus.exporter.windows does not expose any component-specific
debug metrics.
Collectors list
The following table lists the available collectors that windows_exporter brings
bundled in. Some collectors only work on specific operating systems; enabling a
collector that is not supported by the host OS where Flow is running
is a no-op.
Users can choose to enable a subset of collectors to limit the amount of
metrics exposed by the prometheus.exporter.windows component,
or disable collectors that are expensive to run.
See the linked documentation on each collector for more information on reported metrics, configuration settings and usage examples.
Example
This example uses a prometheus.scrape component to collect metrics
from prometheus.exporter.windows:
prometheus.exporter.windows "default" {
}
// Configure a prometheus.scrape component to collect windows metrics.
prometheus.scrape "example" {
targets = prometheus.exporter.windows.this.targets
forward_to = [ /* ... */ ]
}


