Skip to content

Commit

Permalink
chore: release 0.29.0.rc0 (#1600)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Sep 10, 2024
1 parent 83b0aa8 commit f712c07
Show file tree
Hide file tree
Showing 119 changed files with 5,056 additions and 2,198 deletions.
14 changes: 12 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
root = true

[*.wxs]
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
tab_width = 4

[*.{json,wxs,xml}]
indent_style = space
indent_size = 4
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 2
6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
- "tools/e2e-output.txt"
branches:
- master
- next
- main
pull_request:
paths:
- "go.mod"
Expand All @@ -21,6 +23,8 @@ on:
- "tools/e2e-output.txt"
branches:
- master
- next
- main

env:
VERSION_PROMU: '0.14.0'
Expand Down Expand Up @@ -101,4 +105,4 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
args: "--timeout=5m --max-same-issues=0"
args: "--max-same-issues=0"
51 changes: 37 additions & 14 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
linters:
enable-all: true
disable:
- containedctx
- contextcheck
- cyclop
- depguard
- dogsled
- dupl
- err113
- execinquery
- exhaustive
- exhaustruct
- exportloopref
Expand All @@ -17,21 +15,16 @@ linters:
- gocognit
- goconst
- gocyclo
- godox
- inamedparam
- ireturn
- gomnd
- lll
- maintidx
- mnd
- nlreturn
- noctx
- testpackage
- varnamelen
- wrapcheck
- wsl
- execinquery
- gomnd
- stylecheck
- maintidx

run:
timeout: 5m

linters-settings:
gosec:
Expand All @@ -52,7 +45,33 @@ linters-settings:
# Support string case: `camel`, `pascal`, `kebab`, `snake`, `upperSnake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`, `header`
json: camel
yaml: snake

gomoddirectives:
replace-allow-list:
- github.com/prometheus/common # https://github.com/prometheus/common/pull/694
forbidigo:
forbid:
- "^(fmt\\.Print(|f|ln)|print|println)$"
- p: "^syscall\\..*$"
msg: use golang.org/x/sys/windows instead of syscall
- p: "^windows\\.NewLazyDLL$"
msg: use NewLazySystemDLL instead NewLazyDLL
sloglint:
no-mixed-args: true
kv-only: false
attr-only: true
no-global: "all"
context: "scope"
static-msg: false
no-raw-keys: false
key-naming-case: snake
forbidden-keys:
- time
- level
- msg
- source
args-on-sep-lines: true
stylecheck:
checks: ["all", "-ST1003"]
issues:
exclude:
- don't use underscores in Go names
Expand All @@ -66,3 +85,7 @@ issues:
- text: "don't use ALL_CAPS in Go names; use CamelCase"
linters:
- revive
- path: pkg/perflib/
linters:
- godox
- stylecheck
33 changes: 19 additions & 14 deletions .promu.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
go:
version: 1.20
# Whenever the Go version is updated here,
# .github/workflows should also be updated.
version: 1.23
repository:
path: github.com/prometheus-community/windows_exporter
path: github.com/prometheus-community/windows_exporter
build:
binaries:
- name: windows_exporter
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Revision}}
-X github.com/prometheus/common/version.Branch={{.Branch}}
-X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
-X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
binaries:
- name: windows_exporter
tags:
all:
- trimpath
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Revision}}
-X github.com/prometheus/common/version.Branch={{.Branch}}
-X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
-X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
tarball:
files:
- LICENSE
files:
- LICENSE
crossbuild:
platforms:
- windows
platforms:
- windows
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Name | Description | Enabled by default
[license](docs/collector.license.md) | Windows license status |
[logical_disk](docs/collector.logical_disk.md) | Logical disks, disk I/O | ✓
[logon](docs/collector.logon.md) | User logon sessions |
[memory](docs/collector.memory.md) | Memory usage metrics |
[memory](docs/collector.memory.md) | Memory usage metrics | ✓
[mscluster](docs/collector.mscluster.md) | MSCluster metrics |
[msmq](docs/collector.msmq.md) | MSMQ queues |
[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 |
Expand Down Expand Up @@ -218,7 +218,7 @@ If you need to skip TLS verification, you can use the `--config.file.insecure-sk

```yaml
collectors:
enabled: cpu,cs,net,service
enabled: cpu,net,service
collector:
service:
services-where: "Name='windows_exporter'"
Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
collectors:
enabled: cpu,cpu_info,cs,exchange,iis,logical_disk,logon,memory,net,os,process,remote_fx,service,system,tcp,time,terminal_services,textfile
enabled: cpu,cpu_info,exchange,iis,logical_disk,logon,memory,net,os,process,remote_fx,service,system,tcp,time,terminal_services,textfile
collector:
service:
services-where: "Name='windows_exporter'"
Expand Down
36 changes: 16 additions & 20 deletions docs/collector.cpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,22 @@ None
## Metrics
These metrics are available on all versions of Windows:

Name | Description | Type | Labels
-----|-------------|------|-------
`windows_cpu_cstate_seconds_total` | Time spent in low-power idle states | counter | `core`, `state`
`windows_cpu_time_total` | Time that processor spent in different modes (dpc, idle, interrupt, privileged, user) | counter | `core`, `mode`
`windows_cpu_interrupts_total` | Total number of received and serviced hardware interrupts | counter | `core`
`windows_cpu_dpcs_total` | Total number of received and serviced deferred procedure calls (DPCs) | counter | `core`

These metrics are only exposed on Windows Server 2008R2 and later:

Name | Description | Type | Labels
-----|-------------|------|-------
`windows_cpu_clock_interrupts_total` | Total number of received and serviced clock tick interrupts | counter | `core`
`windows_cpu_idle_break_events_total` | Total number of time processor was woken from idle | counter | `core`
`windows_cpu_parking_status` | Parking Status represents whether a processor is parked or not | gauge | `core`
`windows_cpu_core_frequency_mhz` | Core frequency in megahertz | gauge | `core`
`windows_cpu_processor_performance_total` | Processor Performance is the number of CPU cycles executing instructions by each core; it is believed to be similar to the value that the APERF MSR would show, were it exposed | counter | `core`
`windows_cpu_processor_mperf_total` | Processor MPerf Total is proportioanl to the number of TSC ticks each core has accumulated while executing instructions. Due to the manner in which it is presented, it should be scaled by 1e2 to properly line up with Processor Performance Total. As above, it is believed to be closely related to the MPERF MSR. | counter | `core`
`windows_cpu_processor_rtc_total` | RTC total is assumed to represent the 64Hz tick rate in Windows. It is not by itself useful, but can be used with `windows_cpu_processor_utility_total` to more accurately measure CPU utilisation than with `windows_cpu_time_total` | counter | `core`
`windows_cpu_processor_utility_total` | Processor Utility Total is a newer, more accurate measure of CPU utilization, in particular handling modern CPUs with variant CPU frequencies. The rate of this counter divided by the rate of `windows_cpu_processor_rtc_total` should provide an accurate view of CPU utilisation on modern systems, as observed in Task Manager. | counter | `core`
`windows_cpu_processor_privileged_utility_total` | Processor Privileged Utility Total, when used in a similar fashion to `windows_cpu_processor_utility_total` will show the portion of CPU utilization which is happening in privileged mode. | counter | `core`
| Name | Description | Type | Labels |
|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|-----------------|
| `windows_cpu_logical_processor` | Number of installed logical processors | counter | `core`, `state` |
| `windows_cpu_cstate_seconds_total` | Time spent in low-power idle states | counter | `core`, `state` |
| `windows_cpu_time_total` | Time that processor spent in different modes (dpc, idle, interrupt, privileged, user) | counter | `core`, `mode` |
| `windows_cpu_interrupts_total` | Total number of received and serviced hardware interrupts | counter | `core` |
| `windows_cpu_dpcs_total` | Total number of received and serviced deferred procedure calls (DPCs) | counter | `core` |
| `windows_cpu_clock_interrupts_total` | Total number of received and serviced clock tick interrupts | counter | `core` |
| `windows_cpu_idle_break_events_total` | Total number of time processor was woken from idle | counter | `core` |
| `windows_cpu_parking_status` | Parking Status represents whether a processor is parked or not | gauge | `core` |
| `windows_cpu_core_frequency_mhz` | Core frequency in megahertz | gauge | `core` |
| `windows_cpu_processor_performance_total` | Processor Performance is the number of CPU cycles executing instructions by each core; it is believed to be similar to the value that the APERF MSR would show, were it exposed | counter | `core` |
| `windows_cpu_processor_mperf_total` | Processor MPerf Total is proportioanl to the number of TSC ticks each core has accumulated while executing instructions. Due to the manner in which it is presented, it should be scaled by 1e2 to properly line up with Processor Performance Total. As above, it is believed to be closely related to the MPERF MSR. | counter | `core` |
| `windows_cpu_processor_rtc_total` | RTC total is assumed to represent the 64Hz tick rate in Windows. It is not by itself useful, but can be used with `windows_cpu_processor_utility_total` to more accurately measure CPU utilisation than with `windows_cpu_time_total` | counter | `core` |
| `windows_cpu_processor_utility_total` | Processor Utility Total is a newer, more accurate measure of CPU utilization, in particular handling modern CPUs with variant CPU frequencies. The rate of this counter divided by the rate of `windows_cpu_processor_rtc_total` should provide an accurate view of CPU utilisation on modern systems, as observed in Task Manager. | counter | `core` |
| `windows_cpu_processor_privileged_utility_total` | Processor Privileged Utility Total, when used in a similar fashion to `windows_cpu_processor_utility_total` will show the portion of CPU utilization which is happening in privileged mode. | counter | `core` |

### Example metric
Show frequency of host CPU cores
Expand Down
4 changes: 4 additions & 0 deletions docs/collector.cs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# cs collector

> [!CAUTION]
> This collector is deprecated and will be removed in a future release.
> See https://github.com/prometheus-community/windows_exporter/pull/1596 for more information.
The cs collector exposes metrics detailing the hardware of the computer system

|||
Expand Down
Loading

0 comments on commit f712c07

Please sign in to comment.