diff --git a/README.md b/README.md index 4094b7bc..2e327558 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ A Prometheus exporter for Windows machines. ## Collectors + + | Name | Description | Enabled by default | |------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| | [ad](docs/collector.ad.md) | Active Directory Domain Services | | @@ -59,6 +61,7 @@ A Prometheus exporter for Windows machines. | [udp](docs/collector.udp.md) | UDP connections | | | [update](docs/collector.update.md) | Windows Update Service | | | [vmware](docs/collector.vmware.md) | Performance counters installed by the Vmware Guest agent | | + See the linked documentation on each collector for more information on reported metrics, configuration settings and usage examples. @@ -139,7 +142,7 @@ msiexec /i --% ENABLED_COLLECTORS=os,iis LISTEN_PORT=5000 Example service collector with a custom query. ```powershell -msiexec /i --% ENABLED_COLLECTORS=os,service EXTRA_FLAGS="--collectors.exchange.enabled=""ADAccessProcesses""" +msiexec /i --% ENABLED_COLLECTORS=os,service EXTRA_FLAGS="--collector.exchange.enabled=""ADAccessProcesses""" ``` Define a config file. @@ -168,7 +171,7 @@ PowerShell versions 7.3 and above require [PSNativeCommandArgumentPassing](https ```powershell $PSNativeCommandArgumentPassing = 'Legacy' -msiexec /i ENABLED_COLLECTORS=os,service --% EXTRA_FLAGS="--collectors.exchange.enabled=""ADAccessProcesses""" +msiexec /i ENABLED_COLLECTORS=os,service --% EXTRA_FLAGS="--collector.exchange.enabled=""ADAccessProcesses""" ``` ## Docker Implementation diff --git a/docs/collector.dfsr.md b/docs/collector.dfsr.md index 7893d5ce..c08866a4 100644 --- a/docs/collector.dfsr.md +++ b/docs/collector.dfsr.md @@ -12,7 +12,7 @@ Enabled by default? | No ## Flags -### `--collectors.dfsr.sources-enabled` +### `--collector.dfsr.sources-enabled` Comma-separated list of DFSR Perflib sources to use. Supported values are `connection`, `folder` and `volume`. All sources are enabled by default diff --git a/docs/collector.exchange.md b/docs/collector.exchange.md index 52167fd2..3e3f08f2 100644 --- a/docs/collector.exchange.md +++ b/docs/collector.exchange.md @@ -11,11 +11,11 @@ The exchange collector collects metrics from MS Exchange hosts through Performan ## Flags -### `--collectors.exchange.list` -Lists the Perflib Objects that are queried for data along with the perlfib object id +### `--collector.exchange.list` +Lists the Perflib Objects that are queried for data along with the perflib object ID -### `--collectors.exchange.enabled` -Comma-separated list of collectors to use, for example: `--collectors.exchange.enabled=AvailabilityService,OutlookWebAccess`. Matching is case-sensitive. Depending on the exchange installation not all performance counters are available. Use `--collectors.exchange.list` to obtain a list of supported collectors. +### `--collector.exchange.enabled` +Comma-separated list of collectors to use, for example: `--collector.exchange.enabled=AvailabilityService,OutlookWebAccess`. Matching is case-sensitive. Depending on the exchange installation not all performance counters are available. Use `--collector.exchange.list` to obtain a list of supported collectors. ## Metrics | Name | Description | diff --git a/docs/collector.hyperv.md b/docs/collector.hyperv.md index 6348f883..7724196e 100644 --- a/docs/collector.hyperv.md +++ b/docs/collector.hyperv.md @@ -10,9 +10,9 @@ The hyperv collector exposes metrics about the Hyper-V hypervisor ## Flags -### `--collectors.hyperv.enabled` +### `--collector.hyperv.enabled` Comma-separated list of collectors to use, for example: -`--collectors.hyperv.enabled=dynamic_memory_balancer,dynamic_memory_vm,host,hypervisor_logical_processor,hypervisor_root_partition,hypervisor_root_virtual_processor,hypervisor_virtual_processor,legacy_network_adapter,virtual_machine_health_summary,virtual_machine_vid_partition,virtual_network_adapter,virtual_storage_device,virtual_switch,wmi_health` +`--collector.hyperv.enabled=dynamic_memory_balancer,dynamic_memory_vm,host,hypervisor_logical_processor,hypervisor_root_partition,hypervisor_root_virtual_processor,hypervisor_virtual_processor,legacy_network_adapter,virtual_machine_health_summary,virtual_machine_vid_partition,virtual_network_adapter,virtual_storage_device,virtual_switch,wmi_health` ## Metrics @@ -277,7 +277,7 @@ Multiply by the number of threads per core to get the ratio per **physical** cor Sub-collector `wmi_health`, enabled by default. It runs a minimal WQL query (`SELECT Name FROM Msvm_ComputerSystem WHERE Name = ''`) against the -`root/virtualization/v2` namespace on every scrape, so remove it from `--collectors.hyperv.enabled` if you don't need it. +`root/virtualization/v2` namespace on every scrape, so remove it from `--collector.hyperv.enabled` if you don't need it. | Name | Description | Type | Labels | |----------------------------|--------------------------------------------------------------------------------------------------------------|-------|--------| diff --git a/docs/collector.mscluster.md b/docs/collector.mscluster.md index 66324a17..cfe35622 100644 --- a/docs/collector.mscluster.md +++ b/docs/collector.mscluster.md @@ -10,9 +10,9 @@ Enabled by default? | No ## Flags -### `--collectors.mscluster.enabled` +### `--collector.mscluster.enabled` Comma-separated list of collectors to use, for example: -`--collectors.mscluster.enabled=cluster,network,node,resource,resouregroup,shared_volumes,virtualdisk,storagepool`. +`--collector.mscluster.enabled=cluster,network,node,resource,resourcegroup,shared_volumes,virtualdisk,storagepool`. Matching is case-sensitive. ## Metrics diff --git a/docs/collector.mssql.md b/docs/collector.mssql.md index 47fa65fc..037bf7ab 100644 --- a/docs/collector.mssql.md +++ b/docs/collector.mssql.md @@ -10,7 +10,7 @@ Enabled by default? | No ## Flags -### `--collectors.mssql.enabled` +### `--collector.mssql.enabled` Comma-separated list of MSSQL WMI classes to use. Supported values are `accessmethods`, `availreplica`, `bufman`, `databases`, `dbreplica`, `genstats`, `locks`, `memmgr`, `sqlstats`, `sqlerrors`, `transactions`, and `waitstats`. @@ -55,7 +55,7 @@ Comma-separated list of MSSQL WMI classes to use. Supported values are `accessme | `windows_mssql_accessmethods_page_compressions` | Number of data pages that are compressed by using PAGE compression. Includes all objects in the instance of SQL Server | counter | `mssql_instance` | | `windows_mssql_accessmethods_page_splits` | Number of page splits per second that occur as the result of overflowing index pages | counter | `mssql_instance` | | `windows_mssql_accessmethods_probe_scans` | Number of probe scans per second that are used to find at most one single qualified row in an index or base table directly | counter | `mssql_instance` | -| `windows_mssql_accessmethods_range_scans` | Number of qualified range scans through indexes per second | counter | `mssql_instance` | +| `windows_mssql_accessmethods_range_scans` | Number of qualified range scans through indices per second | counter | `mssql_instance` | | `windows_mssql_accessmethods_scan_point_revalidations` | Number of times per second that the scan point had to be revalidated to continue the scan | counter | `mssql_instance` | | `windows_mssql_accessmethods_ghost_record_skips` | Number of ghosted records per second skipped during scans | counter | `mssql_instance` | | `windows_mssql_accessmethods_table_lock_escalations` | Number of times locks on a table were escalated to the TABLE or HoBT granularity | counter | `mssql_instance` | @@ -182,8 +182,8 @@ Comma-separated list of MSSQL WMI classes to use. Supported values are `accessme | `windows_mssql_genstats_soapsql_requests` | Number of SOAP SQL requests started per second | gauge | `mssql_instance` | | `windows_mssql_genstats_soapwsdl_requests` | Number of SOAP Web Service Description Language requests started per second | gauge | `mssql_instance` | | `windows_mssql_genstats_sql_trace_io_provider_lock_waits` | Number of waits for the File IO Provider lock per second | gauge | `mssql_instance` | -| `windows_mssql_genstats_tempdb_recovery_unit_ids_generated` | Number of duplicate tempdb recovery unit id generated | gauge | `mssql_instance` | -| `windows_mssql_genstats_tempdb_rowset_ids_generated` | Number of duplicate tempdb rowset id generated | gauge | `mssql_instance` | +| `windows_mssql_genstats_tempdb_recovery_unit_ids_generated` | Number of duplicate tempdb recovery unit ID generated | gauge | `mssql_instance` | +| `windows_mssql_genstats_tempdb_rowset_ids_generated` | Number of duplicate tempdb rowset ID generated | gauge | `mssql_instance` | | `windows_mssql_genstats_temp_tables_creations` | Number of temporary tables/table variables created per second | counter | `mssql_instance` | | `windows_mssql_genstats_temp_tables_awaiting_destruction` | Number of temporary tables/table variables waiting to be destroyed by the cleanup system thread | gauge | `mssql_instance` | | `windows_mssql_genstats_trace_event_notification_queue_size` | Number of trace event notification instances waiting in the internal queue to be sent through Service Broker | gauge | `mssql_instance` | diff --git a/docs/collector.performancecounter.md b/docs/collector.performancecounter.md index 2510edca..57125df1 100644 --- a/docs/collector.performancecounter.md +++ b/docs/collector.performancecounter.md @@ -276,10 +276,10 @@ collector: counters: - name: "Temperature" type: "gauge" - metric: windows_thermalzone_percent_passive_limit + metric: windows_thermalzone_temperature_kelvin - name: "% Passive Limit" type: "gauge" - metric: windows_thermalzone_temperature_celsius + metric: windows_thermalzone_percent_passive_limit - name: "Throttle Reasons" type: "gauge" metric: windows_thermalzone_throttle_reasons diff --git a/docs/collector.process.md b/docs/collector.process.md index 9c60a1f6..45f8d85f 100644 --- a/docs/collector.process.md +++ b/docs/collector.process.md @@ -21,13 +21,13 @@ lodctr.exe /R ### `--collector.process.include` -Regexp of processes to include. Process name must both match `include` and not +Regular expression of processes to include. Process name must both match `include` and not match `exclude` to be included. Recommended to keep down number of returned metrics. ### `--collector.process.exclude` -Regexp of processes to exclude. Process name must both match `include` and not +Regular expression of processes to exclude. Process name must both match `include` and not match `exclude` to be included. Recommended to keep down number of returned metrics. @@ -40,7 +40,8 @@ Disabled by default, and can be enabled with `--collector.process.iis`. NOTE: Ju ### `--collector.process.counter-version` Version of the process collector to use. 1 for Process V1, 2 for Process V2. -Defaults to 0 which will use the latest version available. +0 uses Process V2 if it is available and falls back to Process V1 otherwise. +Defaults to 1 (Process V1). ### `--collector.process.cmdline` @@ -51,10 +52,10 @@ Enabled by default, and can be turned off with `--no-collector.process.cmdline`. ### Example To match all firefox processes: `--collector.process.include="firefox.*"`. Note that multiple processes with the same name will be disambiguated by -Windows by adding a number suffix, such as `firefox#2`. Your [regexp](https://en.wikipedia.org/wiki/Regular_expression) must take +Windows by adding a number suffix, such as `firefox#2`. Your [regular expression](https://en.wikipedia.org/wiki/Regular_expression) must take these suffixes into consideration. -:warning: The regexp is case-sensitive, so `--collector.process.include="FIREFOX.*"` will **NOT** match a process named `firefox` . +:warning: The regular expression is case-sensitive, so `--collector.process.include="FIREFOX.*"` will **NOT** match a process named `firefox` . To specify multiple names, use the pipe `|` character: ``` @@ -70,10 +71,10 @@ Note that this specific feature **only works** if the [IIS Management Scripts an ### Example -Given an IIS server with two websites called "Prometheus.io" and "Example.com" running under the application pools "Public website" and "Test", the process names returned will look as follows: +Given an IIS server with two sites called "Prometheus.io" and "Example.com" running under the application pools "Public site" and "Test", the process names returned will look as follows: ``` -w3wp_Public website +w3wp_Public site w3wp_Test ``` diff --git a/docs/collector.smb.md b/docs/collector.smb.md index dee54711..9e22f67d 100644 --- a/docs/collector.smb.md +++ b/docs/collector.smb.md @@ -7,16 +7,12 @@ The smb collector collects metrics from MS Smb hosts through perflib ||| -|- Metric name prefix | `smb` -Classes | [Win32_PerfRawData_SMB](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/)
+Classes | [Win32_PerfRawData_SMB](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/)
Enabled by default? | No ## Flags -### `--collectors.smb.list` -Lists the Perflib Objects that are queried for data along with the perlfib object id - -### `--collectors.smb.enabled` -Comma-separated list of collectors to use, for example: `--collectors.smb.enabled=ServerShares`. Matching is case-sensitive. Depending on the smb installation not all performance counters are available. Use `--collectors.smb.list` to obtain a list of supported collectors. +None ## Metrics Name | Description diff --git a/docs/collector.smbclient.md b/docs/collector.smbclient.md index 0141986c..51ca9bb9 100644 --- a/docs/collector.smbclient.md +++ b/docs/collector.smbclient.md @@ -3,16 +3,12 @@ The smbclient collector collects metrics from MS SmbClient hosts through perflib ||| -|- Metric name prefix | `windows_smbclient` -Classes | [Win32_PerfRawData_SMB](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/)
+Classes | [Win32_PerfRawData_SMB](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/)
Enabled by default? | No ## Flags -### `--collectors.smbclient.list` -Lists the Perflib Objects that are queried for data along with the perlfib object id - -### `--collectors.smbclient.enabled` -Comma-separated list of collectors to use, for example: `--collectors.smbclient.enabled=ServerShares`. Matching is case-sensitive. Depending on the smb protocol version not all performance counters may be available. Use `--collectors.smbclient.list` to obtain a list of supported collectors. +None ## Metrics Name | Description | Type | Labels diff --git a/docs/collector.time.md b/docs/collector.time.md index 2f8724c4..2ba961a6 100644 --- a/docs/collector.time.md +++ b/docs/collector.time.md @@ -13,8 +13,8 @@ Please note the Time Service perflib counters are only available on [Windows Ser ## Flags -### `--collectors.time.enabled` -Comma-separated list of collectors to use, for example: `--collectors.time.enabled=ntp,system_time`. +### `--collector.time.enabled` +Comma-separated list of collectors to use, for example: `--collector.time.enabled=ntp,system_time`. Matching is case-sensitive. diff --git a/internal/collector/process/process.go b/internal/collector/process/process.go index 1b3d1a68..3e5b223f 100644 --- a/internal/collector/process/process.go +++ b/internal/collector/process/process.go @@ -141,7 +141,7 @@ func NewWithFlags(app *kingpin.Application) *Collector { app.Flag( "collector.process.counter-version", - "Version of the process collector to use. 1 for Process V1, 2 for Process V2. Defaults to 0 which will use the latest version available.", + "Version of the process collector to use. 1 for Process V1, 2 for Process V2, 0 for Process V2 with fallback to Process V1 if V2 is not available. Defaults to 1.", ).Default(strconv.FormatUint(uint64(c.config.CounterVersion), 10)).Uint8Var(&c.config.CounterVersion) app.Action(func(*kingpin.ParseContext) error {