Loading

Windows module

Prefer to use Elastic Agent for this use case?

Refer to the Elastic Integrations documentation.

This is the windows module which collects metrics from Windows systems. The module contains the service metricset, which is set up by default when the windows module is enabled. The service metricset will retrieve status information of the services on the Windows machines. The second windows metricset is perfmon which collects Windows performance counter values.

The Windows module supports the standard configuration options that are described in Modules. Here is an example configuration:

metricbeat.modules:
- module: windows
  metricsets: ["perfmon"]
  enabled: true
  period: 10s
  perfmon.ignore_non_existent_counters: false
  perfmon.group_measurements_by_instance: false
  perfmon.queries:
#  - object: 'Process'
#    instance: ["*"]
#    counters:
#    - name: '% Processor Time'
#      field: cpu_usage
#      format: "float"
#    - name: "Thread Count"

- module: windows
  metricsets: ["service"]
  enabled: true
  period: 60s

- module: windows
  metricsets: ["wmi"]
  period: 60s
  wmi:
    include_null: false         1
    include_queries: false      2
    include_empty_string: false 3
    warning_threshold: 30s      4
    # Default WMI namespace for all queries (if not specified per query)
    # Uncomment to override the default, which is "root\\cimv2".
    # namespace: "root\\cimv2"
    queries:
    - class: Win32_OperatingSystem5
      fields:                     6
       - FreePhysicalMemory
       - FreeSpaceInPagingFiles
       - FreeVirtualMemory
       - LocalDateTime
       - NumberOfUsers
      where: ""                  7
      # Override the WMI namespace for this specific query (optional).
      # If set, this takes precedence over the default namespace above.
      # namespace: "root\\cimv2"8
  1. Exclude fields with null values from the output
  2. Do not include the query string in the output
  3. Exclude fields with empty string values from the output
  4. Maximum time to wait for a query result before logging a warning (defaults to period)
  5. FROM: Class to fetch
  6. SELECT: Fields to retrieve for this WMI class. Omit the setting to fetch all properties
  7. Optional WHERE clause to filter query results
  8. Overrides the metric

The following metricsets are available: