mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-17 18:26:36 +00:00
Compare commits
79 Commits
v0.31.0-be
...
v0.31.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd7070354a | ||
|
|
373d741260 | ||
|
|
ed15b3c671 | ||
|
|
f8805932b2 | ||
|
|
4fd26fa0fa | ||
|
|
bf722630d6 | ||
|
|
9320e992cc | ||
|
|
7a4e92a473 | ||
|
|
02b9ab4058 | ||
|
|
c3043693df | ||
|
|
7377d48f07 | ||
|
|
d64f1316ca | ||
|
|
492f3af317 | ||
|
|
116203fd19 | ||
|
|
66751baef6 | ||
|
|
b02bddd38e | ||
|
|
3dbc19e18b | ||
|
|
be481e8776 | ||
|
|
aea5c5a2fb | ||
|
|
59ac3072b1 | ||
|
|
66cd489c4a | ||
|
|
4891e23d29 | ||
|
|
f285c3d1e2 | ||
|
|
90dac66bf5 | ||
|
|
34cfda306b | ||
|
|
3e8693f1e3 | ||
|
|
036c858355 | ||
|
|
a69720ae1d | ||
|
|
55c877f536 | ||
|
|
dcf85032ca | ||
|
|
e673f192d2 | ||
|
|
298d820bd6 | ||
|
|
89ac99e6a2 | ||
|
|
3e58d0e568 | ||
|
|
5cf1f7e623 | ||
|
|
0580b330a5 | ||
|
|
25915bb289 | ||
|
|
5e1a802237 | ||
|
|
6dd21a8e00 | ||
|
|
92f213ca7c | ||
|
|
ecd7dcfb0d | ||
|
|
87d76b18e9 | ||
|
|
068bcb7237 | ||
|
|
898e16bcb1 | ||
|
|
6b87441729 | ||
|
|
d31f21d5c6 | ||
|
|
c9fc0ee851 | ||
|
|
23894e0ac8 | ||
|
|
36c68320e5 | ||
|
|
931754b39d | ||
|
|
c3739886d1 | ||
|
|
9b41c805a5 | ||
|
|
48d29d8563 | ||
|
|
d899ae7e24 | ||
|
|
bebc44c948 | ||
|
|
bd536e61cc | ||
|
|
ebc60503ae | ||
|
|
055f4a56df | ||
|
|
fd92bfc1c8 | ||
|
|
e584adaf7e | ||
|
|
2d31d604fb | ||
|
|
4d73502752 | ||
|
|
090eed2959 | ||
|
|
769363d157 | ||
|
|
554607fee2 | ||
|
|
256399f25d | ||
|
|
4dcfb77587 | ||
|
|
c47f32fb1f | ||
|
|
17f1f98179 | ||
|
|
f0d5267874 | ||
|
|
85455bd04d | ||
|
|
f1f763bc79 | ||
|
|
c0af21eb1c | ||
|
|
eed95100ec | ||
|
|
896c9439d5 | ||
|
|
e00a3916b8 | ||
|
|
5294b61339 | ||
|
|
415c134f70 | ||
|
|
cb1769cacc |
26
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
26
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -4,8 +4,12 @@ labels: [ 🐞 bug ]
|
|||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: Thanks for taking the time to fill out this bug report!
|
value: |-
|
||||||
|
> [!NOTE]
|
||||||
|
> Windows Server 2012 and Windows Server 2012 R2 are no longer supported by the windows_exporter project.
|
||||||
|
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |-
|
value: |-
|
||||||
@@ -15,18 +19,18 @@ body:
|
|||||||
```
|
```
|
||||||
PS C:\WINDOWS\system32> cd c:\windows\system32
|
PS C:\WINDOWS\system32> cd c:\windows\system32
|
||||||
PS C:\windows\system32> lodctr /R
|
PS C:\windows\system32> lodctr /R
|
||||||
|
|
||||||
Error: Unable to rebuild performance counter setting from system backup store, error code is 2
|
Error: Unable to rebuild performance counter setting from system backup store, error code is 2
|
||||||
PS C:\windows\system32> cd ..
|
PS C:\windows\system32> cd ..
|
||||||
PS C:\windows> cd syswow64
|
PS C:\windows> cd syswow64
|
||||||
PS C:\windows\syswow64> lodctr /R
|
PS C:\windows\syswow64> lodctr /R
|
||||||
|
|
||||||
Info: Successfully rebuilt performance counter setting from system backup store
|
Info: Successfully rebuilt performance counter setting from system backup store
|
||||||
PS C:\windows\syswow64> winmgmt.exe /RESYNCPERF
|
PS C:\windows\syswow64> winmgmt.exe /RESYNCPERF
|
||||||
```
|
```
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Current Behavior
|
label: Current Behavior
|
||||||
@@ -36,7 +40,7 @@ body:
|
|||||||
```...```
|
```...```
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Expected Behavior
|
label: Expected Behavior
|
||||||
@@ -44,7 +48,7 @@ body:
|
|||||||
placeholder: When I do <X>, <Z> should happen instead.
|
placeholder: When I do <X>, <Z> should happen instead.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Steps To Reproduce
|
label: Steps To Reproduce
|
||||||
@@ -57,7 +61,7 @@ body:
|
|||||||
render: Markdown
|
render: Markdown
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Environment
|
label: Environment
|
||||||
@@ -70,7 +74,7 @@ body:
|
|||||||
- Windows Server Version:
|
- Windows Server Version:
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: windows_exporter logs
|
label: windows_exporter logs
|
||||||
@@ -80,7 +84,7 @@ body:
|
|||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Anything else?
|
label: Anything else?
|
||||||
|
|||||||
4
.github/workflows/container_description.yml
vendored
4
.github/workflows/container_description.yml
vendored
@@ -19,6 +19,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Set docker hub repo name
|
- name: Set docker hub repo name
|
||||||
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
|
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
|
||||||
- name: Push README to Dockerhub
|
- name: Push README to Dockerhub
|
||||||
@@ -41,6 +43,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Set quay.io org name
|
- name: Set quay.io org name
|
||||||
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
|
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
|
||||||
- name: Set quay.io repo name
|
- name: Set quay.io repo name
|
||||||
|
|||||||
16
.github/workflows/lint.yml
vendored
16
.github/workflows/lint.yml
vendored
@@ -18,10 +18,10 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2025
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
|
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
@@ -41,10 +41,10 @@ jobs:
|
|||||||
run: make e2e-test
|
run: make e2e-test
|
||||||
|
|
||||||
promtool:
|
promtool:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2025
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
|
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2025
|
||||||
steps:
|
steps:
|
||||||
# `gofmt` linter run by golangci-lint fails on CRLF line endings (the default for Windows)
|
# `gofmt` linter run by golangci-lint fails on CRLF line endings (the default for Windows)
|
||||||
- name: Set git to use LF
|
- name: Set git to use LF
|
||||||
@@ -83,13 +83,13 @@ jobs:
|
|||||||
git config --global core.eol lf
|
git config --global core.eol lf
|
||||||
|
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
|
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
|
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
|
||||||
with:
|
with:
|
||||||
# renovate: github=golangci/golangci-lint
|
# renovate: github=golangci/golangci-lint
|
||||||
version: v2.0.2
|
version: v2.2.1
|
||||||
args: "--max-same-issues=0"
|
args: "--max-same-issues=0"
|
||||||
|
|||||||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -21,14 +21,14 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2025
|
||||||
environment: build
|
environment: build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
|
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ jobs:
|
|||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: windows_exporter_binaries
|
name: windows_exporter_binaries
|
||||||
|
|
||||||
@@ -231,10 +231,10 @@ jobs:
|
|||||||
org.opencontainers.image.licenses=MIT
|
org.opencontainers.image.licenses=MIT
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
|
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
15
.gitignore
vendored
15
.gitignore
vendored
@@ -4,9 +4,20 @@ VERSION
|
|||||||
*.un~
|
*.un~
|
||||||
output/
|
output/
|
||||||
.vscode
|
.vscode
|
||||||
.idea
|
|
||||||
*.syso
|
*.syso
|
||||||
installer/*.msi
|
installer/*.msi
|
||||||
installer/*.wixpdb
|
installer/*.wixpdb
|
||||||
local/
|
local/
|
||||||
!.idea/inspectionProfiles/Project_Default.xml
|
|
||||||
|
/.idea/*
|
||||||
|
!/.idea/inspectionProfiles/
|
||||||
|
/.idea/inspectionProfiles/*
|
||||||
|
!/.idea/inspectionProfiles/Project_Default.xml
|
||||||
|
!/.idea/dictionaries/
|
||||||
|
/.idea/dictionaries/*
|
||||||
|
!/.idea/dictionaries/project.xml
|
||||||
|
/.idea/copyright/*
|
||||||
|
!/.idea/copyright/profiles_settings.xml
|
||||||
|
!/.idea/copyright/windows_exporter.xml
|
||||||
|
!/.idea/vcs.xml
|
||||||
|
!/.idea/go.imports.xml
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ linters:
|
|||||||
disable:
|
disable:
|
||||||
- cyclop
|
- cyclop
|
||||||
- depguard
|
- depguard
|
||||||
|
- dogsled
|
||||||
- dupl
|
- dupl
|
||||||
- err113
|
- err113
|
||||||
- exhaustive
|
- exhaustive
|
||||||
- exhaustruct
|
- exhaustruct
|
||||||
- fatcontext
|
- fatcontext
|
||||||
|
- funcorder
|
||||||
- funlen
|
- funlen
|
||||||
- gocognit
|
- gocognit
|
||||||
- goconst
|
- goconst
|
||||||
@@ -17,10 +19,13 @@ linters:
|
|||||||
- lll
|
- lll
|
||||||
- maintidx
|
- maintidx
|
||||||
- mnd
|
- mnd
|
||||||
|
- noinlineerr
|
||||||
- paralleltest
|
- paralleltest
|
||||||
|
- tagliatelle
|
||||||
- testpackage
|
- testpackage
|
||||||
- varnamelen
|
- varnamelen
|
||||||
- wrapcheck
|
- wrapcheck
|
||||||
|
- wsl
|
||||||
settings:
|
settings:
|
||||||
forbidigo:
|
forbidigo:
|
||||||
forbid:
|
forbid:
|
||||||
@@ -36,7 +41,7 @@ linters:
|
|||||||
template: |-
|
template: |-
|
||||||
SPDX-License-Identifier: Apache-2.0
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
Copyright {{ YEAR }} {{ COMPANY }}
|
Copyright {{ COMPANY }}
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
@@ -54,6 +59,18 @@ linters:
|
|||||||
excludes:
|
excludes:
|
||||||
- G101
|
- G101
|
||||||
- G115
|
- G115
|
||||||
|
govet:
|
||||||
|
enable-all: true
|
||||||
|
disable:
|
||||||
|
- fieldalignment
|
||||||
|
- shadow
|
||||||
|
revive:
|
||||||
|
rules:
|
||||||
|
- name: var-naming
|
||||||
|
arguments:
|
||||||
|
- [ ] # AllowList - do not remove as args for the rule are positional and won't work without lists first
|
||||||
|
- [ ] # DenyList
|
||||||
|
- - skip-package-name-checks: true
|
||||||
sloglint:
|
sloglint:
|
||||||
no-mixed-args: true
|
no-mixed-args: true
|
||||||
kv-only: false
|
kv-only: false
|
||||||
|
|||||||
11
.idea/copyright/profiles_settings.xml
generated
Normal file
11
.idea/copyright/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<component name="CopyrightManager">
|
||||||
|
<settings default="windows_exporter">
|
||||||
|
<module2copyright>
|
||||||
|
<element module="All Changed Files" copyright="windows_exporter" />
|
||||||
|
</module2copyright>
|
||||||
|
<LanguageOptions name="Go">
|
||||||
|
<option name="fileTypeOverride" value="3" />
|
||||||
|
<option name="block" value="false" />
|
||||||
|
</LanguageOptions>
|
||||||
|
</settings>
|
||||||
|
</component>
|
||||||
7
.idea/copyright/windows_exporter.xml
generated
Normal file
7
.idea/copyright/windows_exporter.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<component name="CopyrightManager">
|
||||||
|
<copyright>
|
||||||
|
<option name="keyword" value="The Prometheus Authors" />
|
||||||
|
<option name="notice" value="SPDX-License-Identifier: Apache-2.0 Copyright The Prometheus Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
||||||
|
<option name="myName" value="windows_exporter" />
|
||||||
|
</copyright>
|
||||||
|
</component>
|
||||||
9
.idea/dictionaries/project.xml
generated
Normal file
9
.idea/dictionaries/project.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<component name="ProjectDictionaryState">
|
||||||
|
<dictionary name="project">
|
||||||
|
<words>
|
||||||
|
<w>containerd</w>
|
||||||
|
<w>setupapi</w>
|
||||||
|
<w>spdx</w>
|
||||||
|
</words>
|
||||||
|
</dictionary>
|
||||||
|
</component>
|
||||||
11
.idea/go.imports.xml
generated
Normal file
11
.idea/go.imports.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GoImports">
|
||||||
|
<option name="excludedPackages">
|
||||||
|
<array>
|
||||||
|
<option value="github.com/pkg/errors" />
|
||||||
|
<option value="golang.org/x/net/context" />
|
||||||
|
</array>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="GoLinter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
~ SPDX-License-Identifier: Apache-2.0
|
~ SPDX-License-Identifier: Apache-2.0
|
||||||
~
|
~
|
||||||
~ Copyright 2025 The Prometheus Authors
|
~ Copyright The Prometheus Authors
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
~ You may obtain a copy of the License at
|
~ You may obtain a copy of the License at
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<configuration default="false" name="all" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="run">
|
<configuration default="false" name="all" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="run">
|
||||||
<module name="windows_exporter" />
|
<module name="windows_exporter" />
|
||||||
<working_directory value="$PROJECT_DIR$" />
|
<working_directory value="$PROJECT_DIR$" />
|
||||||
<parameters value="--web.listen-address=127.0.0.1:9182 --log.level=info --collectors.enabled=ad,adcs,adfs,cache,container,cpu,cpu_info,cs,dfsr,dhcp,diskdrive,dns,exchange,filetime,fsrmquota,hyperv,iis,license,logical_disk,logon,memory,mscluster,msmq,mssql,net,netframework,nps,os,pagefile,performancecounter,physical_disk,printer,process,remote_fx,scheduled_task,service,smb,smbclient,smtp,system,tcp,terminal_services,thermalzone,time,udp,update,vmware,performancecounter --debug.enabled --collector.performancecounter.objects='[{ "name": "memory", "type": "formatted", "object": "Memory", "counters": [{ "name":"Cache Faults/sec", "type":"counter" }]}]'" />
|
<parameters value="--web.listen-address=127.0.0.1:9182 --log.level=info --collectors.enabled=ad,adcs,adfs,cache,container,cpu,cpu_info,dfsr,dhcp,diskdrive,dns,exchange,filetime,fsrmquota,hyperv,iis,license,logical_disk,memory,mscluster,msmq,mssql,net,netframework,nps,os,pagefile,performancecounter,physical_disk,printer,process,remote_fx,scheduled_task,service,smb,smbclient,smtp,system,tcp,terminal_services,thermalzone,time,udp,update,vmware,performancecounter --debug.enabled --collector.performancecounter.objects='[{ "name": "memory", "type": "formatted", "object": "Memory", "counters": [{ "name":"Cache Faults/sec", "type":"counter" }]}]'" />
|
||||||
<sudo value="true" />
|
<sudo value="true" />
|
||||||
<kind value="PACKAGE" />
|
<kind value="PACKAGE" />
|
||||||
<package value="github.com/prometheus-community/windows_exporter/cmd/windows_exporter" />
|
<package value="github.com/prometheus-community/windows_exporter/cmd/windows_exporter" />
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -29,7 +29,7 @@ test:
|
|||||||
go test -v ./...
|
go test -v ./...
|
||||||
|
|
||||||
bench:
|
bench:
|
||||||
go test -v -bench='benchmarkcollector' ./internal/collectors/{cpu,logical_disk,physical_disk,logon,memory,net,printer,process,service,system,tcp,time}
|
go test -v -bench='benchmarkcollector' ./internal/collectors/{cpu,logical_disk,physical_disk,memory,net,printer,process,service,system,tcp,time}
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
golangci-lint -c .golangci.yaml run
|
golangci-lint -c .golangci.yaml run
|
||||||
|
|||||||
105
README.md
105
README.md
@@ -12,54 +12,54 @@ A Prometheus exporter for Windows machines.
|
|||||||
|
|
||||||
## Collectors
|
## Collectors
|
||||||
|
|
||||||
Name | Description | Enabled by default
|
| Name | Description | Enabled by default |
|
||||||
---------|-------------|--------------------
|
|------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|
|
||||||
[ad](docs/collector.ad.md) | Active Directory Domain Services |
|
| [ad](docs/collector.ad.md) | Active Directory Domain Services | |
|
||||||
[adcs](docs/collector.adcs.md) | Active Directory Certificate Services |
|
| [adcs](docs/collector.adcs.md) | Active Directory Certificate Services | |
|
||||||
[adfs](docs/collector.adfs.md) | Active Directory Federation Services |
|
| [adfs](docs/collector.adfs.md) | Active Directory Federation Services | |
|
||||||
[cache](docs/collector.cache.md) | Cache metrics |
|
| [cache](docs/collector.cache.md) | Cache metrics | |
|
||||||
[cpu](docs/collector.cpu.md) | CPU usage | ✓
|
| [cpu](docs/collector.cpu.md) | CPU usage | ✓ |
|
||||||
[cpu_info](docs/collector.cpu_info.md) | CPU Information |
|
| [cpu_info](docs/collector.cpu_info.md) | CPU Information | |
|
||||||
[cs](docs/collector.cs.md) | "Computer System" metrics (system properties, num cpus/total memory) |
|
| [container](docs/collector.container.md) | Container metrics | |
|
||||||
[container](docs/collector.container.md) | Container metrics |
|
| [diskdrive](docs/collector.diskdrive.md) | Diskdrive metrics | |
|
||||||
[diskdrive](docs/collector.diskdrive.md) | Diskdrive metrics |
|
| [dfsr](docs/collector.dfsr.md) | DFSR metrics | |
|
||||||
[dfsr](docs/collector.dfsr.md) | DFSR metrics |
|
| [dhcp](docs/collector.dhcp.md) | DHCP Server | |
|
||||||
[dhcp](docs/collector.dhcp.md) | DHCP Server |
|
| [dns](docs/collector.dns.md) | DNS Server | |
|
||||||
[dns](docs/collector.dns.md) | DNS Server |
|
| [exchange](docs/collector.exchange.md) | Exchange metrics | |
|
||||||
[exchange](docs/collector.exchange.md) | Exchange metrics |
|
| [filetime](docs/collector.filetime.md) | FileTime metrics | |
|
||||||
[filetime](docs/collector.filetime.md) | FileTime metrics |
|
| [fsrmquota](docs/collector.fsrmquota.md) | Microsoft File Server Resource Manager (FSRM) Quotas collector | |
|
||||||
[fsrmquota](docs/collector.fsrmquota.md) | Microsoft File Server Resource Manager (FSRM) Quotas collector |
|
| [gpu](docs/collector.gpu.md) | GPU metrics | |
|
||||||
[hyperv](docs/collector.hyperv.md) | Hyper-V hosts |
|
| [hyperv](docs/collector.hyperv.md) | Hyper-V hosts | |
|
||||||
[iis](docs/collector.iis.md) | IIS sites and applications |
|
| [iis](docs/collector.iis.md) | IIS sites and applications | |
|
||||||
[license](docs/collector.license.md) | Windows license status |
|
| [license](docs/collector.license.md) | Windows license status | |
|
||||||
[logical_disk](docs/collector.logical_disk.md) | Logical disks, disk I/O | ✓
|
| [logical_disk](docs/collector.logical_disk.md) | Logical disks, disk I/O | ✓ |
|
||||||
[memory](docs/collector.memory.md) | Memory usage metrics | ✓
|
| [memory](docs/collector.memory.md) | Memory usage metrics | ✓ |
|
||||||
[mscluster](docs/collector.mscluster.md) | MSCluster metrics |
|
| [mscluster](docs/collector.mscluster.md) | MSCluster metrics | |
|
||||||
[msmq](docs/collector.msmq.md) | MSMQ queues |
|
| [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 |
|
| [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 | |
|
||||||
[netframework](docs/collector.netframework.md) | .NET Framework metrics |
|
| [netframework](docs/collector.netframework.md) | .NET Framework metrics | |
|
||||||
[net](docs/collector.net.md) | Network interface I/O | ✓
|
| [net](docs/collector.net.md) | Network interface I/O | ✓ |
|
||||||
[os](docs/collector.os.md) | OS metrics (memory, processes, users) | ✓
|
| [os](docs/collector.os.md) | OS metrics (memory, processes, users) | ✓ |
|
||||||
[pagefile](docs/collector.pagefile.md) | pagefile metrics |
|
| [pagefile](docs/collector.pagefile.md) | pagefile metrics | |
|
||||||
[performancecounter](docs/collector.performancecounter.md) | Custom performance counter metrics |
|
| [performancecounter](docs/collector.performancecounter.md) | Custom performance counter metrics | |
|
||||||
[physical_disk](docs/collector.physical_disk.md) | physical disk metrics | ✓
|
| [physical_disk](docs/collector.physical_disk.md) | physical disk metrics | ✓ |
|
||||||
[printer](docs/collector.printer.md) | Printer metrics |
|
| [printer](docs/collector.printer.md) | Printer metrics | |
|
||||||
[process](docs/collector.process.md) | Per-process metrics |
|
| [process](docs/collector.process.md) | Per-process metrics | |
|
||||||
[remote_fx](docs/collector.remote_fx.md) | RemoteFX protocol (RDP) metrics |
|
| [remote_fx](docs/collector.remote_fx.md) | RemoteFX protocol (RDP) metrics | |
|
||||||
[scheduled_task](docs/collector.scheduled_task.md) | Scheduled Tasks metrics |
|
| [scheduled_task](docs/collector.scheduled_task.md) | Scheduled Tasks metrics | |
|
||||||
[service](docs/collector.service.md) | Service state metrics | ✓
|
| [service](docs/collector.service.md) | Service state metrics | ✓ |
|
||||||
[smb](docs/collector.smb.md) | SMB Server |
|
| [smb](docs/collector.smb.md) | SMB Server | |
|
||||||
[smbclient](docs/collector.smbclient.md) | SMB Client |
|
| [smbclient](docs/collector.smbclient.md) | SMB Client | |
|
||||||
[smtp](docs/collector.smtp.md) | IIS SMTP Server |
|
| [smtp](docs/collector.smtp.md) | IIS SMTP Server | |
|
||||||
[system](docs/collector.system.md) | System calls | ✓
|
| [system](docs/collector.system.md) | System calls | ✓ |
|
||||||
[tcp](docs/collector.tcp.md) | TCP connections |
|
| [tcp](docs/collector.tcp.md) | TCP connections | |
|
||||||
[terminal_services](docs/collector.terminal_services.md) | Terminal services (RDS)
|
| [terminal_services](docs/collector.terminal_services.md) | Terminal services (RDS) | |
|
||||||
[textfile](docs/collector.textfile.md) | Read prometheus metrics from a text file |
|
| [textfile](docs/collector.textfile.md) | Read prometheus metrics from a text file | |
|
||||||
[thermalzone](docs/collector.thermalzone.md) | Thermal information |
|
| [thermalzone](docs/collector.thermalzone.md) | Thermal information | |
|
||||||
[time](docs/collector.time.md) | Windows Time Service |
|
| [time](docs/collector.time.md) | Windows Time Service | |
|
||||||
[udp](docs/collector.udp.md) | UDP connections |
|
| [udp](docs/collector.udp.md) | UDP connections | |
|
||||||
[update](docs/collector.update.md) | Windows Update Service |
|
| [update](docs/collector.update.md) | Windows Update Service | |
|
||||||
[vmware](docs/collector.vmware.md) | Performance counters installed by the Vmware Guest agent |
|
| [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.
|
See the linked documentation on each collector for more information on reported metrics, configuration settings and usage examples.
|
||||||
|
|
||||||
@@ -86,13 +86,10 @@ windows_exporter accepts flags to configure certain behaviours. The ones configu
|
|||||||
|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||||
| `--web.listen-address` | host:port for exporter. | `:9182` |
|
| `--web.listen-address` | host:port for exporter. | `:9182` |
|
||||||
| `--telemetry.path` | URL path for surfacing collected metrics. | `/metrics` |
|
| `--telemetry.path` | URL path for surfacing collected metrics. | `/metrics` |
|
||||||
| `--telemetry.max-requests` | Maximum number of concurrent requests. 0 to disable. | `5` |
|
|
||||||
| `--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]` |
|
| `--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]` |
|
||||||
| `--collectors.print` | If true, print available collectors and exit. | |
|
|
||||||
| `--scrape.timeout-margin` | Seconds to subtract from the timeout allowed by the client. Tune to allow for overhead or high loads. | `0.5` |
|
| `--scrape.timeout-margin` | Seconds to subtract from the timeout allowed by the client. Tune to allow for overhead or high loads. | `0.5` |
|
||||||
| `--web.config.file` | A [web config][web_config] for setting up TLS and Auth | None |
|
| `--web.config.file` | A [web config][web_config] for setting up TLS and Auth | None |
|
||||||
| `--config.file` | [Using a config file](#using-a-configuration-file) from path or URL | None |
|
| `--config.file` | [Using a config file](#using-a-configuration-file) from path or URL | None |
|
||||||
| `--config.file.insecure-skip-verify` | Skip TLS when loading config file from URL | false |
|
|
||||||
| `--log.file` | Output file of log messages. One of [stdout, stderr, eventlog, \<path to log file>]<br>**NOTE:** The MSI installer will add a default argument to the installed service setting this to eventlog | stderr |
|
| `--log.file` | Output file of log messages. One of [stdout, stderr, eventlog, \<path to log file>]<br>**NOTE:** The MSI installer will add a default argument to the installed service setting this to eventlog | stderr |
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@@ -157,7 +154,7 @@ msiexec /i <path-to-msi-file> --% ADDLOCAL=FirewallException APPLICATIONFOLDER="
|
|||||||
On some older versions of Windows,
|
On some older versions of Windows,
|
||||||
you may need to surround parameter values with double quotes to get the installation command parsing properly:
|
you may need to surround parameter values with double quotes to get the installation command parsing properly:
|
||||||
```powershell
|
```powershell
|
||||||
msiexec /i C:\Users\Administrator\Downloads\windows_exporter.msi --% ENABLED_COLLECTORS="ad,iis,logon,memory,process,tcp,textfile,thermalzone" TEXTFILE_DIRS="C:\custom_metrics\"
|
msiexec /i C:\Users\Administrator\Downloads\windows_exporter.msi --% ENABLED_COLLECTORS="ad,iis,memory,process,tcp,textfile,thermalzone" TEXTFILE_DIRS="C:\custom_metrics\"
|
||||||
```
|
```
|
||||||
|
|
||||||
To install the exporter with creating a firewall exception, use the following command:
|
To install the exporter with creating a firewall exception, use the following command:
|
||||||
@@ -196,7 +193,7 @@ See detailed steps to install on Windows Kubernetes [here](./kubernetes/kubernet
|
|||||||
|
|
||||||
`windows_exporter` supports Windows Server versions 2016 and later, and desktop Windows version 10 and 11 (21H2 or later).
|
`windows_exporter` supports Windows Server versions 2016 and later, and desktop Windows version 10 and 11 (21H2 or later).
|
||||||
|
|
||||||
Windows Server 2012 and 2012R2 are supported as best-effort only, but not guaranteed to work.
|
There are known compatibility issues with Windows Server 2012 R2 and earlier versions.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -260,7 +257,7 @@ An example configuration file can be found [here](docs/example_config.yml).
|
|||||||
|
|
||||||
Configuration file values can be mixed with CLI flags. E.G.
|
Configuration file values can be mixed with CLI flags. E.G.
|
||||||
|
|
||||||
`.\windows_exporter.exe --collectors.enabled=cpu,logon`
|
`.\windows_exporter.exe --collectors.enabled=cpu`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
log:
|
log:
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
// Copyright 2025 The Prometheus Authors
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -55,7 +42,7 @@ var (
|
|||||||
stopCh = make(chan struct{})
|
stopCh = make(chan struct{})
|
||||||
|
|
||||||
// serviceManagerFinishedCh is a channel to send a signal to the main function that the service manager has stopped the service.
|
// serviceManagerFinishedCh is a channel to send a signal to the main function that the service manager has stopped the service.
|
||||||
serviceManagerFinishedCh = make(chan struct{})
|
serviceManagerFinishedCh = make(chan struct{}, 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
// IsService variable declaration allows initiating time-sensitive components like registering the Windows service
|
// IsService variable declaration allows initiating time-sensitive components like registering the Windows service
|
||||||
@@ -115,6 +102,7 @@ type windowsExporterService struct{}
|
|||||||
// Execute is the entry point for the Windows service manager.
|
// Execute is the entry point for the Windows service manager.
|
||||||
func (s *windowsExporterService) Execute(_ []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (bool, uint32) {
|
func (s *windowsExporterService) Execute(_ []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (bool, uint32) {
|
||||||
changes <- svc.Status{State: svc.StartPending}
|
changes <- svc.Status{State: svc.StartPending}
|
||||||
|
// Send a signal to the main function that the service is running.
|
||||||
changes <- svc.Status{State: svc.Running, Accepts: svc.AcceptStop | svc.AcceptShutdown}
|
changes <- svc.Status{State: svc.Running, Accepts: svc.AcceptStop | svc.AcceptShutdown}
|
||||||
|
|
||||||
for {
|
for {
|
||||||
@@ -192,6 +180,7 @@ func logToFile(msg string) {
|
|||||||
// https://github.com/DataDog/datadog-agent/blob/46740e82ef40a04c4be545ed8c16a4b0d1f046cf/pkg/util/winutil/servicemain/servicemain.go#L128
|
// https://github.com/DataDog/datadog-agent/blob/46740e82ef40a04c4be545ed8c16a4b0d1f046cf/pkg/util/winutil/servicemain/servicemain.go#L128
|
||||||
func isWindowsService() (bool, error) {
|
func isWindowsService() (bool, error) {
|
||||||
var currentProcess windows.PROCESS_BASIC_INFORMATION
|
var currentProcess windows.PROCESS_BASIC_INFORMATION
|
||||||
|
|
||||||
infoSize := uint32(unsafe.Sizeof(currentProcess))
|
infoSize := uint32(unsafe.Sizeof(currentProcess))
|
||||||
|
|
||||||
err := windows.NtQueryInformationProcess(windows.CurrentProcess(), windows.ProcessBasicInformation, unsafe.Pointer(¤tProcess), infoSize, &infoSize)
|
err := windows.NtQueryInformationProcess(windows.CurrentProcess(), windows.ProcessBasicInformation, unsafe.Pointer(¤tProcess), infoSize, &infoSize)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -19,179 +19,5 @@ The main package for the windows_exporter executable.
|
|||||||
usage: windows_exporter [<flags>]
|
usage: windows_exporter [<flags>]
|
||||||
|
|
||||||
A metrics collector for Windows.
|
A metrics collector for Windows.
|
||||||
|
|
||||||
Flags:
|
|
||||||
|
|
||||||
-h, --[no-]help Show context-sensitive help (also try
|
|
||||||
--help-long and --help-man).
|
|
||||||
--config.file=CONFIG.FILE YAML configuration file to use. Values set in
|
|
||||||
this file will be overridden by CLI flags.
|
|
||||||
--[no-]config.file.insecure-skip-verify
|
|
||||||
Skip TLS verification in loading YAML
|
|
||||||
configuration.
|
|
||||||
--web.listen-address=:9182 ...
|
|
||||||
Addresses on which to expose metrics and web
|
|
||||||
interface. Repeatable for multiple addresses.
|
|
||||||
Examples: `:9100` or `[::1]:9100` for http,
|
|
||||||
`vsock://:9100` for vsock
|
|
||||||
--web.config.file="" Path to configuration file that can
|
|
||||||
enable TLS or authentication. See:
|
|
||||||
https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md
|
|
||||||
--telemetry.path="/metrics"
|
|
||||||
URL path for surfacing collected metrics.
|
|
||||||
--[no-]web.disable-exporter-metrics
|
|
||||||
Exclude metrics about the exporter itself
|
|
||||||
(promhttp_*, process_*, go_*).
|
|
||||||
--telemetry.max-requests=5
|
|
||||||
Maximum number of concurrent requests. 0 to
|
|
||||||
disable.
|
|
||||||
--collectors.enabled="cpu,cs,memory,logical_disk,physical_disk,net,os,service,system"
|
|
||||||
Comma-separated list of collectors to use.
|
|
||||||
Use '[defaults]' as a placeholder for all the
|
|
||||||
collectors enabled by default.
|
|
||||||
--scrape.timeout-margin=0.5
|
|
||||||
Seconds to subtract from the timeout allowed by
|
|
||||||
the client. Tune to allow for overhead or high
|
|
||||||
loads.
|
|
||||||
--[no-]debug.enabled If true, windows_exporter will expose debug
|
|
||||||
endpoints under /debug/pprof.
|
|
||||||
--process.priority="normal"
|
|
||||||
Priority of the exporter process. Higher
|
|
||||||
priorities may improve exporter responsiveness
|
|
||||||
during periods of system load. Can be one of
|
|
||||||
["realtime", "high", "abovenormal", "normal",
|
|
||||||
"belownormal", "low"]
|
|
||||||
--log.level=info Only log messages with the given severity or
|
|
||||||
above. One of: [debug, info, warn, error]
|
|
||||||
--log.format=logfmt Output format of log messages. One of: [logfmt,
|
|
||||||
json]
|
|
||||||
--log.file=stderr Output file of log messages. One of [stdout,
|
|
||||||
stderr, eventlog, <path to log file>]
|
|
||||||
--[no-]version Show application version.
|
|
||||||
--collector.scheduled_task.exclude=""
|
|
||||||
Regexp of tasks to exclude. Task path must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.scheduled_task.include=".+"
|
|
||||||
Regexp of tasks to include. Task path must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--[no-]collector.updates.online
|
|
||||||
Whether to search for updates online.
|
|
||||||
--collector.updates.scrape-interval=6h0m0s
|
|
||||||
Define the interval of scraping Windows Update
|
|
||||||
information.
|
|
||||||
--[no-]collector.exchange.list
|
|
||||||
List the collectors along with their perflib
|
|
||||||
object name/ids
|
|
||||||
--collector.exchange.enabled="ADAccessProcesses,TransportQueues,HttpProxy,ActiveSync,AvailabilityService,OutlookWebAccess,Autodiscover,WorkloadManagement,RpcClientAccess,MapiHttpEmsmdb"
|
|
||||||
Comma-separated list of collectors to use.
|
|
||||||
Defaults to all, if not specified.
|
|
||||||
--collector.net.nic-exclude=""
|
|
||||||
Regexp of NIC:s to exclude. NIC name must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.net.nic-include=".+"
|
|
||||||
Regexp of NIC:s to include. NIC name must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.net.enabled="metrics,nic_addresses"
|
|
||||||
Comma-separated list of collectors to use.
|
|
||||||
Defaults to all, if not specified.
|
|
||||||
--collector.mscluster.enabled="cluster,network,node,resource,resourcegroup"
|
|
||||||
Comma-separated list of collectors to use.
|
|
||||||
--collector.mssql.enabled="accessmethods,availreplica,bufman,databases,dbreplica,genstats,locks,memmgr,sqlerrors,sqlstats,transactions,waitstats"
|
|
||||||
Comma-separated list of collectors to use.
|
|
||||||
--collector.mssql.port=1433
|
|
||||||
Port of MSSQL server used for
|
|
||||||
windows_mssql_info metric.
|
|
||||||
--collector.physical_disk.disk-exclude=""
|
|
||||||
Regexp of disks to exclude. Disk number must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.physical_disk.disk-include=".+"
|
|
||||||
Regexp of disks to include. Disk number must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.textfile.directories="C:\\Users\\Jan\\GolandProjects\\windows_exporter\\textfile_inputs"
|
|
||||||
Directory or Directories to read text files
|
|
||||||
with metrics from.
|
|
||||||
--collector.filetime.file-patterns=""
|
|
||||||
Comma-separated list of file patterns.
|
|
||||||
Each pattern is a glob pattern that can
|
|
||||||
contain `*`, `?`, and `**` (recursive). See
|
|
||||||
https://github.com/bmatcuk/doublestar#patterns
|
|
||||||
--collector.iis.app-exclude=""
|
|
||||||
Regexp of apps to exclude. App name must both
|
|
||||||
match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.iis.app-include=".+"
|
|
||||||
Regexp of apps to include. App name must both
|
|
||||||
match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.iis.site-exclude=""
|
|
||||||
Regexp of sites to exclude. Site name must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.iis.site-include=".+"
|
|
||||||
Regexp of sites to include. Site name must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.perfdata.objects=""
|
|
||||||
Objects of performance data to observe.
|
|
||||||
See docs for more information on how to use
|
|
||||||
this flag. By default, no objects are observed.
|
|
||||||
--collector.printer.include=".+"
|
|
||||||
Regular expression to match printers to collect
|
|
||||||
metrics for
|
|
||||||
--collector.printer.exclude=""
|
|
||||||
Regular expression to match printers to exclude
|
|
||||||
--collector.process.exclude=""
|
|
||||||
Regexp of processes to exclude. Process name
|
|
||||||
must both match include and not match exclude
|
|
||||||
to be included.
|
|
||||||
--collector.process.include=".+"
|
|
||||||
Regexp of processes to include. Process name
|
|
||||||
must both match include and not match exclude
|
|
||||||
to be included.
|
|
||||||
--[no-]collector.process.iis
|
|
||||||
Enable IIS worker process name queries.
|
|
||||||
May cause the collector to leak memory.
|
|
||||||
--collector.hyperv.enabled="datastore,dynamic_memory_balancer,dynamic_memory_vm,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_network_adapter_drop_reasons,virtual_smb,virtual_storage_device,virtual_switch"
|
|
||||||
Comma-separated list of collectors to use.
|
|
||||||
--collector.logical_disk.volume-exclude=""
|
|
||||||
Regexp of volumes to exclude. Volume name must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.logical_disk.volume-include=".+"
|
|
||||||
Regexp of volumes to include. Volume name must
|
|
||||||
both match include and not match exclude to be
|
|
||||||
included.
|
|
||||||
--collector.smtp.server-exclude=""
|
|
||||||
Regexp of virtual servers to exclude. Server
|
|
||||||
name must both match include and not match
|
|
||||||
exclude to be included.
|
|
||||||
--collector.smtp.server-include=".+"
|
|
||||||
Regexp of virtual servers to include. Server
|
|
||||||
name must both match include and not match
|
|
||||||
exclude to be included.
|
|
||||||
--collector.tcp.enabled="metrics,connections_state"
|
|
||||||
Comma-separated list of collectors to use.
|
|
||||||
Defaults to all, if not specified.
|
|
||||||
--collector.dfsr.sources-enabled="connection,folder,volume"
|
|
||||||
Comma-separated list of DFSR Perflib sources to
|
|
||||||
use.
|
|
||||||
--collector.service.exclude=""
|
|
||||||
Regexp of service to exclude. Service name (not
|
|
||||||
the display name!) must both match include and
|
|
||||||
not match exclude to be included.
|
|
||||||
--collector.service.include=".+"
|
|
||||||
Regexp of service to include. Process name (not
|
|
||||||
the display name!) must both match include and
|
|
||||||
not match exclude to be included.
|
|
||||||
--collector.time.enabled="system_time,ntp"
|
|
||||||
Comma-separated list of collectors to use.
|
|
||||||
Defaults to all, if not specified. ntp may not
|
|
||||||
available on all systems.
|
|
||||||
*/
|
*/
|
||||||
package main
|
package main
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -171,7 +171,7 @@ func waitUntilListening(tb testing.TB, network, address string) error {
|
|||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
for range 10 {
|
for range 20 {
|
||||||
conn, err = net.DialTimeout(network, address, 100*time.Millisecond)
|
conn, err = net.DialTimeout(network, address, 100*time.Millisecond)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
_ = conn.Close()
|
_ = conn.Close()
|
||||||
@@ -184,6 +184,13 @@ func waitUntilListening(tb testing.TB, network, address string) error {
|
|||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
var winErr windows.Errno
|
||||||
|
if errors.As(err, &winErr) {
|
||||||
|
return fmt.Errorf("listener not listening: %w (#%d)", winErr, uint32(winErr))
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Errorf("listener not listening: %w", err)
|
return fmt.Errorf("listener not listening: %w", err)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# example configuration file for windows_exporter
|
# example configuration file for windows_exporter
|
||||||
|
|
||||||
collectors:
|
collectors:
|
||||||
enabled: cpu,cpu_info,exchange,iis,logical_disk,logon,memory,net,os,performancecounter,process,remote_fx,service,system,tcp,time,terminal_services,textfile
|
enabled: cpu,cpu_info,exchange,iis,logical_disk,memory,net,os,performancecounter,process,remote_fx,service,system,tcp,time,terminal_services,textfile
|
||||||
collector:
|
collector:
|
||||||
service:
|
service:
|
||||||
include: "windows_exporter"
|
include: "windows_exporter"
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ This directory contains documentation of the collectors in the windows_exporter,
|
|||||||
- [`container`](collector.container.md)
|
- [`container`](collector.container.md)
|
||||||
- [`cpu`](collector.cpu.md)
|
- [`cpu`](collector.cpu.md)
|
||||||
- [`cpu_info`](collector.cpu_info.md)
|
- [`cpu_info`](collector.cpu_info.md)
|
||||||
- [`cs`](collector.cs.md)
|
|
||||||
- [`dfsr`](collector.dfsr.md)
|
- [`dfsr`](collector.dfsr.md)
|
||||||
- [`dhcp`](collector.dhcp.md)
|
- [`dhcp`](collector.dhcp.md)
|
||||||
- [`diskdrive`](collector.diskdrive.md)
|
- [`diskdrive`](collector.diskdrive.md)
|
||||||
@@ -20,7 +19,6 @@ This directory contains documentation of the collectors in the windows_exporter,
|
|||||||
- [`iis`](collector.iis.md)
|
- [`iis`](collector.iis.md)
|
||||||
- [`license`](collector.license.md)
|
- [`license`](collector.license.md)
|
||||||
- [`logical_disk`](collector.logical_disk.md)
|
- [`logical_disk`](collector.logical_disk.md)
|
||||||
- [`logon`](collector.logon.md)
|
|
||||||
- [`memory`](collector.memory.md)
|
- [`memory`](collector.memory.md)
|
||||||
- [`mscluster`](collector.mscluster.md)
|
- [`mscluster`](collector.mscluster.md)
|
||||||
- [`msmq`](collector.msmq.md)
|
- [`msmq`](collector.msmq.md)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ The container collector exposes metrics about containers running on a Hyper-V sy
|
|||||||
|||
|
|||
|
||||||
-|-
|
-|-
|
||||||
Metric name prefix | `container`
|
Metric name prefix | `container`
|
||||||
Data source | [hcsshim](https://github.com/Microsoft/hcsshim)
|
Data source | [HCS](https://learn.microsoft.com/en-us/virtualization/api/hcs/overview)
|
||||||
Enabled by default? | No
|
Enabled by default? | No
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
@@ -14,26 +14,26 @@ None
|
|||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
Name | Description | Type | Labels
|
| Name | Description | Type | Labels |
|
||||||
-----|-------------|------|-------
|
|------------------------------------------------------------|----------------------------------------|---------|----------------------------------------------------------|
|
||||||
`windows_container_available` | Available | counter | `container_id`
|
| `windows_container_available` | Available | counter | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_count` | Number of containers | gauge | `container_id`
|
| `windows_container_count` | Number of containers | gauge | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_cpu_usage_seconds_kernelmode` | Run time in Kernel mode in Seconds | counter | `container_id`
|
| `windows_container_cpu_usage_seconds_kernelmode` | Run time in Kernel mode in Seconds | counter | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_cpu_usage_seconds_usermode` | Run Time in User mode in Seconds | counter | `container_id`
|
| `windows_container_cpu_usage_seconds_usermode` | Run Time in User mode in Seconds | counter | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_cpu_usage_seconds_total` | Total Run time in Seconds | counter | `container_id`
|
| `windows_container_cpu_usage_seconds_total` | Total Run time in Seconds | counter | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_memory_usage_commit_bytes` | Memory Usage Commit Bytes | gauge | `container_id`
|
| `windows_container_memory_usage_commit_bytes` | Memory Usage Commit Bytes | gauge | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_memory_usage_commit_peak_bytes` | Memory Usage Commit Peak Bytes | gauge | `container_id`
|
| `windows_container_memory_usage_commit_peak_bytes` | Memory Usage Commit Peak Bytes | gauge | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_memory_usage_private_working_set_bytes` | Memory Usage Private Working Set Bytes | gauge | `container_id`
|
| `windows_container_memory_usage_private_working_set_bytes` | Memory Usage Private Working Set Bytes | gauge | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_network_receive_bytes_total` | Bytes Received on Interface | counter | `container_id`, `interface`
|
| `windows_container_network_receive_bytes_total` | Bytes Received on Interface | counter | `container_id`,`namespace`,`pod`,`container`,`interface` |
|
||||||
`windows_container_network_receive_packets_total` | Packets Received on Interface | counter | `container_id`, `interface`
|
| `windows_container_network_receive_packets_total` | Packets Received on Interface | counter | `container_id`,`namespace`,`pod`,`container`,`interface` |
|
||||||
`windows_container_network_receive_packets_dropped_total` | Dropped Incoming Packets on Interface | counter | `container_id`, `interface`
|
| `windows_container_network_receive_packets_dropped_total` | Dropped Incoming Packets on Interface | counter | `container_id`,`namespace`,`pod`,`container`,`interface` |
|
||||||
`windows_container_network_transmit_bytes_total` | Bytes Sent on Interface | counter | `container_id`, `interface`
|
| `windows_container_network_transmit_bytes_total` | Bytes Sent on Interface | counter | `container_id`,`namespace`,`pod`,`container`,`interface` |
|
||||||
`windows_container_network_transmit_packets_total` | Packets Sent on Interface | counter | `container_id`, `interface`
|
| `windows_container_network_transmit_packets_total` | Packets Sent on Interface | counter | `container_id`,`namespace`,`pod`,`container`,`interface` |
|
||||||
`windows_container_network_transmit_packets_dropped_total` | Dropped Outgoing Packets on Interface | counter | `container_id`, `interface`
|
| `windows_container_network_transmit_packets_dropped_total` | Dropped Outgoing Packets on Interface | counter | `container_id`,`namespace`,`pod`,`container`,`interface` |
|
||||||
`windows_container_storage_read_count_normalized_total` | Read Count Normalized | counter | `container_id`
|
| `windows_container_storage_read_count_normalized_total` | Read Count Normalized | counter | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_storage_read_size_bytes_total` | Read Size Bytes | counter | `container_id`
|
| `windows_container_storage_read_size_bytes_total` | Read Size Bytes | counter | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_storage_write_count_normalized_total` | Write Count Normalized | counter | `container_id`
|
| `windows_container_storage_write_count_normalized_total` | Write Count Normalized | counter | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
`windows_container_storage_write_size_bytes_total` | Write Size Bytes | counter | `container_id`
|
| `windows_container_storage_write_size_bytes_total` | Write Size Bytes | counter | `container_id`,`namespace`,`pod`,`container`, |
|
||||||
|
|
||||||
### Example metric
|
### Example metric
|
||||||
_windows_container_network_receive_bytes_total{container_id="docker://1bd30e8b8ac28cbd76a9b697b4d7bb9d760267b0733d1bc55c60024e98d1e43e",interface="822179E7-002C-4280-ABBA-28BCFE401826"} 9.3305343e+07_
|
_windows_container_network_receive_bytes_total{container_id="docker://1bd30e8b8ac28cbd76a9b697b4d7bb9d760267b0733d1bc55c60024e98d1e43e",interface="822179E7-002C-4280-ABBA-28BCFE401826"} 9.3305343e+07_
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
# 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
|
|
||||||
|
|
||||||
|||
|
|
||||||
-|-
|
|
||||||
Metric name prefix | `cs`
|
|
||||||
Classes | [`Win32_ComputerSystem`](https://msdn.microsoft.com/en-us/library/aa394102)
|
|
||||||
Enabled by default? | Yes
|
|
||||||
|
|
||||||
## Flags
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
## Metrics
|
|
||||||
|
|
||||||
Name | Description | Type | Labels
|
|
||||||
-----|-------------|------|-------
|
|
||||||
`windows_cs_logical_processors` | Number of installed logical processors | gauge | None
|
|
||||||
`windows_cs_physical_memory_bytes` | Total installed physical memory | gauge | None
|
|
||||||
`windows_cs_hostname` | Labelled system hostname information | gauge | `hostname`, `domain`, `fqdn`
|
|
||||||
|
|
||||||
### Example metric
|
|
||||||
_This collector does not yet have explained examples, we would appreciate your help adding them!_
|
|
||||||
|
|
||||||
## Useful queries
|
|
||||||
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_
|
|
||||||
|
|
||||||
## Alerting examples
|
|
||||||
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
|
||||||
@@ -3,14 +3,19 @@
|
|||||||
The dns collector exposes metrics about the DNS server
|
The dns collector exposes metrics about the DNS server
|
||||||
|
|
||||||
|||
|
|||
|
||||||
-|-
|
-|-|-
|
||||||
Metric name prefix | `dns`
|
Metric name prefix | `dns` |
|
||||||
Classes | [`Win32_PerfRawData_DNS_DNS`](https://technet.microsoft.com/en-us/library/cc977686.aspx)
|
Classes | [`Win32_PerfRawData_DNS_DNS`](https://technet.microsoft.com/en-us/library/cc977686.aspx) |
|
||||||
Enabled by default? | No
|
Enabled by default | Yes |
|
||||||
|
Metric name prefix (error stats) | `windows_dns` |
|
||||||
|
Classes | [`MicrosoftDNS_Statistic`](https://learn.microsoft.com/en-us/windows/win32/dns/dns-wmi-provider-overview) |
|
||||||
|
Enabled by default (error stats)? | Yes |
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
None
|
Name | Description
|
||||||
|
-----|------------
|
||||||
|
`collector.dns.enabled` | Comma-separated list of collectors to use. Available collectors: `metrics`, `wmi_stats`. Defaults to all collectors if not specified.
|
||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
@@ -38,9 +43,53 @@ Name | Description | Type | Labels
|
|||||||
`windows_dns_wins_queries_total` | _Not yet documented_ | counter | `direction`
|
`windows_dns_wins_queries_total` | _Not yet documented_ | counter | `direction`
|
||||||
`windows_dns_wins_responses_total` | _Not yet documented_ | counter | `direction`
|
`windows_dns_wins_responses_total` | _Not yet documented_ | counter | `direction`
|
||||||
`windows_dns_unmatched_responses_total` | _Not yet documented_ | counter | None
|
`windows_dns_unmatched_responses_total` | _Not yet documented_ | counter | None
|
||||||
|
`windows_dns_error_stats_total` | DNS error statistics from MicrosoftDNS_Statistic | counter | `name`, `collection_name`, `dns_server`
|
||||||
|
|
||||||
|
### Sub-collectors
|
||||||
|
|
||||||
|
The DNS collector is split into two sub-collectors:
|
||||||
|
|
||||||
|
1. `metrics` - Collects standard DNS performance metrics using PDH (Performance Data Helper)
|
||||||
|
2. `wmi_stats` - Collects DNS error statistics from the MicrosoftDNS_Statistic WMI class
|
||||||
|
|
||||||
|
By default, both sub-collectors are enabled. You can enable specific sub-collectors using the `collector.dns.enabled` flag.
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
To enable only DNS error statistics collection:
|
||||||
|
```powershell
|
||||||
|
windows_exporter.exe --collector.dns.enabled=wmi_stats
|
||||||
|
```
|
||||||
|
|
||||||
|
To enable only standard DNS metrics:
|
||||||
|
```powershell
|
||||||
|
windows_exporter.exe --collector.dns.enabled=metrics
|
||||||
|
```
|
||||||
|
|
||||||
|
To enable both (default behavior):
|
||||||
|
```powershell
|
||||||
|
windows_exporter.exe --collector.dns.enabled=metrics,wmi_stats
|
||||||
|
```
|
||||||
|
|
||||||
### Example metric
|
### Example metric
|
||||||
_This collector does not yet have explained examples, we would appreciate your help adding them!_
|
```
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="BadKey"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="BadSig"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="BadTime"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="FormError"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="Max"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="NoError"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="NotAuth"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="NotImpl"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="NotZone"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="NxDomain"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="NxRRSet"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="Refused"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="ServFail"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="UnknownError"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="YxDomain"} 0
|
||||||
|
windows_dns_wmi_stats_total{collection_name="Error Stats",dns_server="EC2AMAZ-5NNM8M1",name="YxRRSet"} 0
|
||||||
|
```
|
||||||
|
|
||||||
## Useful queries
|
## Useful queries
|
||||||
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_
|
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Comma-separated list of collectors to use, for example: `--collectors.exchange.e
|
|||||||
| `windows_exchange_transport_queues_messages_submitted_total` | Messages Submitted Total |
|
| `windows_exchange_transport_queues_messages_submitted_total` | Messages Submitted Total |
|
||||||
| `windows_exchange_transport_queues_messages_delayed_total` | Messages Delayed Total |
|
| `windows_exchange_transport_queues_messages_delayed_total` | Messages Delayed Total |
|
||||||
| `windows_exchange_transport_queues_messages_completed_delivery_total` | Messages Completed Delivery Total |
|
| `windows_exchange_transport_queues_messages_completed_delivery_total` | Messages Completed Delivery Total |
|
||||||
| `windows_exchange_transport_queues_shadow_queue_length` | Shadow Queue Length |
|
| `windows_exchange_transport_queues_aggregate_shadow_queue_length` | The current number of messages in shadow queues |
|
||||||
| `windows_exchange_transport_queues_submission_queue_length` | Submission Queue Length |
|
| `windows_exchange_transport_queues_submission_queue_length` | Submission Queue Length |
|
||||||
| `windows_exchange_transport_queues_delay_queue_length` | Delay Queue Length |
|
| `windows_exchange_transport_queues_delay_queue_length` | Delay Queue Length |
|
||||||
| `windows_exchange_transport_queues_items_completed_delivery_total` | Items Completed Delivery Total |
|
| `windows_exchange_transport_queues_items_completed_delivery_total` | Items Completed Delivery Total |
|
||||||
@@ -54,7 +54,7 @@ Comma-separated list of collectors to use, for example: `--collectors.exchange.e
|
|||||||
| `windows_exchange_http_proxy_avg_auth_latency` | Average time spent authenticating CAS requests over the last 200 samples |
|
| `windows_exchange_http_proxy_avg_auth_latency` | Average time spent authenticating CAS requests over the last 200 samples |
|
||||||
| `windows_exchange_http_proxy_outstanding_proxy_requests` | Number of concurrent outstanding proxy requests |
|
| `windows_exchange_http_proxy_outstanding_proxy_requests` | Number of concurrent outstanding proxy requests |
|
||||||
| `windows_exchange_http_proxy_requests_total` | Number of proxy requests processed each second |
|
| `windows_exchange_http_proxy_requests_total` | Number of proxy requests processed each second |
|
||||||
| `windows_exchange_avail_service_requests_per_sec` | Number of requests serviced per second |
|
| `windows_exchange_availability_service_requests_per_sec` | Number of requests serviced per second |
|
||||||
| `windows_exchange_owa_current_unique_users` | Number of unique users currently logged on to Outlook Web App |
|
| `windows_exchange_owa_current_unique_users` | Number of unique users currently logged on to Outlook Web App |
|
||||||
| `windows_exchange_owa_requests_total` | Number of requests handled by Outlook Web App per second |
|
| `windows_exchange_owa_requests_total` | Number of requests handled by Outlook Web App per second |
|
||||||
| `windows_exchange_autodiscover_requests_total` | Number of autodiscover service requests processed each second |
|
| `windows_exchange_autodiscover_requests_total` | Number of autodiscover service requests processed each second |
|
||||||
@@ -77,4 +77,3 @@ _This collector does not yet have any useful queries added, we would appreciate
|
|||||||
|
|
||||||
## Alerting examples
|
## Alerting examples
|
||||||
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
||||||
|
|
||||||
|
|||||||
146
docs/collector.gpu.md
Normal file
146
docs/collector.gpu.md
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
# gpu collector
|
||||||
|
|
||||||
|
The gpu collector exposes metrics about GPU usage and memory consumption, both at the adapter (physical GPU) and
|
||||||
|
per-process level.
|
||||||
|
|
||||||
|
| | |
|
||||||
|
|---------------------|--------------------------------------|
|
||||||
|
| Metric name prefix | `gpu` |
|
||||||
|
| Data source | Perflib |
|
||||||
|
| Counters | GPU Engine, GPU Adapter, GPU Process |
|
||||||
|
| Enabled by default? | No |
|
||||||
|
|
||||||
|
## Flags
|
||||||
|
|
||||||
|
None
|
||||||
|
|
||||||
|
## Metrics
|
||||||
|
|
||||||
|
These metrics are available on supported versions of Windows with compatible GPUs and drivers:
|
||||||
|
|
||||||
|
### Adapter-level Metrics
|
||||||
|
|
||||||
|
| Name | Description | Type | Labels |
|
||||||
|
|----------------------------------------------|-------------------------------------------------------------------------|-------|--------------------------------------------------------------------------------------|
|
||||||
|
| `windows_gpu_adapter_memory_committed_bytes` | Total committed GPU memory in bytes per physical GPU | gauge | `phys` |
|
||||||
|
| `windows_gpu_adapter_memory_dedicated_bytes` | Dedicated GPU memory usage in bytes per physical GPU | gauge | `phys` |
|
||||||
|
| `windows_gpu_adapter_memory_shared_bytes` | Shared GPU memory usage in bytes per physical GPU | gauge | `phys` |
|
||||||
|
| `windows_gpu_info` | A metric with a constant '1' value labeled with gpu device information. | gauge | `phys`, `physical_device_object_name`, `hardware_id`, `friendly_name`, `description` |
|
||||||
|
| `windows_gpu_local_adapter_memory_bytes` | Local adapter memory usage in bytes per physical GPU | gauge | `phys` |
|
||||||
|
| `windows_gpu_non_local_adapter_memory_bytes` | Non-local adapter memory usage in bytes per physical GPU | gauge | `phys` |
|
||||||
|
|
||||||
|
### Per-process Metrics
|
||||||
|
|
||||||
|
| Name | Description | Type | Labels |
|
||||||
|
|----------------------------------------------|-------------------------------------------------------------------------|---------|--------------------------------------------------------------------------------------|
|
||||||
|
| `windows_gpu_engine_time_seconds` | Total running time of the GPU engine in seconds | counter | `phys`, `eng`, `engtype`, `process_id` |
|
||||||
|
| `windows_gpu_process_memory_committed_bytes` | Total committed GPU memory in bytes per process | gauge | `phys`,`process_id` |
|
||||||
|
| `windows_gpu_process_memory_dedicated_bytes` | Dedicated GPU memory usage in bytes per process | gauge | `phys`,`process_id` |
|
||||||
|
| `windows_gpu_process_memory_local_bytes` | Local GPU memory usage in bytes per process | gauge | `phys`,`process_id` |
|
||||||
|
| `windows_gpu_process_memory_non_local_bytes` | Non-local GPU memory usage in bytes per process | gauge | `phys`,`process_id` |
|
||||||
|
| `windows_gpu_process_memory_shared_bytes` | Shared GPU memory usage in bytes per process | gauge | `phys`,`process_id` |
|
||||||
|
|
||||||
|
## Metric Labels
|
||||||
|
|
||||||
|
* `phys`: Physical GPU index (e.g., "0")
|
||||||
|
* `eng`: GPU engine index (e.g., "0", "1", ...)
|
||||||
|
* `engtype`: GPU engine type (e.g., "3D", "Copy", "VideoDecode", etc.)
|
||||||
|
* `process_id`: Process ID
|
||||||
|
|
||||||
|
## Example Metric
|
||||||
|
|
||||||
|
These are basic queries to help you get started with GPU monitoring on Windows using Prometheus.
|
||||||
|
|
||||||
|
**Show GPU information for a specific physical GPU (0):**
|
||||||
|
|
||||||
|
```promql
|
||||||
|
windows_gpu_info{description="NVIDIA GeForce GTX 1070",friendly_name="",hardware_id="PCI\\VEN_10DE&DEV_1B81&SUBSYS_61733842&REV_A1",phys="0",physical_device_object_name="\\Device\\NTPNP_PCI0027"} 1
|
||||||
|
```
|
||||||
|
|
||||||
|
**Show total dedicated GPU memory (in bytes) usage on GPU 0:**
|
||||||
|
|
||||||
|
```promql
|
||||||
|
windows_gpu_adapter_memory_dedicated_bytes{phys="0"}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Aggregate GPU utilization across all processes for a physical GPU (3D engine):**
|
||||||
|
|
||||||
|
```promql
|
||||||
|
sum by (phys) (
|
||||||
|
rate(windows_gpu_engine_time_seconds{phys="0", engtype="3D"}[1m])
|
||||||
|
) * 100
|
||||||
|
```
|
||||||
|
|
||||||
|
**Show GPU utilization for a specific process (3D engine):**
|
||||||
|
|
||||||
|
```promql
|
||||||
|
sum by (phys, process_id) (
|
||||||
|
rate(windows_gpu_engine_time_seconds{process_id="1234", engtype="3D"}[1m])
|
||||||
|
) * 100
|
||||||
|
```
|
||||||
|
|
||||||
|
**Show dedicated GPU memory per process:**
|
||||||
|
|
||||||
|
```promql
|
||||||
|
windows_gpu_adapter_memory_dedicated_bytes
|
||||||
|
```
|
||||||
|
|
||||||
|
## Useful Queries
|
||||||
|
|
||||||
|
**Show top 5 processes by GPU utilization (all engines):**
|
||||||
|
|
||||||
|
```promql
|
||||||
|
topk(5, sum by (process_id) (
|
||||||
|
rate(windows_gpu_engine_time_seconds[1m])
|
||||||
|
) * 100)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Show GPU memory usage per physical GPU:**
|
||||||
|
|
||||||
|
```promql
|
||||||
|
sum by (phys) (
|
||||||
|
windows_gpu_adapter_memory_dedicated_bytes
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Show GPU engine time with process owner and command line:
|
||||||
|
|
||||||
|
```promql
|
||||||
|
windows_gpu_engine_time_seconds * on(process_id) group_left(owner, cmdline) windows_process_info
|
||||||
|
```
|
||||||
|
|
||||||
|
## Alerting Examples
|
||||||
|
|
||||||
|
**prometheus.rules**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Alert on processes using more than 80% of a GPU's capacity over 10 minutes
|
||||||
|
- alert: HighGpuUtilization
|
||||||
|
expr: |
|
||||||
|
sum by (process_id) (
|
||||||
|
rate(windows_gpu_engine_time_seconds[1m])
|
||||||
|
) * 100 > 80
|
||||||
|
for: 10m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
summary: "High GPU Utilization (process {{ $labels.process_id }})"
|
||||||
|
description: "Process is using more than 80% of GPU resources\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
* Per-process metrics allow you to identify which processes are consuming GPU resources.
|
||||||
|
* Adapter-level metrics provide an overview of total GPU memory usage.
|
||||||
|
* For overall GPU utilization, aggregate per-process metrics in Prometheus using queries such as `sum()`.
|
||||||
|
* The collector relies on Windows performance counters; ensure your system and drivers support these counters.
|
||||||
|
|
||||||
|
## Enabling the Collector
|
||||||
|
|
||||||
|
To enable the GPU collector, add `gpu` to the list of enabled collectors in your windows_exporter configuration.
|
||||||
|
|
||||||
|
Example (command line):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
windows_exporter.exe --collectors.enabled=gpu
|
||||||
|
```
|
||||||
@@ -130,6 +130,10 @@ If given, an application needs to *not* match the exclude regexp in order for th
|
|||||||
| `windows_iis_server_output_cache_hits_total` | Total number of successful lookups in output cache (since service startup) | counter | None |
|
| `windows_iis_server_output_cache_hits_total` | Total number of successful lookups in output cache (since service startup) | counter | None |
|
||||||
| `windows_iis_server_output_cache_items_flushed_total` | Total number of items flushed from output cache (since service startup) | counter | None |
|
| `windows_iis_server_output_cache_items_flushed_total` | Total number of items flushed from output cache (since service startup) | counter | None |
|
||||||
| `windows_iis_server_output_cache_flushes_total` | Total number of flushes of output cache (since service startup) | counter | None |
|
| `windows_iis_server_output_cache_flushes_total` | Total number of flushes of output cache (since service startup) | counter | None |
|
||||||
|
| `http_requests_current_queue_size` | Http Request Current queue size | counter | None |
|
||||||
|
| `http_request_total_rejected_request` | Http Request total rejected request | counter | None |
|
||||||
|
| `http_requests_max_queue_item_age` | Http Request Max queue Item age | counter | None |
|
||||||
|
| `http_requests_arrival_rate` | Http requests Arrival Rate | counter | None |
|
||||||
|
|
||||||
### Example metric
|
### Example metric
|
||||||
_This collector does not yet have explained examples, we would appreciate your help adding them!_
|
_This collector does not yet have explained examples, we would appreciate your help adding them!_
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
The logical_disk collector exposes metrics about logical disks (in contrast to physical disks)
|
The logical_disk collector exposes metrics about logical disks (in contrast to physical disks)
|
||||||
|
|
||||||
|||
|
| | |
|
||||||
-|-
|
|---------------------|------------------|
|
||||||
Metric name prefix | `logical_disk`
|
| Metric name prefix | `logical_disk` |
|
||||||
Data source | Perflib
|
| Data source | Performance Data |
|
||||||
Counters | `LogicalDisk` ([`Win32_PerfRawData_PerfDisk_LogicalDisk`](https://msdn.microsoft.com/en-us/windows/hardware/aa394307(v=vs.71)))
|
| Counters | `LogicalDisk` |
|
||||||
Enabled by default? | Yes
|
| Enabled by default? | Yes |
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
@@ -19,25 +19,30 @@ If given, a disk needs to match the include regexp in order for the correspondin
|
|||||||
|
|
||||||
If given, a disk needs to *not* match the exclude regexp in order for the corresponding disk metrics to be reported
|
If given, a disk needs to *not* match the exclude regexp in order for the corresponding disk metrics to be reported
|
||||||
|
|
||||||
|
### `--collector.logical_disk.enabled`
|
||||||
|
|
||||||
|
Comma-separated list of collectors to use. Available collectors: metrics, bitlocker_status. Defaults to metrics, if not specified.
|
||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
Name | Description | Type | Labels
|
| Name | Description | Type | Labels |
|
||||||
-----|-------------|------|-------
|
|--------------------------------------------------|----------------------------------------------------------------------------------------------------|---------|-------------------------------------------------------------------|
|
||||||
`windows_logical_disk_info` | A metric with a constant '1' value labeled with logical disk information | gauge | `disk`,`filesystem`,`serial_number`,`volume`,`volume_name`,`type`
|
| `windows_logical_disk_info` | A metric with a constant '1' value labeled with logical disk information | gauge | `disk`,`filesystem`,`serial_number`,`volume`,`volume_name`,`type` |
|
||||||
`windows_logical_disk_requests_queued` | Number of requests outstanding on the disk at the time the performance data is collected | gauge | `volume`
|
| `windows_logical_disk_requests_queued` | Number of requests outstanding on the disk at the time the performance data is collected | gauge | `volume` |
|
||||||
`windows_logical_disk_avg_read_requests_queued` | Average number of read requests that were queued for the selected disk during the sample interval | gauge | `volume`
|
| `windows_logical_disk_avg_read_requests_queued` | Average number of read requests that were queued for the selected disk during the sample interval | gauge | `volume` |
|
||||||
`windows_logical_disk_avg_write_requests_queued` | Average number of write requests that were queued for the selected disk during the sample interval | gauge | `volume`
|
| `windows_logical_disk_avg_write_requests_queued` | Average number of write requests that were queued for the selected disk during the sample interval | gauge | `volume` |
|
||||||
`windows_logical_disk_read_bytes_total` | Rate at which bytes are transferred from the disk during read operations | counter | `volume`
|
| `windows_logical_disk_read_bytes_total` | Rate at which bytes are transferred from the disk during read operations | counter | `volume` |
|
||||||
`windows_logical_disk_reads_total` | Rate of read operations on the disk | counter | `volume`
|
| `windows_logical_disk_reads_total` | Rate of read operations on the disk | counter | `volume` |
|
||||||
`windows_logical_disk_write_bytes_total` | Rate at which bytes are transferred to the disk during write operations | counter | `volume`
|
| `windows_logical_disk_write_bytes_total` | Rate at which bytes are transferred to the disk during write operations | counter | `volume` |
|
||||||
`windows_logical_disk_writes_total` | Rate of write operations on the disk | counter | `volume`
|
| `windows_logical_disk_writes_total` | Rate of write operations on the disk | counter | `volume` |
|
||||||
`windows_logical_disk_read_seconds_total` | Seconds the disk was busy servicing read requests | counter | `volume`
|
| `windows_logical_disk_read_seconds_total` | Seconds the disk was busy servicing read requests | counter | `volume` |
|
||||||
`windows_logical_disk_write_seconds_total` | Seconds the disk was busy servicing write requests | counter | `volume`
|
| `windows_logical_disk_write_seconds_total` | Seconds the disk was busy servicing write requests | counter | `volume` |
|
||||||
`windows_logical_disk_free_bytes` | Unused space of the disk in bytes (not real time, updates every 10-15 min) | gauge | `volume`
|
| `windows_logical_disk_free_bytes` | Unused space of the disk in bytes (not real time, updates every 10-15 min) | gauge | `volume` |
|
||||||
`windows_logical_disk_size_bytes` | Total size of the disk in bytes (not real time, updates every 10-15 min) | gauge | `volume`
|
| `windows_logical_disk_size_bytes` | Total size of the disk in bytes (not real time, updates every 10-15 min) | gauge | `volume` |
|
||||||
`windows_logical_disk_idle_seconds_total` | Seconds the disk was idle (not servicing read/write requests) | counter | `volume`
|
| `windows_logical_disk_idle_seconds_total` | Seconds the disk was idle (not servicing read/write requests) | counter | `volume` |
|
||||||
`windows_logical_disk_split_ios_total` | Number of I/Os to the disk split into multiple I/Os | counter | `volume`
|
| `windows_logical_disk_split_ios_total` | Number of I/Os to the disk split into multiple I/Os | counter | `volume` |
|
||||||
`windows_logical_disk_readonly` | Whether the logical disk is read-only | gauge | `volume`
|
| `windows_logical_disk_readonly` | Whether the logical disk is read-only | gauge | `volume` |
|
||||||
|
| `windows_logical_disk_bitlocker_status` | BitLocker status for the logical disk | gauge | `volume`,`status` |
|
||||||
|
|
||||||
### Warning about size metrics
|
### Warning about size metrics
|
||||||
The `free_bytes` and `size_bytes` metrics are not updated in real time and might have a delay of 10-15min.
|
The `free_bytes` and `size_bytes` metrics are not updated in real time and might have a delay of 10-15min.
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Show memory usage for instance (%)
|
|||||||
```yaml
|
```yaml
|
||||||
# Alert on hosts that have exhausted all available physical memory
|
# Alert on hosts that have exhausted all available physical memory
|
||||||
- alert: MemoryExhausted
|
- alert: MemoryExhausted
|
||||||
expr: windows_os_physical_memory_free_bytes == 0
|
expr: windows_memory_physical_free_bytes == 0
|
||||||
for: 10m
|
for: 10m
|
||||||
labels:
|
labels:
|
||||||
severity: high
|
severity: high
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ Matching is case-sensitive.
|
|||||||
| `mscluster_network_Role` | Provides access to the network's Role property. The Role property describes the role of the network in the cluster. 0: None; 1: Cluster; 2: Client; 3: Both | gauge | `name` |
|
| `mscluster_network_Role` | Provides access to the network's Role property. The Role property describes the role of the network in the cluster. 0: None; 1: Cluster; 2: Client; 3: Both | gauge | `name` |
|
||||||
| `mscluster_network_State` | Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up | gauge | `name` |
|
| `mscluster_network_State` | Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up | gauge | `name` |
|
||||||
|
|
||||||
### Network
|
### Node
|
||||||
|
|
||||||
| Name | Description | Type | Labels |
|
| Name | Description | Type | Labels |
|
||||||
|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|--------|
|
|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|--------|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ The msmq collector exposes metrics about the queues on a MSMQ server
|
|||||||
| | |
|
| | |
|
||||||
|---------------------|----------------------|
|
|---------------------|----------------------|
|
||||||
| Metric name prefix | `msmq` |
|
| Metric name prefix | `msmq` |
|
||||||
| Spource | Performance Counters |
|
| Source | Performance Counters |
|
||||||
| Enabled by default? | No |
|
| Enabled by default? | No |
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
|
|||||||
@@ -37,6 +37,11 @@ Enables IIS process name queries. IIS process names are combined with their app
|
|||||||
|
|
||||||
Disabled by default, and can be enabled with `--collector.process.iis`. NOTE: Just plain parameter without `true`.
|
Disabled by default, and can be enabled with `--collector.process.iis`. NOTE: Just plain parameter without `true`.
|
||||||
|
|
||||||
|
### `--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.
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
To match all firefox processes: `--collector.process.include="firefox.*"`.
|
To match all firefox processes: `--collector.process.include="firefox.*"`.
|
||||||
@@ -92,7 +97,12 @@ w3wp_Test
|
|||||||
_This collector does not yet have explained examples, we would appreciate your help adding them!_
|
_This collector does not yet have explained examples, we would appreciate your help adding them!_
|
||||||
|
|
||||||
## Useful queries
|
## Useful queries
|
||||||
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_
|
|
||||||
|
Add extended information like cmdline or owner to other process metrics.
|
||||||
|
|
||||||
|
```
|
||||||
|
windows_process_working_set_bytes * on(process_id) group_left(owner, cmdline) windows_process_info
|
||||||
|
```
|
||||||
|
|
||||||
## Alerting examples
|
## Alerting examples
|
||||||
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
||||||
|
|||||||
@@ -10,13 +10,8 @@ Enabled by default? | No
|
|||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
### `--collector.textfile.directory`
|
|
||||||
:warning: DEPRECATED Use `--collector.textfile.directories`
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
### `--collector.textfile.directories`
|
### `--collector.textfile.directories`
|
||||||
One or multiple directories containing the files to be ingested.
|
One or multiple directories containing the files to be ingested.
|
||||||
|
|
||||||
E.G. `--collector.textfile.directories="C:\MyDir1,C:\MyDir2"`
|
E.G. `--collector.textfile.directories="C:\MyDir1,C:\MyDir2"`
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# time collector
|
# time collector
|
||||||
|
|
||||||
The time collector exposes the Windows Time Service metrics. Note that the Windows Time Service must be running, else metric collection will fail.
|
The time collector exposes the Windows Time Service and other time related metrics.
|
||||||
If the Windows Time Service is stopped after collection has started, collector metric values will reset to 0.
|
If the Windows Time Service is stopped after collection has started, collector metric values will reset to 0.
|
||||||
|
|
||||||
Please note the Time Service perflib counters are only available on [Windows Server 2016 or newer](https://docs.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-server-2016-improvements).
|
Please note the Time Service perflib counters are only available on [Windows Server 2016 or newer](https://docs.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-server-2016-improvements).
|
||||||
@@ -30,11 +30,23 @@ Matching is case-sensitive.
|
|||||||
| `windows_time_ntp_round_trip_delay_seconds` | Total roundtrip delay experienced by the NTP client in receiving a response from the server for the most recent request, in seconds. This is the time elapsed on the NTP client between transmitting a request to the NTP server and receiving a valid response from the server. | gauge | None |
|
| `windows_time_ntp_round_trip_delay_seconds` | Total roundtrip delay experienced by the NTP client in receiving a response from the server for the most recent request, in seconds. This is the time elapsed on the NTP client between transmitting a request to the NTP server and receiving a valid response from the server. | gauge | None |
|
||||||
| `windows_time_ntp_server_outgoing_responses_total` | Total number of requests responded to by the NTP server. | counter | None |
|
| `windows_time_ntp_server_outgoing_responses_total` | Total number of requests responded to by the NTP server. | counter | None |
|
||||||
| `windows_time_ntp_server_incoming_requests_total` | Total number of requests received by the NTP server. | counter | None |
|
| `windows_time_ntp_server_incoming_requests_total` | Total number of requests received by the NTP server. | counter | None |
|
||||||
| `windows_time_current_timestamp_seconds` | Current time as reported by the operating system, in [Unix time](https://en.wikipedia.org/wiki/Unix_time). See [time.Unix()](https://golang.org/pkg/time/#Unix) for details | gauge | None |
|
| `windows_time_current_timestamp_seconds` | Current time as reported by the operating system, in [Unix time](https://en.wikipedia.org/wiki/Unix_time). See [time.UnixMicro()](https://golang.org/pkg/time/#UnixMicro) for details | gauge | None |
|
||||||
| `windows_time_timezone` | Current timezone as reported by the operating system. | gauge | `timezone` |
|
| `windows_time_timezone` | Current timezone as reported by the operating system. | gauge | `timezone` |
|
||||||
|
| `windows_time_clock_sync_source` | This value reflects the sync source of the system clock. | gauge | `type` |
|
||||||
|
|
||||||
### Example metric
|
### Example metric
|
||||||
_This collector does not yet have explained examples, we would appreciate your help adding them!_
|
```
|
||||||
|
# HELP windows_time_clock_sync_source This value reflects the sync source of the system clock.
|
||||||
|
# TYPE windows_time_clock_sync_source gauge
|
||||||
|
windows_time_clock_sync_source{type="AllSync"} 0
|
||||||
|
windows_time_clock_sync_source{type="Local CMOS Clock"} 0
|
||||||
|
windows_time_clock_sync_source{type="NT5DS"} 0
|
||||||
|
windows_time_clock_sync_source{type="NTP"} 1
|
||||||
|
windows_time_clock_sync_source{type="NoSync"} 0
|
||||||
|
# HELP windows_time_current_timestamp_seconds OperatingSystem.LocalDateTime
|
||||||
|
# TYPE windows_time_current_timestamp_seconds gauge
|
||||||
|
windows_time_current_timestamp_seconds 1.74862554e+09
|
||||||
|
```
|
||||||
|
|
||||||
## Useful queries
|
## Useful queries
|
||||||
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_
|
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_
|
||||||
|
|||||||
@@ -11,8 +11,12 @@ The Windows Update service is responsible for managing the installation of updat
|
|||||||
| Data source | Windows Update service |
|
| Data source | Windows Update service |
|
||||||
| Enabled by default? | No |
|
| Enabled by default? | No |
|
||||||
|
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The collector name used in the CLI flags is `updates`, while the metric prefix is `update`. This naming mismatch is known and intentional for compatibility reasons.
|
||||||
|
|
||||||
### `--collector.updates.online`
|
### `--collector.updates.online`
|
||||||
Whether to search for updates online. If set to `false`, the collector will only list updates that are already found by the Windows Update service.
|
Whether to search for updates online. If set to `false`, the collector will only list updates that are already found by the Windows Update service.
|
||||||
Set to `true` to search for updates online, which will take longer to complete.
|
Set to `true` to search for updates online, which will take longer to complete.
|
||||||
@@ -22,27 +26,38 @@ Define the interval of scraping Windows Update information
|
|||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
| Name | Description | Type | Labels |
|
| Name | Description | Type | Labels |
|
||||||
|--------------------------------|-----------------------------------------------|-------|-------------------------------|
|
|------------------------------------------------|------------------------------------------------------------------|-------|-------------------------------|
|
||||||
| `windows_updates_pending_info` | Expose information single pending update item | gauge | `category`,`severity`,`title` |
|
| `windows_update_pending_info` | Expose information for a single pending update item | gauge | `category`,`severity`,`title` |
|
||||||
| `windows_updates_scrape_query_duration_seconds` | Duration of the last scrape query to the Windows Update API | gauge | |
|
| `windows_update_pending_published_timestamp` | Expose last published timestamp for a single pending update item | gauge | `title` |
|
||||||
| `windows_updates_scrape_timestamp_seconds` | Timestamp of the last scrape | gauge | |
|
| `windows_update_scrape_query_duration_seconds` | Duration of the last scrape query to the Windows Update API | gauge | |
|
||||||
|
| `windows_update_scrape_timestamp_seconds` | Timestamp of the last scrape | gauge | |
|
||||||
|
|
||||||
### Example metrics
|
### Example metrics
|
||||||
```
|
```
|
||||||
# HELP windows_updates_pending Pending Windows Updates
|
# HELP windows_update_pending_info Expose information for a single pending update item
|
||||||
# TYPE windows_updates_pending gauge
|
# TYPE windows_update_pending_info gauge
|
||||||
windows_updates_pending{category="Drivers",severity="",title="Intel Corporation - Bluetooth - 23.60.5.10"} 1
|
windows_update_pending_info{category="Definition Updates",id="a32ca1d0-ddd4-486b-b708-d941db4f1051",revision="204",severity="",title="Update for Windows Security platform - KB5007651 (Version 10.0.27840.1000)"} 1
|
||||||
# HELP windows_updates_scrape_query_duration_seconds Duration of the last scrape query to the Windows Update API
|
windows_update_pending_info{category="Definition Updates",id="b50a64de-a0bb-465b-9842-9963b6eee21e",revision="200",severity="",title="Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.429.146.0) - Current Channel (Broad)"} 1
|
||||||
# TYPE windows_updates_scrape_query_duration_seconds gauge
|
# HELP windows_update_pending_published_timestamp Expose last published timestamp for a single pending update item
|
||||||
windows_updates_scrape_query_duration_seconds 2.8161838
|
# TYPE windows_update_pending_published_timestamp gauge
|
||||||
# HELP windows_updates_scrape_timestamp_seconds Timestamp of the last scrape
|
windows_update_pending_published_timestamp{id="a32ca1d0-ddd4-486b-b708-d941db4f1051",revision="204"} 1.747872e+09
|
||||||
# TYPE windows_updates_scrape_timestamp_seconds gauge
|
windows_update_pending_published_timestamp{id="b50a64de-a0bb-465b-9842-9963b6eee21e",revision="200"} 1.7479584e+09
|
||||||
windows_updates_scrape_timestamp_seconds 1.727539734e+09
|
# HELP windows_update_scrape_query_duration_seconds Duration of the last scrape query to the Windows Update API
|
||||||
|
# TYPE windows_update_scrape_query_duration_seconds gauge
|
||||||
|
windows_update_scrape_query_duration_seconds 2.8161838
|
||||||
|
# HELP windows_update_scrape_timestamp_seconds Timestamp of the last scrape
|
||||||
|
# TYPE windows_update_scrape_timestamp_seconds gauge
|
||||||
|
windows_update_scrape_timestamp_seconds 1.727539734e+09
|
||||||
```
|
```
|
||||||
|
|
||||||
## Useful queries
|
## Useful queries
|
||||||
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_
|
|
||||||
|
Add extended information like cmdline or owner to other process metrics.
|
||||||
|
|
||||||
|
```
|
||||||
|
windows_update_pending_published_timestamp * on(id, revision) group_left(severity, title) windows_update_pending_info
|
||||||
|
```
|
||||||
|
|
||||||
## Alerting examples
|
## Alerting examples
|
||||||
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
_This collector does not yet have alerting examples, we would appreciate your help adding them!_
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
# Note this is not an exhaustive list of all configuration values
|
# Note this is not an exhaustive list of all configuration values
|
||||||
collectors:
|
collectors:
|
||||||
enabled: cpu,cs,logical_disk,net,os,service,system
|
enabled: cpu,logical_disk,net,os,service,system
|
||||||
collector:
|
collector:
|
||||||
service:
|
service:
|
||||||
include: "windows_exporter"
|
include: "windows_exporter"
|
||||||
|
|||||||
36
go.mod
36
go.mod
@@ -3,52 +3,38 @@ module github.com/prometheus-community/windows_exporter
|
|||||||
go 1.24
|
go 1.24
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Microsoft/hcsshim v0.12.9
|
|
||||||
github.com/alecthomas/kingpin/v2 v2.4.0
|
github.com/alecthomas/kingpin/v2 v2.4.0
|
||||||
github.com/bmatcuk/doublestar/v4 v4.8.1
|
github.com/bmatcuk/doublestar/v4 v4.8.1
|
||||||
github.com/dimchansky/utfbom v1.1.1
|
github.com/dimchansky/utfbom v1.1.1
|
||||||
github.com/go-ole/go-ole v1.3.0
|
github.com/go-ole/go-ole v1.3.0
|
||||||
github.com/prometheus/client_golang v1.21.1
|
github.com/prometheus/client_golang v1.22.0
|
||||||
github.com/prometheus/client_model v0.6.1
|
github.com/prometheus/client_model v0.6.2
|
||||||
github.com/prometheus/common v0.63.0
|
github.com/prometheus/common v0.65.0
|
||||||
github.com/prometheus/exporter-toolkit v0.14.0
|
github.com/prometheus/exporter-toolkit v0.14.0
|
||||||
github.com/stretchr/testify v1.10.0
|
github.com/stretchr/testify v1.10.0
|
||||||
golang.org/x/sys v0.32.0
|
golang.org/x/sys v0.33.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
|
||||||
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
|
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||||
github.com/containerd/cgroups/v3 v3.0.5 // indirect
|
|
||||||
github.com/containerd/errdefs v1.0.0 // indirect
|
|
||||||
github.com/containerd/errdefs/pkg v0.3.0 // indirect
|
|
||||||
github.com/containerd/typeurl/v2 v2.2.3 // indirect
|
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
|
||||||
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
|
|
||||||
github.com/jpillora/backoff v1.0.0 // indirect
|
github.com/jpillora/backoff v1.0.0 // indirect
|
||||||
github.com/klauspost/compress v1.18.0 // indirect
|
|
||||||
github.com/mdlayher/socket v0.5.1 // indirect
|
github.com/mdlayher/socket v0.5.1 // indirect
|
||||||
github.com/mdlayher/vsock v1.2.1 // indirect
|
github.com/mdlayher/vsock v1.2.1 // indirect
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
|
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/prometheus/procfs v0.17.0 // indirect
|
||||||
github.com/prometheus/procfs v0.16.0 // indirect
|
|
||||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
|
||||||
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
|
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
|
||||||
go.opencensus.io v0.24.0 // indirect
|
golang.org/x/crypto v0.39.0 // indirect
|
||||||
golang.org/x/crypto v0.36.0 // indirect
|
golang.org/x/net v0.41.0 // indirect
|
||||||
golang.org/x/net v0.38.0 // indirect
|
golang.org/x/oauth2 v0.30.0 // indirect
|
||||||
golang.org/x/oauth2 v0.29.0 // indirect
|
golang.org/x/sync v0.15.0 // indirect
|
||||||
golang.org/x/sync v0.13.0 // indirect
|
golang.org/x/text v0.26.0 // indirect
|
||||||
golang.org/x/text v0.23.0 // indirect
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250404141209-ee84b53bf3d0 // indirect
|
|
||||||
google.golang.org/grpc v1.71.1 // indirect
|
|
||||||
google.golang.org/protobuf v1.36.6 // indirect
|
google.golang.org/protobuf v1.36.6 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
170
go.sum
170
go.sum
@@ -1,9 +1,3 @@
|
|||||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
|
||||||
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
|
||||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
|
||||||
github.com/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6lLg=
|
|
||||||
github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEPuoIWYVvZ8Y=
|
|
||||||
github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY=
|
github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY=
|
||||||
github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE=
|
github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE=
|
||||||
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0=
|
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0=
|
||||||
@@ -12,19 +6,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
|||||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||||
github.com/bmatcuk/doublestar/v4 v4.8.1 h1:54Bopc5c2cAvhLRAzqOGCYHYyhcDHsFF4wWIR5wKP38=
|
github.com/bmatcuk/doublestar/v4 v4.8.1 h1:54Bopc5c2cAvhLRAzqOGCYHYyhcDHsFF4wWIR5wKP38=
|
||||||
github.com/bmatcuk/doublestar/v4 v4.8.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
|
github.com/bmatcuk/doublestar/v4 v4.8.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
|
||||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
|
||||||
github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJHo6Bzo=
|
|
||||||
github.com/containerd/cgroups/v3 v3.0.5/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins=
|
|
||||||
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
|
|
||||||
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
|
|
||||||
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
|
|
||||||
github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk=
|
|
||||||
github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40=
|
|
||||||
github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk=
|
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -32,44 +15,13 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
|
|||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U=
|
github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U=
|
||||||
github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
|
github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
|
||||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
|
||||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
|
||||||
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||||
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
||||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
|
||||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
|
||||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
|
||||||
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=
|
|
||||||
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=
|
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
|
||||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
|
||||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
|
||||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
|
||||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
|
||||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
|
||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
||||||
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
|
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
|
||||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
|
||||||
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||||
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
@@ -86,122 +38,46 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
|
|||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk=
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||||
github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
|
||||||
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
|
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
|
||||||
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
||||||
github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k=
|
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
||||||
github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18=
|
github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE=
|
||||||
|
github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
|
||||||
github.com/prometheus/exporter-toolkit v0.14.0 h1:NMlswfibpcZZ+H0sZBiTjrA3/aBFHkNZqE+iCj5EmRg=
|
github.com/prometheus/exporter-toolkit v0.14.0 h1:NMlswfibpcZZ+H0sZBiTjrA3/aBFHkNZqE+iCj5EmRg=
|
||||||
github.com/prometheus/exporter-toolkit v0.14.0/go.mod h1:Gu5LnVvt7Nr/oqTBUC23WILZepW0nffNo10XdhQcwWA=
|
github.com/prometheus/exporter-toolkit v0.14.0/go.mod h1:Gu5LnVvt7Nr/oqTBUC23WILZepW0nffNo10XdhQcwWA=
|
||||||
github.com/prometheus/procfs v0.16.0 h1:xh6oHhKwnOJKMYiYBDWmkHqQPyiY40sny36Cmx2bbsM=
|
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
|
||||||
github.com/prometheus/procfs v0.16.0/go.mod h1:8veyXUu3nGP7oaCxhX6yeaM5u4stL2FeMXnCqhDthZg=
|
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
|
||||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
|
||||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
|
||||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
|
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
|
||||||
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
|
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
|
||||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
||||||
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
|
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||||
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
|
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
|
||||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
|
||||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
|
|
||||||
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
|
||||||
golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98=
|
|
||||||
golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
|
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
|
|
||||||
golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
|
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||||
golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
||||||
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
|
||||||
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
|
||||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
|
||||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
|
||||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250404141209-ee84b53bf3d0 h1:0K7wTWyzxZ7J+L47+LbFogJW1nn/gnnMCN0vGXNYtTI=
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250404141209-ee84b53bf3d0/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
|
||||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
|
||||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
|
||||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
|
||||||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
|
||||||
google.golang.org/grpc v1.71.1 h1:ffsFWr7ygTUscGPI0KKK6TLrGz0476KUvvsbqWK0rPI=
|
|
||||||
google.golang.org/grpc v1.71.1/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
|
||||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
|
||||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
|
||||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
|
||||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
||||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
@@ -212,5 +88,3 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
~ SPDX-License-Identifier: Apache-2.0
|
~ SPDX-License-Identifier: Apache-2.0
|
||||||
~
|
~
|
||||||
~ Copyright 2025 The Prometheus Authors
|
~ Copyright The Prometheus Authors
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
~ You may obtain a copy of the License at
|
~ You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<!--
|
<!--
|
||||||
~ SPDX-License-Identifier: Apache-2.0
|
~ SPDX-License-Identifier: Apache-2.0
|
||||||
~
|
~
|
||||||
~ Copyright 2025 The Prometheus Authors
|
~ Copyright The Prometheus Authors
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
~ You may obtain a copy of the License at
|
~ You may obtain a copy of the License at
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<!-- START CUSTOM ACTION FOR KILLING THE PROCESS -->
|
<!-- START CUSTOM ACTION FOR KILLING THE PROCESS -->
|
||||||
<SetProperty
|
<SetProperty
|
||||||
Id="KillProcess"
|
Id="KillProcess"
|
||||||
Value=""[WindowsFolder]\System32\taskkill.exe" /T /F /IM windows_exporter.exe"
|
Value=""[WindowsFolder]System32\taskkill.exe" /T /F /IM windows_exporter.exe"
|
||||||
Before="KillProcess"
|
Before="KillProcess"
|
||||||
Sequence="execute"
|
Sequence="execute"
|
||||||
/>
|
/>
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
<Control Id="Title" Type="Text" X="15" Y="6" Width="210" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}windows_exporter configuration" />
|
<Control Id="Title" Type="Text" X="15" Y="6" Width="210" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}windows_exporter configuration" />
|
||||||
|
|
||||||
<!-- Edit box for property input -->
|
<!-- Edit box for property input -->
|
||||||
<!-- cpu,cs,logical_disk,physical_disk,net,os,service,system -->
|
<!-- cpu,logical_disk,physical_disk,net,os,service,system -->
|
||||||
<Control Id="PropertyEdit_ENABLED_COLLECTORS_Title1" Type="Text" X="25" Y="55" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Text="Comma-separated list of collectors to use. Use '[\[]defaults[\]]' as a placeholder for all" />
|
<Control Id="PropertyEdit_ENABLED_COLLECTORS_Title1" Type="Text" X="25" Y="55" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Text="Comma-separated list of collectors to use. Use '[\[]defaults[\]]' as a placeholder for all" />
|
||||||
<Control Id="PropertyEdit_ENABLED_COLLECTORS_Title2" Type="Text" X="25" Y="65" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Text="the collectors enabled by default. If value is empty, the exporter default will be used." />
|
<Control Id="PropertyEdit_ENABLED_COLLECTORS_Title2" Type="Text" X="25" Y="65" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Text="the collectors enabled by default. If value is empty, the exporter default will be used." />
|
||||||
<Control Id="PropertyEdit_ENABLED_COLLECTORS" Type="Edit" X="24" Y="77" Width="300" Height="18" Property="ENABLED_COLLECTORS" Text="[ENABLED_COLLECTORS]" Indirect="no" />
|
<Control Id="PropertyEdit_ENABLED_COLLECTORS" Type="Edit" X="24" Y="77" Width="300" Height="18" Property="ENABLED_COLLECTORS" Text="[ENABLED_COLLECTORS]" Indirect="no" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -522,6 +522,8 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to collect DirectoryServices (AD) metrics: %w", err)
|
return fmt.Errorf("failed to collect DirectoryServices (AD) metrics: %w", err)
|
||||||
|
} else if len(c.perfDataObject) == 0 {
|
||||||
|
return fmt.Errorf("failed to collect DirectoryServices (AD) metrics: %w", types.ErrNoDataUnexpected)
|
||||||
}
|
}
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
@@ -530,30 +532,35 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].AbANRPerSec,
|
c.perfDataObject[0].AbANRPerSec,
|
||||||
"ambiguous_name_resolution",
|
"ambiguous_name_resolution",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.addressBookOperationsTotal,
|
c.addressBookOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].AbBrowsesPerSec,
|
c.perfDataObject[0].AbBrowsesPerSec,
|
||||||
"browse",
|
"browse",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.addressBookOperationsTotal,
|
c.addressBookOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].AbMatchesPerSec,
|
c.perfDataObject[0].AbMatchesPerSec,
|
||||||
"find",
|
"find",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.addressBookOperationsTotal,
|
c.addressBookOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].AbPropertyReadsPerSec,
|
c.perfDataObject[0].AbPropertyReadsPerSec,
|
||||||
"property_read",
|
"property_read",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.addressBookOperationsTotal,
|
c.addressBookOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].AbSearchesPerSec,
|
c.perfDataObject[0].AbSearchesPerSec,
|
||||||
"search",
|
"search",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.addressBookOperationsTotal,
|
c.addressBookOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -578,22 +585,26 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].AtqEstimatedQueueDelay/1000,
|
c.perfDataObject[0].AtqEstimatedQueueDelay/1000,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.atqOutstandingRequests,
|
c.atqOutstandingRequests,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].AtqOutstandingQueuedRequests,
|
c.perfDataObject[0].AtqOutstandingQueuedRequests,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.atqAverageRequestLatency,
|
c.atqAverageRequestLatency,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].AtqRequestLatency,
|
c.perfDataObject[0].AtqRequestLatency,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.atqCurrentThreads,
|
c.atqCurrentThreads,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].AtqThreadsLDAP,
|
c.perfDataObject[0].AtqThreadsLDAP,
|
||||||
"ldap",
|
"ldap",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.atqCurrentThreads,
|
c.atqCurrentThreads,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -607,12 +618,14 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].BaseSearchesPerSec,
|
c.perfDataObject[0].BaseSearchesPerSec,
|
||||||
"base",
|
"base",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.searchesTotal,
|
c.searchesTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SubtreeSearchesPerSec,
|
c.perfDataObject[0].SubtreeSearchesPerSec,
|
||||||
"subtree",
|
"subtree",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.searchesTotal,
|
c.searchesTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -626,18 +639,21 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].DatabaseAddsPerSec,
|
c.perfDataObject[0].DatabaseAddsPerSec,
|
||||||
"add",
|
"add",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.databaseOperationsTotal,
|
c.databaseOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DatabaseDeletesPerSec,
|
c.perfDataObject[0].DatabaseDeletesPerSec,
|
||||||
"delete",
|
"delete",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.databaseOperationsTotal,
|
c.databaseOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DatabaseModifiesPerSec,
|
c.perfDataObject[0].DatabaseModifiesPerSec,
|
||||||
"modify",
|
"modify",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.databaseOperationsTotal,
|
c.databaseOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -651,48 +667,56 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].DigestBindsPerSec,
|
c.perfDataObject[0].DigestBindsPerSec,
|
||||||
"digest",
|
"digest",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bindsTotal,
|
c.bindsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DsClientBindsPerSec,
|
c.perfDataObject[0].DsClientBindsPerSec,
|
||||||
"ds_client",
|
"ds_client",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bindsTotal,
|
c.bindsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DsServerBindsPerSec,
|
c.perfDataObject[0].DsServerBindsPerSec,
|
||||||
"ds_server",
|
"ds_server",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bindsTotal,
|
c.bindsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].ExternalBindsPerSec,
|
c.perfDataObject[0].ExternalBindsPerSec,
|
||||||
"external",
|
"external",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bindsTotal,
|
c.bindsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].FastBindsPerSec,
|
c.perfDataObject[0].FastBindsPerSec,
|
||||||
"fast",
|
"fast",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bindsTotal,
|
c.bindsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].NegotiatedBindsPerSec,
|
c.perfDataObject[0].NegotiatedBindsPerSec,
|
||||||
"negotiate",
|
"negotiate",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bindsTotal,
|
c.bindsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].NTLMBindsPerSec,
|
c.perfDataObject[0].NTLMBindsPerSec,
|
||||||
"ntlm",
|
"ntlm",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bindsTotal,
|
c.bindsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SimpleBindsPerSec,
|
c.perfDataObject[0].SimpleBindsPerSec,
|
||||||
"simple",
|
"simple",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bindsTotal,
|
c.bindsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -706,6 +730,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
float64(uint64(c.perfDataObject[0].DRAHighestUSNCommittedHighPart)<<32)+c.perfDataObject[0].DRAHighestUSNCommittedLowPart,
|
float64(uint64(c.perfDataObject[0].DRAHighestUSNCommittedHighPart)<<32)+c.perfDataObject[0].DRAHighestUSNCommittedLowPart,
|
||||||
"committed",
|
"committed",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.replicationHighestUsn,
|
c.replicationHighestUsn,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -744,6 +769,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].DRAInboundBytesNotCompressedWithinSitePerSec,
|
c.perfDataObject[0].DRAInboundBytesNotCompressedWithinSitePerSec,
|
||||||
"inbound",
|
"inbound",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.intraSiteReplicationDataBytesTotal,
|
c.intraSiteReplicationDataBytesTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -768,6 +794,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DRAInboundObjectsAppliedPerSec,
|
c.perfDataObject[0].DRAInboundObjectsAppliedPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.replicationInboundObjectsFilteredTotal,
|
c.replicationInboundObjectsFilteredTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -779,6 +806,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DRAInboundPropertiesAppliedPerSec,
|
c.perfDataObject[0].DRAInboundPropertiesAppliedPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.replicationInboundPropertiesFilteredTotal,
|
c.replicationInboundPropertiesFilteredTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -790,6 +818,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].DRAPendingReplicationOperations,
|
c.perfDataObject[0].DRAPendingReplicationOperations,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.replicationPendingSynchronizations,
|
c.replicationPendingSynchronizations,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -801,11 +830,13 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DRASyncRequestsMade,
|
c.perfDataObject[0].DRASyncRequestsMade,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.replicationSyncRequestsSuccessTotal,
|
c.replicationSyncRequestsSuccessTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DRASyncRequestsSuccessful,
|
c.perfDataObject[0].DRASyncRequestsSuccessful,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.replicationSyncRequestsSchemaMismatchFailureTotal,
|
c.replicationSyncRequestsSchemaMismatchFailureTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -818,6 +849,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].DsClientNameTranslationsPerSec,
|
c.perfDataObject[0].DsClientNameTranslationsPerSec,
|
||||||
"client",
|
"client",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.nameTranslationsTotal,
|
c.nameTranslationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -830,6 +862,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].DsMonitorListSize,
|
c.perfDataObject[0].DsMonitorListSize,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.changeMonitorUpdatesPending,
|
c.changeMonitorUpdatesPending,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -841,6 +874,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DsNameCacheHitRate,
|
c.perfDataObject[0].DsNameCacheHitRate,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.nameCacheLookupsTotal,
|
c.nameCacheLookupsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -854,6 +888,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"read",
|
"read",
|
||||||
"replication_agent",
|
"replication_agent",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -861,6 +896,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"read",
|
"read",
|
||||||
"knowledge_consistency_checker",
|
"knowledge_consistency_checker",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -868,6 +904,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"read",
|
"read",
|
||||||
"local_security_authority",
|
"local_security_authority",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -875,6 +912,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"read",
|
"read",
|
||||||
"name_service_provider_interface",
|
"name_service_provider_interface",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -882,6 +920,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"read",
|
"read",
|
||||||
"directory_service_api",
|
"directory_service_api",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -889,6 +928,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"read",
|
"read",
|
||||||
"security_account_manager",
|
"security_account_manager",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -896,6 +936,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"read",
|
"read",
|
||||||
"other",
|
"other",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -903,6 +944,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"search",
|
"search",
|
||||||
"replication_agent",
|
"replication_agent",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -910,6 +952,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"search",
|
"search",
|
||||||
"knowledge_consistency_checker",
|
"knowledge_consistency_checker",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -917,6 +960,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"search",
|
"search",
|
||||||
"ldap",
|
"ldap",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -924,6 +968,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"search",
|
"search",
|
||||||
"local_security_authority",
|
"local_security_authority",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -931,6 +976,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"search",
|
"search",
|
||||||
"name_service_provider_interface",
|
"name_service_provider_interface",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -938,6 +984,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"search",
|
"search",
|
||||||
"directory_service_api",
|
"directory_service_api",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -945,6 +992,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"search",
|
"search",
|
||||||
"security_account_manager",
|
"security_account_manager",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -952,6 +1000,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"search",
|
"search",
|
||||||
"other",
|
"other",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -959,6 +1008,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"write",
|
"write",
|
||||||
"replication_agent",
|
"replication_agent",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -966,6 +1016,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"write",
|
"write",
|
||||||
"knowledge_consistency_checker",
|
"knowledge_consistency_checker",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -973,6 +1024,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"write",
|
"write",
|
||||||
"ldap",
|
"ldap",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -980,6 +1032,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"write",
|
"write",
|
||||||
"local_security_authority",
|
"local_security_authority",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -987,6 +1040,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"write",
|
"write",
|
||||||
"name_service_provider_interface",
|
"name_service_provider_interface",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -994,6 +1048,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"write",
|
"write",
|
||||||
"directory_service_api",
|
"directory_service_api",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1001,6 +1056,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"write",
|
"write",
|
||||||
"security_account_manager",
|
"security_account_manager",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.directoryOperationsTotal,
|
c.directoryOperationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1020,16 +1076,19 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DsSecurityDescriptorSubOperationsPerSec,
|
c.perfDataObject[0].DsSecurityDescriptorSubOperationsPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.securityDescriptorPropagationEventsQueued,
|
c.securityDescriptorPropagationEventsQueued,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].DsSecurityDescriptorPropagationsEvents,
|
c.perfDataObject[0].DsSecurityDescriptorPropagationsEvents,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.securityDescriptorPropagationAccessWaitTotalSeconds,
|
c.securityDescriptorPropagationAccessWaitTotalSeconds,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].DsSecurityDescriptorPropagatorAverageExclusionTime,
|
c.perfDataObject[0].DsSecurityDescriptorPropagatorAverageExclusionTime,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.securityDescriptorPropagationItemsQueuedTotal,
|
c.securityDescriptorPropagationItemsQueuedTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1047,12 +1106,14 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].LdapClosedConnectionsPerSec,
|
c.perfDataObject[0].LdapClosedConnectionsPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.ldapOpenedConnectionsTotal,
|
c.ldapOpenedConnectionsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].LdapNewConnectionsPerSec,
|
c.perfDataObject[0].LdapNewConnectionsPerSec,
|
||||||
"ldap",
|
"ldap",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.ldapOpenedConnectionsTotal,
|
c.ldapOpenedConnectionsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1083,11 +1144,13 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].LdapUDPOperationsPerSec,
|
c.perfDataObject[0].LdapUDPOperationsPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.ldapWritesTotal,
|
c.ldapWritesTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].LdapWritesPerSec,
|
c.perfDataObject[0].LdapWritesPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.ldapClientSessions,
|
c.ldapClientSessions,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -1105,6 +1168,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].PhantomsCleanedPerSec,
|
c.perfDataObject[0].PhantomsCleanedPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.phantomObjectsVisitedTotal,
|
c.phantomObjectsVisitedTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1117,18 +1181,21 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].SamGlobalGroupMembershipEvaluationsPerSec,
|
c.perfDataObject[0].SamGlobalGroupMembershipEvaluationsPerSec,
|
||||||
"global",
|
"global",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.samGroupMembershipEvaluationsTotal,
|
c.samGroupMembershipEvaluationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SamDomainLocalGroupMembershipEvaluationsPerSec,
|
c.perfDataObject[0].SamDomainLocalGroupMembershipEvaluationsPerSec,
|
||||||
"domain_local",
|
"domain_local",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.samGroupMembershipEvaluationsTotal,
|
c.samGroupMembershipEvaluationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SamUniversalGroupMembershipEvaluationsPerSec,
|
c.perfDataObject[0].SamUniversalGroupMembershipEvaluationsPerSec,
|
||||||
"universal",
|
"universal",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.samGroupMembershipGlobalCatalogEvaluationsTotal,
|
c.samGroupMembershipGlobalCatalogEvaluationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1140,6 +1207,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SamNonTransitiveMembershipEvaluationsPerSec,
|
c.perfDataObject[0].SamNonTransitiveMembershipEvaluationsPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.samGroupMembershipEvaluationsTransitiveTotal,
|
c.samGroupMembershipEvaluationsTransitiveTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1152,6 +1220,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].SamAccountGroupEvaluationLatency,
|
c.perfDataObject[0].SamAccountGroupEvaluationLatency,
|
||||||
"account_group",
|
"account_group",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.samGroupEvaluationLatency,
|
c.samGroupEvaluationLatency,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -1164,6 +1233,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SamSuccessfulComputerCreationsPerSecIncludesAllRequests,
|
c.perfDataObject[0].SamSuccessfulComputerCreationsPerSecIncludesAllRequests,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.samComputerCreationSuccessfulRequestsTotal,
|
c.samComputerCreationSuccessfulRequestsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1175,6 +1245,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SamUserCreationAttemptsPerSec,
|
c.perfDataObject[0].SamUserCreationAttemptsPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.samUserCreationSuccessfulRequestsTotal,
|
c.samUserCreationSuccessfulRequestsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1186,6 +1257,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SamDisplayInformationQueriesPerSec,
|
c.perfDataObject[0].SamDisplayInformationQueriesPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.samEnumerationsTotal,
|
c.samEnumerationsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -1209,6 +1281,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].TombstonesGarbageCollectedPerSec,
|
c.perfDataObject[0].TombstonesGarbageCollectedPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.tombstonesObjectsVisitedTotal,
|
c.tombstonesObjectsVisitedTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -186,72 +186,84 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
data.RequestsPerSecond,
|
data.RequestsPerSecond,
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.requestProcessingTime,
|
c.requestProcessingTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
utils.MilliSecToSec(data.RequestProcessingTime),
|
utils.MilliSecToSec(data.RequestProcessingTime),
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.retrievalsPerSecond,
|
c.retrievalsPerSecond,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.RetrievalsPerSecond,
|
data.RetrievalsPerSecond,
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.retrievalProcessingTime,
|
c.retrievalProcessingTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
utils.MilliSecToSec(data.RetrievalProcessingTime),
|
utils.MilliSecToSec(data.RetrievalProcessingTime),
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.failedRequestsPerSecond,
|
c.failedRequestsPerSecond,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.FailedRequestsPerSecond,
|
data.FailedRequestsPerSecond,
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.issuedRequestsPerSecond,
|
c.issuedRequestsPerSecond,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.IssuedRequestsPerSecond,
|
data.IssuedRequestsPerSecond,
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.pendingRequestsPerSecond,
|
c.pendingRequestsPerSecond,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.PendingRequestsPerSecond,
|
data.PendingRequestsPerSecond,
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.requestCryptographicSigningTime,
|
c.requestCryptographicSigningTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
utils.MilliSecToSec(data.RequestCryptographicSigningTime),
|
utils.MilliSecToSec(data.RequestCryptographicSigningTime),
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.requestPolicyModuleProcessingTime,
|
c.requestPolicyModuleProcessingTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
utils.MilliSecToSec(data.RequestPolicyModuleProcessingTime),
|
utils.MilliSecToSec(data.RequestPolicyModuleProcessingTime),
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.challengeResponsesPerSecond,
|
c.challengeResponsesPerSecond,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.ChallengeResponsesPerSecond,
|
data.ChallengeResponsesPerSecond,
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.challengeResponseProcessingTime,
|
c.challengeResponseProcessingTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
utils.MilliSecToSec(data.ChallengeResponseProcessingTime),
|
utils.MilliSecToSec(data.ChallengeResponseProcessingTime),
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.signedCertificateTimestampListsPerSecond,
|
c.signedCertificateTimestampListsPerSecond,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.SignedCertificateTimestampListsPerSecond,
|
data.SignedCertificateTimestampListsPerSecond,
|
||||||
data.Name,
|
data.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.signedCertificateTimestampListProcessingTime,
|
c.signedCertificateTimestampListProcessingTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -387,6 +387,8 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to collect ADFS metrics: %w", err)
|
return fmt.Errorf("failed to collect ADFS metrics: %w", err)
|
||||||
|
} else if len(c.perfDataObject) == 0 {
|
||||||
|
return fmt.Errorf("failed to collect ADFS metrics: %w", types.ErrNoDataUnexpected)
|
||||||
}
|
}
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
4
internal/collector/cache/cache.go
vendored
4
internal/collector/cache/cache.go
vendored
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -290,6 +290,8 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to collect Cache metrics: %w", err)
|
return fmt.Errorf("failed to collect Cache metrics: %w", err)
|
||||||
|
} else if len(c.perfDataObject) == 0 {
|
||||||
|
return fmt.Errorf("failed to collect Cache metrics: %w", types.ErrNoDataUnexpected)
|
||||||
}
|
}
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
|||||||
2
internal/collector/cache/cache_test.go
vendored
2
internal/collector/cache/cache_test.go
vendored
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
2
internal/collector/cache/types.go
vendored
2
internal/collector/cache/types.go
vendored
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -234,12 +234,14 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
coreData.C1TimeSeconds,
|
coreData.C1TimeSeconds,
|
||||||
core, "c1",
|
core, "c1",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.cStateSecondsTotal,
|
c.cStateSecondsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
coreData.C2TimeSeconds,
|
coreData.C2TimeSeconds,
|
||||||
core, "c2",
|
core, "c2",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.cStateSecondsTotal,
|
c.cStateSecondsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -253,24 +255,28 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
coreData.IdleTimeSeconds,
|
coreData.IdleTimeSeconds,
|
||||||
core, "idle",
|
core, "idle",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.timeTotal,
|
c.timeTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
coreData.InterruptTimeSeconds,
|
coreData.InterruptTimeSeconds,
|
||||||
core, "interrupt",
|
core, "interrupt",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.timeTotal,
|
c.timeTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
coreData.DpcTimeSeconds,
|
coreData.DpcTimeSeconds,
|
||||||
core, "dpc",
|
core, "dpc",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.timeTotal,
|
c.timeTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
coreData.PrivilegedTimeSeconds,
|
coreData.PrivilegedTimeSeconds,
|
||||||
core, "privileged",
|
core, "privileged",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.timeTotal,
|
c.timeTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -284,18 +290,21 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
coreData.InterruptsTotal,
|
coreData.InterruptsTotal,
|
||||||
core,
|
core,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.dpcsTotal,
|
c.dpcsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
coreData.DpcQueuedPerSecond,
|
coreData.DpcQueuedPerSecond,
|
||||||
core,
|
core,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.clockInterruptsTotal,
|
c.clockInterruptsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
coreData.ClockInterruptsTotal,
|
coreData.ClockInterruptsTotal,
|
||||||
core,
|
core,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.idleBreakEventsTotal,
|
c.idleBreakEventsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -316,30 +325,35 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
coreData.ProcessorFrequencyMHz,
|
coreData.ProcessorFrequencyMHz,
|
||||||
core,
|
core,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.processorPerformance,
|
c.processorPerformance,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
coreData.ProcessorPerformance,
|
coreData.ProcessorPerformance,
|
||||||
core,
|
core,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.processorMPerf,
|
c.processorMPerf,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
counterProcessorMPerfValues.Value(),
|
counterProcessorMPerfValues.Value(),
|
||||||
core,
|
core,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.processorRTC,
|
c.processorRTC,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
counterProcessorRTCValues.Value(),
|
counterProcessorRTCValues.Value(),
|
||||||
core,
|
core,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.processorUtility,
|
c.processorUtility,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
coreData.ProcessorUtilityRate,
|
coreData.ProcessorUtilityRate,
|
||||||
core,
|
core,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.processorPrivilegedUtility,
|
c.processorPrivilegedUtility,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -194,36 +194,42 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
strconv.Itoa(int(processor.Family)),
|
strconv.Itoa(int(processor.Family)),
|
||||||
strings.TrimRight(processor.Name, " "),
|
strings.TrimRight(processor.Name, " "),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.cpuCoreCount,
|
c.cpuCoreCount,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(processor.NumberOfCores),
|
float64(processor.NumberOfCores),
|
||||||
strings.TrimRight(processor.DeviceID, " "),
|
strings.TrimRight(processor.DeviceID, " "),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.cpuEnabledCoreCount,
|
c.cpuEnabledCoreCount,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(processor.NumberOfEnabledCore),
|
float64(processor.NumberOfEnabledCore),
|
||||||
strings.TrimRight(processor.DeviceID, " "),
|
strings.TrimRight(processor.DeviceID, " "),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.cpuLogicalProcessorsCount,
|
c.cpuLogicalProcessorsCount,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(processor.NumberOfLogicalProcessors),
|
float64(processor.NumberOfLogicalProcessors),
|
||||||
strings.TrimRight(processor.DeviceID, " "),
|
strings.TrimRight(processor.DeviceID, " "),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.cpuThreadCount,
|
c.cpuThreadCount,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(processor.ThreadCount),
|
float64(processor.ThreadCount),
|
||||||
strings.TrimRight(processor.DeviceID, " "),
|
strings.TrimRight(processor.DeviceID, " "),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.cpuL2CacheSize,
|
c.cpuL2CacheSize,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(processor.L2CacheSize),
|
float64(processor.L2CacheSize),
|
||||||
strings.TrimRight(processor.DeviceID, " "),
|
strings.TrimRight(processor.DeviceID, " "),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.cpuL3CacheSize,
|
c.cpuL3CacheSize,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,157 +0,0 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
//
|
|
||||||
// Copyright 2025 The Prometheus Authors
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
//go:build windows
|
|
||||||
|
|
||||||
package cs
|
|
||||||
|
|
||||||
import (
|
|
||||||
"log/slog"
|
|
||||||
|
|
||||||
"github.com/alecthomas/kingpin/v2"
|
|
||||||
"github.com/prometheus-community/windows_exporter/internal/headers/sysinfoapi"
|
|
||||||
"github.com/prometheus-community/windows_exporter/internal/mi"
|
|
||||||
"github.com/prometheus-community/windows_exporter/internal/types"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
)
|
|
||||||
|
|
||||||
const Name = "cs"
|
|
||||||
|
|
||||||
type Config struct{}
|
|
||||||
|
|
||||||
//nolint:gochecknoglobals
|
|
||||||
var ConfigDefaults = Config{}
|
|
||||||
|
|
||||||
// A Collector is a Prometheus Collector for WMI metrics.
|
|
||||||
type Collector struct {
|
|
||||||
config Config
|
|
||||||
|
|
||||||
// physicalMemoryBytes
|
|
||||||
// Deprecated: Use windows_memory_physical_total_bytes instead
|
|
||||||
physicalMemoryBytes *prometheus.Desc
|
|
||||||
// logicalProcessors
|
|
||||||
// Deprecated: Use windows_cpu_logical_processor instead
|
|
||||||
logicalProcessors *prometheus.Desc
|
|
||||||
// hostname
|
|
||||||
// Deprecated: Use windows_os_hostname instead
|
|
||||||
hostname *prometheus.Desc
|
|
||||||
}
|
|
||||||
|
|
||||||
func New(config *Config) *Collector {
|
|
||||||
if config == nil {
|
|
||||||
config = &ConfigDefaults
|
|
||||||
}
|
|
||||||
|
|
||||||
c := &Collector{
|
|
||||||
config: *config,
|
|
||||||
}
|
|
||||||
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewWithFlags(_ *kingpin.Application) *Collector {
|
|
||||||
return &Collector{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Collector) GetName() string {
|
|
||||||
return Name
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Collector) Close() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
|
|
||||||
logger.Warn("The cs collector is deprecated and will be removed in a future release. " +
|
|
||||||
"Logical processors has been moved to cpu_info collector. " +
|
|
||||||
"Physical memory has been moved to memory collector. " +
|
|
||||||
"Hostname has been moved to os collector.")
|
|
||||||
|
|
||||||
c.logicalProcessors = prometheus.NewDesc(
|
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "logical_processors"),
|
|
||||||
"Deprecated: Use windows_cpu_logical_processor instead",
|
|
||||||
nil,
|
|
||||||
nil,
|
|
||||||
)
|
|
||||||
c.physicalMemoryBytes = prometheus.NewDesc(
|
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "physical_memory_bytes"),
|
|
||||||
"Deprecated: Use windows_memory_physical_total_bytes instead",
|
|
||||||
nil,
|
|
||||||
nil,
|
|
||||||
)
|
|
||||||
c.hostname = prometheus.NewDesc(
|
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "hostname"),
|
|
||||||
"Deprecated: Use windows_os_hostname instead",
|
|
||||||
[]string{
|
|
||||||
"hostname",
|
|
||||||
"domain",
|
|
||||||
"fqdn",
|
|
||||||
},
|
|
||||||
nil,
|
|
||||||
)
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Collect sends the metric values for each metric
|
|
||||||
// to the provided prometheus Metric channel.
|
|
||||||
func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|
||||||
// Get systeminfo for number of processors
|
|
||||||
systemInfo := sysinfoapi.GetSystemInfo()
|
|
||||||
|
|
||||||
// Get memory status for physical memory
|
|
||||||
mem, err := sysinfoapi.GlobalMemoryStatusEx()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
|
||||||
c.logicalProcessors,
|
|
||||||
prometheus.GaugeValue,
|
|
||||||
float64(systemInfo.NumberOfProcessors),
|
|
||||||
)
|
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
|
||||||
c.physicalMemoryBytes,
|
|
||||||
prometheus.GaugeValue,
|
|
||||||
float64(mem.TotalPhys),
|
|
||||||
)
|
|
||||||
|
|
||||||
hostname, err := sysinfoapi.GetComputerName(sysinfoapi.ComputerNameDNSHostname)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
domain, err := sysinfoapi.GetComputerName(sysinfoapi.ComputerNameDNSDomain)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
fqdn, err := sysinfoapi.GetComputerName(sysinfoapi.ComputerNameDNSFullyQualified)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
|
||||||
c.hostname,
|
|
||||||
prometheus.GaugeValue,
|
|
||||||
1.0,
|
|
||||||
hostname,
|
|
||||||
domain,
|
|
||||||
fqdn,
|
|
||||||
)
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -34,7 +34,7 @@ import (
|
|||||||
const Name = "dfsr"
|
const Name = "dfsr"
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
CollectorsEnabled []string `yaml:"collectors_enabled"`
|
CollectorsEnabled []string `yaml:"sources-enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint:gochecknoglobals
|
//nolint:gochecknoglobals
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -41,7 +41,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
CollectorsEnabled []string `yaml:"collectors_enabled"`
|
CollectorsEnabled []string `yaml:"enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint:gochecknoglobals
|
//nolint:gochecknoglobals
|
||||||
@@ -56,6 +56,8 @@ var ConfigDefaults = Config{
|
|||||||
type Collector struct {
|
type Collector struct {
|
||||||
config Config
|
config Config
|
||||||
|
|
||||||
|
logger *slog.Logger
|
||||||
|
|
||||||
perfDataCollector *pdh.Collector
|
perfDataCollector *pdh.Collector
|
||||||
perfDataObject []perfDataCounterValues
|
perfDataObject []perfDataCounterValues
|
||||||
|
|
||||||
@@ -147,7 +149,9 @@ func (c *Collector) Close() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
|
func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
|
||||||
|
c.logger = logger.With(slog.String("collector", Name))
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
if slices.Contains(c.config.CollectorsEnabled, subCollectorScopeMetrics) {
|
if slices.Contains(c.config.CollectorsEnabled, subCollectorScopeMetrics) {
|
||||||
@@ -405,6 +409,8 @@ func (c *Collector) collectServerMetrics(ch chan<- prometheus.Metric) error {
|
|||||||
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to collect DHCP Server metrics: %w", err)
|
return fmt.Errorf("failed to collect DHCP Server metrics: %w", err)
|
||||||
|
} else if len(c.perfDataObject) == 0 {
|
||||||
|
return fmt.Errorf("failed to collect DHCP Server metrics: %w", types.ErrNoDataUnexpected)
|
||||||
}
|
}
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -38,7 +38,9 @@ var ConfigDefaults = Config{}
|
|||||||
|
|
||||||
// A Collector is a Prometheus Collector for a few WMI metrics in Win32_DiskDrive.
|
// A Collector is a Prometheus Collector for a few WMI metrics in Win32_DiskDrive.
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
config Config
|
config Config
|
||||||
|
logger *slog.Logger
|
||||||
|
|
||||||
miSession *mi.Session
|
miSession *mi.Session
|
||||||
miQuery mi.Query
|
miQuery mi.Query
|
||||||
|
|
||||||
@@ -73,7 +75,9 @@ func (c *Collector) Close() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collector) Build(_ *slog.Logger, miSession *mi.Session) error {
|
func (c *Collector) Build(logger *slog.Logger, miSession *mi.Session) error {
|
||||||
|
c.logger = logger.With(slog.String("collector", Name))
|
||||||
|
|
||||||
c.diskInfo = prometheus.NewDesc(
|
c.diskInfo = prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "info"),
|
prometheus.BuildFQName(types.Namespace, Name, "info"),
|
||||||
"General drive information",
|
"General drive information",
|
||||||
@@ -148,7 +152,7 @@ var (
|
|||||||
"Error",
|
"Error",
|
||||||
"Degraded",
|
"Degraded",
|
||||||
"Unknown",
|
"Unknown",
|
||||||
"Pred fail",
|
"Pred Fail",
|
||||||
"Starting",
|
"Starting",
|
||||||
"Stopping",
|
"Stopping",
|
||||||
"Service",
|
"Service",
|
||||||
@@ -241,6 +245,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
if availNum == int(disk.Availability) {
|
if availNum == int(disk.Availability) {
|
||||||
isCurrentState = 1.0
|
isCurrentState = 1.0
|
||||||
}
|
}
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.availability,
|
c.availability,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -18,8 +18,11 @@
|
|||||||
package dns
|
package dns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
"slices"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/alecthomas/kingpin/v2"
|
"github.com/alecthomas/kingpin/v2"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/mi"
|
"github.com/prometheus-community/windows_exporter/internal/mi"
|
||||||
@@ -28,12 +31,23 @@ import (
|
|||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Name = "dns"
|
const (
|
||||||
|
Name = "dns"
|
||||||
|
subCollectorMetrics = "metrics"
|
||||||
|
subCollectorWMIStats = "wmi_stats"
|
||||||
|
)
|
||||||
|
|
||||||
type Config struct{}
|
type Config struct {
|
||||||
|
CollectorsEnabled []string `yaml:"enabled"`
|
||||||
|
}
|
||||||
|
|
||||||
//nolint:gochecknoglobals
|
//nolint:gochecknoglobals
|
||||||
var ConfigDefaults = Config{}
|
var ConfigDefaults = Config{
|
||||||
|
CollectorsEnabled: []string{
|
||||||
|
subCollectorMetrics,
|
||||||
|
subCollectorWMIStats,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
// A Collector is a Prometheus Collector for WMI Win32_PerfRawData_DNS_DNS metrics.
|
// A Collector is a Prometheus Collector for WMI Win32_PerfRawData_DNS_DNS metrics.
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
@@ -42,6 +56,9 @@ type Collector struct {
|
|||||||
perfDataCollector *pdh.Collector
|
perfDataCollector *pdh.Collector
|
||||||
perfDataObject []perfDataCounterValues
|
perfDataObject []perfDataCounterValues
|
||||||
|
|
||||||
|
miSession *mi.Session
|
||||||
|
miQuery mi.Query
|
||||||
|
|
||||||
dynamicUpdatesFailures *prometheus.Desc
|
dynamicUpdatesFailures *prometheus.Desc
|
||||||
dynamicUpdatesQueued *prometheus.Desc
|
dynamicUpdatesQueued *prometheus.Desc
|
||||||
dynamicUpdatesReceived *prometheus.Desc
|
dynamicUpdatesReceived *prometheus.Desc
|
||||||
@@ -64,6 +81,7 @@ type Collector struct {
|
|||||||
zoneTransferResponsesReceived *prometheus.Desc
|
zoneTransferResponsesReceived *prometheus.Desc
|
||||||
zoneTransferSuccessReceived *prometheus.Desc
|
zoneTransferSuccessReceived *prometheus.Desc
|
||||||
zoneTransferSuccessSent *prometheus.Desc
|
zoneTransferSuccessSent *prometheus.Desc
|
||||||
|
dnsWMIStats *prometheus.Desc
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(config *Config) *Collector {
|
func New(config *Config) *Collector {
|
||||||
@@ -71,6 +89,10 @@ func New(config *Config) *Collector {
|
|||||||
config = &ConfigDefaults
|
config = &ConfigDefaults
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.CollectorsEnabled == nil {
|
||||||
|
config.CollectorsEnabled = ConfigDefaults.CollectorsEnabled
|
||||||
|
}
|
||||||
|
|
||||||
c := &Collector{
|
c := &Collector{
|
||||||
config: *config,
|
config: *config,
|
||||||
}
|
}
|
||||||
@@ -78,8 +100,26 @@ func New(config *Config) *Collector {
|
|||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewWithFlags(_ *kingpin.Application) *Collector {
|
func NewWithFlags(app *kingpin.Application) *Collector {
|
||||||
return &Collector{}
|
c := &Collector{
|
||||||
|
config: ConfigDefaults,
|
||||||
|
}
|
||||||
|
c.config.CollectorsEnabled = make([]string, 0)
|
||||||
|
|
||||||
|
var collectorsEnabled string
|
||||||
|
|
||||||
|
app.Flag(
|
||||||
|
"collector.dns.enabled",
|
||||||
|
"Comma-separated list of collectors to use. Defaults to all, if not specified.",
|
||||||
|
).Default(strings.Join(ConfigDefaults.CollectorsEnabled, ",")).StringVar(&collectorsEnabled)
|
||||||
|
|
||||||
|
app.Action(func(*kingpin.ParseContext) error {
|
||||||
|
c.config.CollectorsEnabled = strings.Split(collectorsEnabled, ",")
|
||||||
|
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
|
||||||
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collector) GetName() string {
|
func (c *Collector) GetName() string {
|
||||||
@@ -92,7 +132,31 @@ func (c *Collector) Close() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
|
func (c *Collector) Build(_ *slog.Logger, miSession *mi.Session) error {
|
||||||
|
for _, collector := range c.config.CollectorsEnabled {
|
||||||
|
if !slices.Contains([]string{subCollectorMetrics, subCollectorWMIStats}, collector) {
|
||||||
|
return fmt.Errorf("unknown sub collector: %s. Possible values: %s", collector,
|
||||||
|
strings.Join([]string{subCollectorMetrics, subCollectorWMIStats}, ", "),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if slices.Contains(c.config.CollectorsEnabled, subCollectorMetrics) {
|
||||||
|
if err := c.buildMetricsCollector(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if slices.Contains(c.config.CollectorsEnabled, subCollectorWMIStats) {
|
||||||
|
if err := c.buildErrorStatsCollector(miSession); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) buildMetricsCollector() error {
|
||||||
c.zoneTransferRequestsReceived = prometheus.NewDesc(
|
c.zoneTransferRequestsReceived = prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "zone_transfer_requests_received_total"),
|
prometheus.BuildFQName(types.Namespace, Name, "zone_transfer_requests_received_total"),
|
||||||
"Number of zone transfer requests (AXFR/IXFR) received by the master DNS server",
|
"Number of zone transfer requests (AXFR/IXFR) received by the master DNS server",
|
||||||
@@ -226,6 +290,13 @@ func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
|
|||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
c.dnsWMIStats = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "wmi_stats_total"),
|
||||||
|
"DNS WMI statistics from MicrosoftDNS_Statistic",
|
||||||
|
[]string{"name", "collection_name", "dns_server"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
c.perfDataCollector, err = pdh.NewCollector[perfDataCounterValues](pdh.CounterTypeRaw, "DNS", pdh.InstancesAll)
|
c.perfDataCollector, err = pdh.NewCollector[perfDataCounterValues](pdh.CounterTypeRaw, "DNS", pdh.InstancesAll)
|
||||||
@@ -236,12 +307,48 @@ func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Collector) buildErrorStatsCollector(miSession *mi.Session) error {
|
||||||
|
if miSession == nil {
|
||||||
|
return errors.New("miSession is nil")
|
||||||
|
}
|
||||||
|
|
||||||
|
query, err := mi.NewQuery("SELECT Name, CollectionName, Value, DnsServerName FROM MicrosoftDNS_Statistic WHERE CollectionName = 'Error Stats'")
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to create query: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
c.miSession = miSession
|
||||||
|
c.miQuery = query
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Collect sends the metric values for each metric
|
// Collect sends the metric values for each metric
|
||||||
// to the provided prometheus Metric channel.
|
// to the provided prometheus Metric channel.
|
||||||
func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
||||||
|
errs := make([]error, 0)
|
||||||
|
|
||||||
|
if slices.Contains(c.config.CollectorsEnabled, subCollectorMetrics) {
|
||||||
|
if err := c.collectMetrics(ch); err != nil {
|
||||||
|
errs = append(errs, fmt.Errorf("failed collecting metrics: %w", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if slices.Contains(c.config.CollectorsEnabled, subCollectorWMIStats) {
|
||||||
|
if err := c.collectErrorStats(ch); err != nil {
|
||||||
|
errs = append(errs, fmt.Errorf("failed collecting WMI statistics: %w", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors.Join(errs...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) collectMetrics(ch chan<- prometheus.Metric) error {
|
||||||
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
err := c.perfDataCollector.Collect(&c.perfDataObject)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to collect DNS metrics: %w", err)
|
return fmt.Errorf("failed to collect DNS metrics: %w", err)
|
||||||
|
} else if len(c.perfDataObject) == 0 {
|
||||||
|
return fmt.Errorf("failed to collect DNS metrics: %w", types.ErrNoDataUnexpected)
|
||||||
}
|
}
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
@@ -250,6 +357,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].AxfrRequestReceived,
|
c.perfDataObject[0].AxfrRequestReceived,
|
||||||
"full",
|
"full",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.zoneTransferRequestsReceived,
|
c.zoneTransferRequestsReceived,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -263,12 +371,14 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].AxfrRequestSent,
|
c.perfDataObject[0].AxfrRequestSent,
|
||||||
"full",
|
"full",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.zoneTransferRequestsSent,
|
c.zoneTransferRequestsSent,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].IxfrRequestSent,
|
c.perfDataObject[0].IxfrRequestSent,
|
||||||
"incremental",
|
"incremental",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.zoneTransferRequestsSent,
|
c.zoneTransferRequestsSent,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -282,6 +392,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].AxfrResponseReceived,
|
c.perfDataObject[0].AxfrResponseReceived,
|
||||||
"full",
|
"full",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.zoneTransferResponsesReceived,
|
c.zoneTransferResponsesReceived,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -296,6 +407,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"full",
|
"full",
|
||||||
"tcp",
|
"tcp",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.zoneTransferSuccessReceived,
|
c.zoneTransferSuccessReceived,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -303,6 +415,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
"incremental",
|
"incremental",
|
||||||
"tcp",
|
"tcp",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.zoneTransferSuccessReceived,
|
c.zoneTransferSuccessReceived,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -317,6 +430,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].AxfrSuccessSent,
|
c.perfDataObject[0].AxfrSuccessSent,
|
||||||
"full",
|
"full",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.zoneTransferSuccessSent,
|
c.zoneTransferSuccessSent,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -336,30 +450,35 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].CachingMemory,
|
c.perfDataObject[0].CachingMemory,
|
||||||
"caching",
|
"caching",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.memoryUsedBytes,
|
c.memoryUsedBytes,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].DatabaseNodeMemory,
|
c.perfDataObject[0].DatabaseNodeMemory,
|
||||||
"database_node",
|
"database_node",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.memoryUsedBytes,
|
c.memoryUsedBytes,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].NbStatMemory,
|
c.perfDataObject[0].NbStatMemory,
|
||||||
"nbstat",
|
"nbstat",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.memoryUsedBytes,
|
c.memoryUsedBytes,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].RecordFlowMemory,
|
c.perfDataObject[0].RecordFlowMemory,
|
||||||
"record_flow",
|
"record_flow",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.memoryUsedBytes,
|
c.memoryUsedBytes,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].TcpMessageMemory,
|
c.perfDataObject[0].TcpMessageMemory,
|
||||||
"tcp_message",
|
"tcp_message",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.memoryUsedBytes,
|
c.memoryUsedBytes,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -373,23 +492,27 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].DynamicUpdateNoOperation,
|
c.perfDataObject[0].DynamicUpdateNoOperation,
|
||||||
"noop",
|
"noop",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.dynamicUpdatesReceived,
|
c.dynamicUpdatesReceived,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DynamicUpdateWrittenToDatabase,
|
c.perfDataObject[0].DynamicUpdateWrittenToDatabase,
|
||||||
"written",
|
"written",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.dynamicUpdatesQueued,
|
c.dynamicUpdatesQueued,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObject[0].DynamicUpdateQueued,
|
c.perfDataObject[0].DynamicUpdateQueued,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.dynamicUpdatesFailures,
|
c.dynamicUpdatesFailures,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].DynamicUpdateRejected,
|
c.perfDataObject[0].DynamicUpdateRejected,
|
||||||
"rejected",
|
"rejected",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.dynamicUpdatesFailures,
|
c.dynamicUpdatesFailures,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -402,6 +525,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].NotifyReceived,
|
c.perfDataObject[0].NotifyReceived,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.notifySent,
|
c.notifySent,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -413,11 +537,13 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].RecursiveQueries,
|
c.perfDataObject[0].RecursiveQueries,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.recursiveQueryFailures,
|
c.recursiveQueryFailures,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].RecursiveQueryFailure,
|
c.perfDataObject[0].RecursiveQueryFailure,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.recursiveQuerySendTimeouts,
|
c.recursiveQuerySendTimeouts,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -430,6 +556,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].TcpQueryReceived,
|
c.perfDataObject[0].TcpQueryReceived,
|
||||||
"tcp",
|
"tcp",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.queries,
|
c.queries,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -443,6 +570,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].TcpResponseSent,
|
c.perfDataObject[0].TcpResponseSent,
|
||||||
"tcp",
|
"tcp",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.responses,
|
c.responses,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -462,6 +590,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].WinsLookupReceived,
|
c.perfDataObject[0].WinsLookupReceived,
|
||||||
"forward",
|
"forward",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.winsQueries,
|
c.winsQueries,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -475,6 +604,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].WinsResponseSent,
|
c.perfDataObject[0].WinsResponseSent,
|
||||||
"forward",
|
"forward",
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.winsResponses,
|
c.winsResponses,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -487,6 +617,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObject[0].SecureUpdateFailure,
|
c.perfDataObject[0].SecureUpdateFailure,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.secureUpdateReceived,
|
c.secureUpdateReceived,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
@@ -495,3 +626,24 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Collector) collectErrorStats(ch chan<- prometheus.Metric) error {
|
||||||
|
var stats []Statistic
|
||||||
|
if err := c.miSession.Query(&stats, mi.NamespaceRootMicrosoftDNS, c.miQuery); err != nil {
|
||||||
|
return fmt.Errorf("failed to query DNS statistics: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Collect DNS error statistics
|
||||||
|
for _, stat := range stats {
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.dnsWMIStats,
|
||||||
|
prometheus.CounterValue,
|
||||||
|
float64(stat.Value),
|
||||||
|
stat.Name,
|
||||||
|
stat.CollectionName,
|
||||||
|
stat.DnsServerName,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -107,3 +107,11 @@ type perfDataCounterValues struct {
|
|||||||
_ float64 `perfdata:"Zone Transfer SOA Request Sent"`
|
_ float64 `perfdata:"Zone Transfer SOA Request Sent"`
|
||||||
_ float64 `perfdata:"Zone Transfer Success"`
|
_ float64 `perfdata:"Zone Transfer Success"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Statistic represents the structure for DNS error statistics
|
||||||
|
type Statistic struct {
|
||||||
|
Name string `mi:"Name"`
|
||||||
|
CollectionName string `mi:"CollectionName"`
|
||||||
|
Value uint64 `mi:"Value"`
|
||||||
|
DnsServerName string `mi:"DnsServerName"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -46,7 +46,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
CollectorsEnabled []string `yaml:"collectors_enabled"`
|
CollectorsEnabled []string `yaml:"enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint:gochecknoglobals
|
//nolint:gochecknoglobals
|
||||||
@@ -66,11 +66,6 @@ var ConfigDefaults = Config{
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
config Config
|
|
||||||
|
|
||||||
collectorFns []func(ch chan<- prometheus.Metric) error
|
|
||||||
closeFns []func()
|
|
||||||
|
|
||||||
collectorADAccessProcesses
|
collectorADAccessProcesses
|
||||||
collectorActiveSync
|
collectorActiveSync
|
||||||
collectorAutoDiscover
|
collectorAutoDiscover
|
||||||
@@ -81,6 +76,11 @@ type Collector struct {
|
|||||||
collectorRpcClientAccess
|
collectorRpcClientAccess
|
||||||
collectorTransportQueues
|
collectorTransportQueues
|
||||||
collectorWorkloadManagementWorkloads
|
collectorWorkloadManagementWorkloads
|
||||||
|
|
||||||
|
config Config
|
||||||
|
|
||||||
|
collectorFns []func(ch chan<- prometheus.Metric) error
|
||||||
|
closeFns []func()
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(config *Config) *Collector {
|
func New(config *Config) *Collector {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -82,11 +82,13 @@ func (c *Collector) collectActiveSync(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.RequestsPerSec,
|
data.RequestsPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.pingCommandsPending,
|
c.pingCommandsPending,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.PingCommandsPending,
|
data.PingCommandsPending,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.syncCommandsPerSec,
|
c.syncCommandsPerSec,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -113,24 +113,28 @@ func (c *Collector) collectADAccessProcesses(ch chan<- prometheus.Metric) error
|
|||||||
utils.MilliSecToSec(data.LdapReadTime),
|
utils.MilliSecToSec(data.LdapReadTime),
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.ldapSearchTime,
|
c.ldapSearchTime,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
utils.MilliSecToSec(data.LdapSearchTime),
|
utils.MilliSecToSec(data.LdapSearchTime),
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.ldapWriteTime,
|
c.ldapWriteTime,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
utils.MilliSecToSec(data.LdapWriteTime),
|
utils.MilliSecToSec(data.LdapWriteTime),
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.ldapTimeoutErrorsPerSec,
|
c.ldapTimeoutErrorsPerSec,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.LdapTimeoutErrorsPerSec,
|
data.LdapTimeoutErrorsPerSec,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.longRunningLDAPOperationsPerMin,
|
c.longRunningLDAPOperationsPerMin,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -39,7 +39,7 @@ type perfDataCounterValuesAutoDiscover struct {
|
|||||||
func (c *Collector) buildAutoDiscover() error {
|
func (c *Collector) buildAutoDiscover() error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
c.perfDataCollectorAutoDiscover, err = pdh.NewCollector[perfDataCounterValuesAutoDiscover](pdh.CounterTypeRaw, "MSExchange Autodiscover", pdh.InstancesAll)
|
c.perfDataCollectorAutoDiscover, err = pdh.NewCollector[perfDataCounterValuesAutoDiscover](pdh.CounterTypeRaw, "MSExchangeAutodiscover", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to create MSExchange Autodiscover collector: %w", err)
|
return fmt.Errorf("failed to create MSExchange Autodiscover collector: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -33,7 +33,7 @@ type collectorAvailabilityService struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type perfDataCounterValuesAvailabilityService struct {
|
type perfDataCounterValuesAvailabilityService struct {
|
||||||
RequestsPerSec float64 `perfdata:"Requests/sec"`
|
AvailabilityRequestsPerSec float64 `perfdata:"Availability Requests (sec)"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collector) buildAvailabilityService() error {
|
func (c *Collector) buildAvailabilityService() error {
|
||||||
@@ -45,7 +45,7 @@ func (c *Collector) buildAvailabilityService() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.availabilityRequestsSec = prometheus.NewDesc(
|
c.availabilityRequestsSec = prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "avail_service_requests_per_sec"),
|
prometheus.BuildFQName(types.Namespace, Name, "availability_service_requests_per_sec"),
|
||||||
"Number of requests serviced per second",
|
"Number of requests serviced per second",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
@@ -64,7 +64,7 @@ func (c *Collector) collectAvailabilityService(ch chan<- prometheus.Metric) erro
|
|||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.availabilityRequestsSec,
|
c.availabilityRequestsSec,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.RequestsPerSec,
|
data.AvailabilityRequestsPerSec,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -111,30 +111,35 @@ func (c *Collector) collectHTTPProxy(ch chan<- prometheus.Metric) error {
|
|||||||
utils.MilliSecToSec(data.MailboxServerLocatorAverageLatency),
|
utils.MilliSecToSec(data.MailboxServerLocatorAverageLatency),
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.averageAuthenticationLatency,
|
c.averageAuthenticationLatency,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.AverageAuthenticationLatency,
|
data.AverageAuthenticationLatency,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.averageCASProcessingLatency,
|
c.averageCASProcessingLatency,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
utils.MilliSecToSec(data.AverageCASProcessingLatency),
|
utils.MilliSecToSec(data.AverageCASProcessingLatency),
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.mailboxServerProxyFailureRate,
|
c.mailboxServerProxyFailureRate,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.MailboxServerProxyFailureRate,
|
data.MailboxServerProxyFailureRate,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.outstandingProxyRequests,
|
c.outstandingProxyRequests,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.OutstandingProxyRequests,
|
data.OutstandingProxyRequests,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.proxyRequestsPerSec,
|
c.proxyRequestsPerSec,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -74,6 +74,7 @@ func (c *Collector) collectOWA(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.CurrentUniqueUsers,
|
data.CurrentUniqueUsers,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.owaRequestsPerSec,
|
c.owaRequestsPerSec,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -107,26 +107,31 @@ func (c *Collector) collectRpcClientAccess(ch chan<- prometheus.Metric) error {
|
|||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
utils.MilliSecToSec(data.RpcAveragedLatency),
|
utils.MilliSecToSec(data.RpcAveragedLatency),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.rpcRequests,
|
c.rpcRequests,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.RpcRequests,
|
data.RpcRequests,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.activeUserCount,
|
c.activeUserCount,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.ActiveUserCount,
|
data.ActiveUserCount,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.connectionCount,
|
c.connectionCount,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.ConnectionCount,
|
data.ConnectionCount,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.rpcOperationsPerSec,
|
c.rpcOperationsPerSec,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.RpcOperationsPerSec,
|
data.RpcOperationsPerSec,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.userCount,
|
c.userCount,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -41,7 +41,7 @@ type collectorTransportQueues struct {
|
|||||||
messagesSubmittedTotal *prometheus.Desc
|
messagesSubmittedTotal *prometheus.Desc
|
||||||
messagesDelayedTotal *prometheus.Desc
|
messagesDelayedTotal *prometheus.Desc
|
||||||
messagesCompletedDeliveryTotal *prometheus.Desc
|
messagesCompletedDeliveryTotal *prometheus.Desc
|
||||||
shadowQueueLength *prometheus.Desc
|
aggregateShadowQueueLength *prometheus.Desc
|
||||||
submissionQueueLength *prometheus.Desc
|
submissionQueueLength *prometheus.Desc
|
||||||
delayQueueLength *prometheus.Desc
|
delayQueueLength *prometheus.Desc
|
||||||
itemsCompletedDeliveryTotal *prometheus.Desc
|
itemsCompletedDeliveryTotal *prometheus.Desc
|
||||||
@@ -65,7 +65,7 @@ type perfDataCounterValuesTransportQueues struct {
|
|||||||
MessagesSubmittedTotal float64 `perfdata:"Messages Submitted Total"`
|
MessagesSubmittedTotal float64 `perfdata:"Messages Submitted Total"`
|
||||||
MessagesDelayedTotal float64 `perfdata:"Messages Delayed Total"`
|
MessagesDelayedTotal float64 `perfdata:"Messages Delayed Total"`
|
||||||
MessagesCompletedDeliveryTotal float64 `perfdata:"Messages Completed Delivery Total"`
|
MessagesCompletedDeliveryTotal float64 `perfdata:"Messages Completed Delivery Total"`
|
||||||
ShadowQueueLength float64 `perfdata:"Shadow Queue Length"`
|
AggregateShadowQueueLength float64 `perfdata:"Aggregate Shadow Queue Length"`
|
||||||
SubmissionQueueLength float64 `perfdata:"Submission Queue Length"`
|
SubmissionQueueLength float64 `perfdata:"Submission Queue Length"`
|
||||||
DelayQueueLength float64 `perfdata:"Delay Queue Length"`
|
DelayQueueLength float64 `perfdata:"Delay Queue Length"`
|
||||||
ItemsCompletedDeliveryTotal float64 `perfdata:"Items Completed Delivery Total"`
|
ItemsCompletedDeliveryTotal float64 `perfdata:"Items Completed Delivery Total"`
|
||||||
@@ -154,9 +154,9 @@ func (c *Collector) buildTransportQueues() error {
|
|||||||
[]string{"name"},
|
[]string{"name"},
|
||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
c.shadowQueueLength = prometheus.NewDesc(
|
c.aggregateShadowQueueLength = prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "transport_queues_shadow_queue_length"),
|
prometheus.BuildFQName(types.Namespace, Name, "transport_queues_aggregate_shadow_queue_length"),
|
||||||
"Shadow Queue Length",
|
"The current number of messages in shadow queues.",
|
||||||
[]string{"name"},
|
[]string{"name"},
|
||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
@@ -215,108 +215,126 @@ func (c *Collector) collectTransportQueues(ch chan<- prometheus.Metric) error {
|
|||||||
data.ExternalActiveRemoteDeliveryQueueLength,
|
data.ExternalActiveRemoteDeliveryQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.internalActiveRemoteDeliveryQueueLength,
|
c.internalActiveRemoteDeliveryQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.InternalActiveRemoteDeliveryQueueLength,
|
data.InternalActiveRemoteDeliveryQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.activeMailboxDeliveryQueueLength,
|
c.activeMailboxDeliveryQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.ActiveMailboxDeliveryQueueLength,
|
data.ActiveMailboxDeliveryQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.retryMailboxDeliveryQueueLength,
|
c.retryMailboxDeliveryQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.RetryMailboxDeliveryQueueLength,
|
data.RetryMailboxDeliveryQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.unreachableQueueLength,
|
c.unreachableQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.UnreachableQueueLength,
|
data.UnreachableQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.externalLargestDeliveryQueueLength,
|
c.externalLargestDeliveryQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.ExternalLargestDeliveryQueueLength,
|
data.ExternalLargestDeliveryQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.internalLargestDeliveryQueueLength,
|
c.internalLargestDeliveryQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.InternalLargestDeliveryQueueLength,
|
data.InternalLargestDeliveryQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.poisonQueueLength,
|
c.poisonQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.PoisonQueueLength,
|
data.PoisonQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.messagesQueuedForDeliveryTotal,
|
c.messagesQueuedForDeliveryTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.MessagesQueuedForDeliveryTotal,
|
data.MessagesQueuedForDeliveryTotal,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.messagesSubmittedTotal,
|
c.messagesSubmittedTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.MessagesSubmittedTotal,
|
data.MessagesSubmittedTotal,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.messagesDelayedTotal,
|
c.messagesDelayedTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.MessagesDelayedTotal,
|
data.MessagesDelayedTotal,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.messagesCompletedDeliveryTotal,
|
c.messagesCompletedDeliveryTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.MessagesCompletedDeliveryTotal,
|
data.MessagesCompletedDeliveryTotal,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.shadowQueueLength,
|
c.aggregateShadowQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.ShadowQueueLength,
|
data.AggregateShadowQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.submissionQueueLength,
|
c.submissionQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.SubmissionQueueLength,
|
data.SubmissionQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.delayQueueLength,
|
c.delayQueueLength,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
data.DelayQueueLength,
|
data.DelayQueueLength,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.itemsCompletedDeliveryTotal,
|
c.itemsCompletedDeliveryTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.ItemsCompletedDeliveryTotal,
|
data.ItemsCompletedDeliveryTotal,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.itemsQueuedForDeliveryExpiredTotal,
|
c.itemsQueuedForDeliveryExpiredTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.ItemsQueuedForDeliveryExpiredTotal,
|
data.ItemsQueuedForDeliveryExpiredTotal,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.itemsQueuedForDeliveryTotal,
|
c.itemsQueuedForDeliveryTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.ItemsQueuedForDeliveryTotal,
|
data.ItemsQueuedForDeliveryTotal,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.itemsResubmittedTotal,
|
c.itemsResubmittedTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -103,24 +103,28 @@ func (c *Collector) collectWorkloadManagementWorkloads(ch chan<- prometheus.Metr
|
|||||||
data.ActiveTasks,
|
data.ActiveTasks,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.completedTasks,
|
c.completedTasks,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.CompletedTasks,
|
data.CompletedTasks,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.queuedTasks,
|
c.queuedTasks,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.QueuedTasks,
|
data.QueuedTasks,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.yieldedTasks,
|
c.yieldedTasks,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
data.YieldedTasks,
|
data.YieldedTasks,
|
||||||
labelName,
|
labelName,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.isActive,
|
c.isActive,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -35,7 +35,7 @@ import (
|
|||||||
const Name = "filetime"
|
const Name = "filetime"
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
FilePatterns []string
|
FilePatterns []string `yaml:"file-patterns"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint:gochecknoglobals
|
//nolint:gochecknoglobals
|
||||||
@@ -172,7 +172,7 @@ func (c *Collector) collectGlobFilePath(ch chan<- prometheus.Metric, filePattern
|
|||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.fileMTime,
|
c.fileMTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(fileInfo.ModTime().UTC().Unix()),
|
float64(fileInfo.ModTime().UTC().UnixMicro())/1e6,
|
||||||
filePath,
|
filePath,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -190,6 +190,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
path,
|
path,
|
||||||
template,
|
template,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.size,
|
c.size,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -197,6 +198,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
path,
|
path,
|
||||||
template,
|
template,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.usage,
|
c.usage,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -204,12 +206,14 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
path,
|
path,
|
||||||
template,
|
template,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.description,
|
c.description,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
1.0,
|
1.0,
|
||||||
path, template, Description,
|
path, template, Description,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.disabled,
|
c.disabled,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -217,6 +221,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
path,
|
path,
|
||||||
template,
|
template,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.matchesTemplate,
|
c.matchesTemplate,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
@@ -224,6 +229,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
path,
|
path,
|
||||||
template,
|
template,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.softLimit,
|
c.softLimit,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
473
internal/collector/gpu/gpu.go
Normal file
473
internal/collector/gpu/gpu.go
Normal file
@@ -0,0 +1,473 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
// Copyright The Prometheus Authors
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
//go:build windows
|
||||||
|
|
||||||
|
package gpu
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"log/slog"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/alecthomas/kingpin/v2"
|
||||||
|
"github.com/prometheus-community/windows_exporter/internal/headers/setupapi"
|
||||||
|
"github.com/prometheus-community/windows_exporter/internal/mi"
|
||||||
|
"github.com/prometheus-community/windows_exporter/internal/pdh"
|
||||||
|
"github.com/prometheus-community/windows_exporter/internal/types"
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
)
|
||||||
|
|
||||||
|
const Name = "gpu"
|
||||||
|
|
||||||
|
type Config struct{}
|
||||||
|
|
||||||
|
//nolint:gochecknoglobals
|
||||||
|
var ConfigDefaults = Config{}
|
||||||
|
|
||||||
|
type Collector struct {
|
||||||
|
config Config
|
||||||
|
|
||||||
|
// GPU Engine
|
||||||
|
gpuEnginePerfDataCollector *pdh.Collector
|
||||||
|
gpuEnginePerfDataObject []gpuEnginePerfDataCounterValues
|
||||||
|
|
||||||
|
gpuInfo *prometheus.Desc
|
||||||
|
gpuEngineRunningTime *prometheus.Desc
|
||||||
|
|
||||||
|
// GPU Adapter Memory
|
||||||
|
gpuAdapterMemoryPerfDataCollector *pdh.Collector
|
||||||
|
gpuAdapterMemoryPerfDataObject []gpuAdapterMemoryPerfDataCounterValues
|
||||||
|
|
||||||
|
gpuAdapterMemoryDedicatedUsage *prometheus.Desc
|
||||||
|
gpuAdapterMemorySharedUsage *prometheus.Desc
|
||||||
|
gpuAdapterMemoryTotalCommitted *prometheus.Desc
|
||||||
|
|
||||||
|
// GPU Local Adapter Memory
|
||||||
|
gpuLocalAdapterMemoryPerfDataCollector *pdh.Collector
|
||||||
|
gpuLocalAdapterMemoryPerfDataObject []gpuLocalAdapterMemoryPerfDataCounterValues
|
||||||
|
|
||||||
|
gpuLocalAdapterMemoryUsage *prometheus.Desc
|
||||||
|
|
||||||
|
// GPU Non Local Adapter Memory
|
||||||
|
gpuNonLocalAdapterMemoryPerfDataCollector *pdh.Collector
|
||||||
|
gpuNonLocalAdapterMemoryPerfDataObject []gpuNonLocalAdapterMemoryPerfDataCounterValues
|
||||||
|
|
||||||
|
gpuNonLocalAdapterMemoryUsage *prometheus.Desc
|
||||||
|
|
||||||
|
// GPU Process Memory
|
||||||
|
gpuProcessMemoryPerfDataCollector *pdh.Collector
|
||||||
|
gpuProcessMemoryPerfDataObject []gpuProcessMemoryPerfDataCounterValues
|
||||||
|
|
||||||
|
gpuProcessMemoryDedicatedUsage *prometheus.Desc
|
||||||
|
gpuProcessMemoryLocalUsage *prometheus.Desc
|
||||||
|
gpuProcessMemoryNonLocalUsage *prometheus.Desc
|
||||||
|
gpuProcessMemorySharedUsage *prometheus.Desc
|
||||||
|
gpuProcessMemoryTotalCommitted *prometheus.Desc
|
||||||
|
}
|
||||||
|
|
||||||
|
func New(config *Config) *Collector {
|
||||||
|
if config == nil {
|
||||||
|
config = &ConfigDefaults
|
||||||
|
}
|
||||||
|
|
||||||
|
c := &Collector{
|
||||||
|
config: *config,
|
||||||
|
}
|
||||||
|
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewWithFlags(_ *kingpin.Application) *Collector {
|
||||||
|
return &Collector{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) GetName() string {
|
||||||
|
return Name
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) Close() error {
|
||||||
|
c.gpuEnginePerfDataCollector.Close()
|
||||||
|
c.gpuAdapterMemoryPerfDataCollector.Close()
|
||||||
|
c.gpuLocalAdapterMemoryPerfDataCollector.Close()
|
||||||
|
c.gpuNonLocalAdapterMemoryPerfDataCollector.Close()
|
||||||
|
c.gpuProcessMemoryPerfDataCollector.Close()
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
|
||||||
|
var err error
|
||||||
|
|
||||||
|
c.gpuInfo = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "info"),
|
||||||
|
"A metric with a constant '1' value labeled with gpu device information.",
|
||||||
|
[]string{"phys", "physical_device_object_name", "hardware_id", "friendly_name", "description"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
|
||||||
|
c.gpuEngineRunningTime = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "engine_time_seconds"),
|
||||||
|
"Total running time of the GPU in seconds.",
|
||||||
|
[]string{"process_id", "phys", "eng", "engtype"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
|
||||||
|
c.gpuAdapterMemoryDedicatedUsage = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "adapter_memory_dedicated_bytes"),
|
||||||
|
"Dedicated GPU memory usage in bytes.",
|
||||||
|
[]string{"phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
c.gpuAdapterMemorySharedUsage = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "adapter_memory_shared_bytes"),
|
||||||
|
"Shared GPU memory usage in bytes.",
|
||||||
|
[]string{"phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
c.gpuAdapterMemoryTotalCommitted = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "adapter_memory_committed_bytes"),
|
||||||
|
"Total committed GPU memory in bytes.",
|
||||||
|
[]string{"phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
|
||||||
|
c.gpuLocalAdapterMemoryUsage = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "local_adapter_memory_bytes"),
|
||||||
|
"Local adapter memory usage in bytes.",
|
||||||
|
[]string{"phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
|
||||||
|
c.gpuNonLocalAdapterMemoryUsage = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "non_local_adapter_memory_bytes"),
|
||||||
|
"Non-local adapter memory usage in bytes.",
|
||||||
|
[]string{"phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
|
||||||
|
c.gpuProcessMemoryDedicatedUsage = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "process_memory_dedicated_bytes"),
|
||||||
|
"Dedicated process memory usage in bytes.",
|
||||||
|
[]string{"process_id", "phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
c.gpuProcessMemoryLocalUsage = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "process_memory_local_bytes"),
|
||||||
|
"Local process memory usage in bytes.",
|
||||||
|
[]string{"process_id", "phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
c.gpuProcessMemoryNonLocalUsage = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "process_memory_non_local_bytes"),
|
||||||
|
"Non-local process memory usage in bytes.",
|
||||||
|
[]string{"process_id", "phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
c.gpuProcessMemorySharedUsage = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "process_memory_shared_bytes"),
|
||||||
|
"Shared process memory usage in bytes.",
|
||||||
|
[]string{"process_id", "phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
c.gpuProcessMemoryTotalCommitted = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(types.Namespace, Name, "process_memory_committed_bytes"),
|
||||||
|
"Total committed process memory in bytes.",
|
||||||
|
[]string{"process_id", "phys"},
|
||||||
|
nil,
|
||||||
|
)
|
||||||
|
|
||||||
|
errs := make([]error, 0)
|
||||||
|
|
||||||
|
c.gpuEnginePerfDataCollector, err = pdh.NewCollector[gpuEnginePerfDataCounterValues](pdh.CounterTypeRaw, "GPU Engine", pdh.InstancesAll)
|
||||||
|
if err != nil {
|
||||||
|
errs = append(errs, fmt.Errorf("failed to create GPU Engine perf data collector: %w", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
c.gpuAdapterMemoryPerfDataCollector, err = pdh.NewCollector[gpuAdapterMemoryPerfDataCounterValues](pdh.CounterTypeRaw, "GPU Adapter Memory", pdh.InstancesAll)
|
||||||
|
if err != nil {
|
||||||
|
errs = append(errs, fmt.Errorf("failed to create GPU Adapter Memory perf data collector: %w", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
c.gpuLocalAdapterMemoryPerfDataCollector, err = pdh.NewCollector[gpuLocalAdapterMemoryPerfDataCounterValues](pdh.CounterTypeRaw, "GPU Local Adapter Memory", pdh.InstancesAll)
|
||||||
|
if err != nil {
|
||||||
|
errs = append(errs, fmt.Errorf("failed to create GPU Local Adapter Memory perf data collector: %w", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
c.gpuNonLocalAdapterMemoryPerfDataCollector, err = pdh.NewCollector[gpuNonLocalAdapterMemoryPerfDataCounterValues](pdh.CounterTypeRaw, "GPU Non Local Adapter Memory", pdh.InstancesAll)
|
||||||
|
if err != nil {
|
||||||
|
errs = append(errs, fmt.Errorf("failed to create GPU Non Local Adapter Memory perf data collector: %w", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
c.gpuProcessMemoryPerfDataCollector, err = pdh.NewCollector[gpuProcessMemoryPerfDataCounterValues](pdh.CounterTypeRaw, "GPU Process Memory", pdh.InstancesAll)
|
||||||
|
if err != nil {
|
||||||
|
errs = append(errs, fmt.Errorf("failed to create GPU Process Memory perf data collector: %w", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors.Join(errs...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
||||||
|
errs := make([]error, 0)
|
||||||
|
|
||||||
|
if err := c.collectGpuInfo(ch); err != nil {
|
||||||
|
errs = append(errs, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := c.collectGpuEngineMetrics(ch); err != nil {
|
||||||
|
errs = append(errs, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := c.collectGpuAdapterMemoryMetrics(ch); err != nil {
|
||||||
|
errs = append(errs, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := c.collectGpuLocalAdapterMemoryMetrics(ch); err != nil {
|
||||||
|
errs = append(errs, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := c.collectGpuNonLocalAdapterMemoryMetrics(ch); err != nil {
|
||||||
|
errs = append(errs, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := c.collectGpuProcessMemoryMetrics(ch); err != nil {
|
||||||
|
errs = append(errs, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors.Join(errs...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) collectGpuInfo(ch chan<- prometheus.Metric) error {
|
||||||
|
gpus, err := setupapi.GetGPUDevices()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to get GPU devices: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
for i, gpu := range gpus {
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuInfo,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
1.0,
|
||||||
|
strconv.Itoa(i),
|
||||||
|
gpu.PhysicalDeviceObjectName,
|
||||||
|
gpu.HardwareID,
|
||||||
|
gpu.FriendlyName,
|
||||||
|
gpu.DeviceDesc,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) collectGpuEngineMetrics(ch chan<- prometheus.Metric) error {
|
||||||
|
// Collect the GPU Engine perf data.
|
||||||
|
if err := c.gpuEnginePerfDataCollector.Collect(&c.gpuEnginePerfDataObject); err != nil {
|
||||||
|
return fmt.Errorf("failed to collect GPU Engine perf data: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
runningTimeMap := make(map[PidPhysEngEngType]float64)
|
||||||
|
// Iterate over the GPU Engine perf data and aggregate the values.
|
||||||
|
for _, data := range c.gpuEnginePerfDataObject {
|
||||||
|
instance := parseGPUCounterInstanceString(data.Name)
|
||||||
|
|
||||||
|
key := PidPhysEngEngType{
|
||||||
|
Pid: instance.Pid,
|
||||||
|
Phys: instance.Phys,
|
||||||
|
Eng: instance.Eng,
|
||||||
|
Engtype: instance.Engtype,
|
||||||
|
}
|
||||||
|
runningTimeMap[key] += data.RunningTime / 10_000_000 // RunningTime is in 100ns units, convert to seconds.
|
||||||
|
}
|
||||||
|
|
||||||
|
for key, runningTime := range runningTimeMap {
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuEngineRunningTime,
|
||||||
|
prometheus.CounterValue,
|
||||||
|
runningTime,
|
||||||
|
key.Pid, key.Phys, key.Eng, key.Engtype,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) collectGpuAdapterMemoryMetrics(ch chan<- prometheus.Metric) error {
|
||||||
|
// Collect the GPU Adapter Memory perf data.
|
||||||
|
if err := c.gpuAdapterMemoryPerfDataCollector.Collect(&c.gpuAdapterMemoryPerfDataObject); err != nil {
|
||||||
|
return fmt.Errorf("failed to collect GPU Adapter Memory perf data: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
dedicatedUsageMap := make(map[PidPhysEngEngType]float64)
|
||||||
|
sharedUsageMap := make(map[PidPhysEngEngType]float64)
|
||||||
|
totalCommittedMap := make(map[PidPhysEngEngType]float64)
|
||||||
|
|
||||||
|
for _, data := range c.gpuAdapterMemoryPerfDataObject {
|
||||||
|
instance := parseGPUCounterInstanceString(data.Name)
|
||||||
|
|
||||||
|
key := PidPhysEngEngType{
|
||||||
|
Pid: instance.Pid,
|
||||||
|
Phys: instance.Phys,
|
||||||
|
Eng: instance.Eng,
|
||||||
|
Engtype: instance.Engtype,
|
||||||
|
}
|
||||||
|
dedicatedUsageMap[key] += data.DedicatedUsage
|
||||||
|
sharedUsageMap[key] += data.SharedUsage
|
||||||
|
totalCommittedMap[key] += data.TotalCommitted
|
||||||
|
}
|
||||||
|
|
||||||
|
for key, dedicatedUsage := range dedicatedUsageMap {
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuAdapterMemoryDedicatedUsage,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
dedicatedUsage,
|
||||||
|
key.Phys,
|
||||||
|
)
|
||||||
|
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuAdapterMemorySharedUsage,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
sharedUsageMap[key],
|
||||||
|
key.Phys,
|
||||||
|
)
|
||||||
|
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuAdapterMemoryTotalCommitted,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
totalCommittedMap[key],
|
||||||
|
key.Phys,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) collectGpuLocalAdapterMemoryMetrics(ch chan<- prometheus.Metric) error {
|
||||||
|
// Collect the GPU Local Adapter Memory perf data.
|
||||||
|
if err := c.gpuLocalAdapterMemoryPerfDataCollector.Collect(&c.gpuLocalAdapterMemoryPerfDataObject); err != nil {
|
||||||
|
return fmt.Errorf("failed to collect GPU Local Adapter Memory perf data: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
localAdapterMemoryMap := make(map[string]float64)
|
||||||
|
|
||||||
|
for _, data := range c.gpuLocalAdapterMemoryPerfDataObject {
|
||||||
|
instance := parseGPUCounterInstanceString(data.Name)
|
||||||
|
|
||||||
|
localAdapterMemoryMap[instance.Phys] += data.LocalUsage
|
||||||
|
}
|
||||||
|
|
||||||
|
for phys, localUsage := range localAdapterMemoryMap {
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuLocalAdapterMemoryUsage,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
localUsage,
|
||||||
|
phys,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) collectGpuNonLocalAdapterMemoryMetrics(ch chan<- prometheus.Metric) error {
|
||||||
|
// Collect the GPU Non Local Adapter Memory perf data.
|
||||||
|
if err := c.gpuNonLocalAdapterMemoryPerfDataCollector.Collect(&c.gpuNonLocalAdapterMemoryPerfDataObject); err != nil {
|
||||||
|
return fmt.Errorf("failed to collect GPU Non Local Adapter Memory perf data: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
nonLocalAdapterMemoryMap := make(map[string]float64)
|
||||||
|
|
||||||
|
for _, data := range c.gpuNonLocalAdapterMemoryPerfDataObject {
|
||||||
|
instance := parseGPUCounterInstanceString(data.Name)
|
||||||
|
|
||||||
|
nonLocalAdapterMemoryMap[instance.Phys] += data.NonLocalUsage
|
||||||
|
}
|
||||||
|
|
||||||
|
for phys, nonLocalUsage := range nonLocalAdapterMemoryMap {
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuNonLocalAdapterMemoryUsage,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
nonLocalUsage,
|
||||||
|
phys,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Collector) collectGpuProcessMemoryMetrics(ch chan<- prometheus.Metric) error {
|
||||||
|
// Collect the GPU Process Memory perf data.
|
||||||
|
if err := c.gpuProcessMemoryPerfDataCollector.Collect(&c.gpuProcessMemoryPerfDataObject); err != nil {
|
||||||
|
return fmt.Errorf("failed to collect GPU Process Memory perf data: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
processDedicatedUsageMap := make(map[PidPhys]float64)
|
||||||
|
processLocalUsageMap := make(map[PidPhys]float64)
|
||||||
|
processNonLocalUsageMap := make(map[PidPhys]float64)
|
||||||
|
processSharedUsageMap := make(map[PidPhys]float64)
|
||||||
|
processTotalCommittedMap := make(map[PidPhys]float64)
|
||||||
|
|
||||||
|
for _, data := range c.gpuProcessMemoryPerfDataObject {
|
||||||
|
instance := parseGPUCounterInstanceString(data.Name)
|
||||||
|
|
||||||
|
key := PidPhys{
|
||||||
|
Pid: instance.Pid,
|
||||||
|
Phys: instance.Phys,
|
||||||
|
}
|
||||||
|
processDedicatedUsageMap[key] += data.DedicatedUsage
|
||||||
|
processLocalUsageMap[key] += data.LocalUsage
|
||||||
|
processNonLocalUsageMap[key] += data.NonLocalUsage
|
||||||
|
processSharedUsageMap[key] += data.SharedUsage
|
||||||
|
processTotalCommittedMap[key] += data.TotalCommitted
|
||||||
|
}
|
||||||
|
|
||||||
|
for key, dedicatedUsage := range processDedicatedUsageMap {
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuProcessMemoryDedicatedUsage,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
dedicatedUsage,
|
||||||
|
key.Pid, key.Phys,
|
||||||
|
)
|
||||||
|
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuProcessMemoryLocalUsage,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
processLocalUsageMap[key],
|
||||||
|
key.Pid, key.Phys,
|
||||||
|
)
|
||||||
|
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuProcessMemoryNonLocalUsage,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
processNonLocalUsageMap[key],
|
||||||
|
key.Pid, key.Phys,
|
||||||
|
)
|
||||||
|
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuProcessMemorySharedUsage,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
processSharedUsageMap[key],
|
||||||
|
key.Pid, key.Phys,
|
||||||
|
)
|
||||||
|
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.gpuProcessMemoryTotalCommitted,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
processTotalCommittedMap[key],
|
||||||
|
key.Pid, key.Phys,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -15,19 +15,19 @@
|
|||||||
|
|
||||||
//go:build windows
|
//go:build windows
|
||||||
|
|
||||||
package cs_test
|
package gpu_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/prometheus-community/windows_exporter/internal/collector/cs"
|
"github.com/prometheus-community/windows_exporter/internal/collector/gpu"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/utils/testutils"
|
"github.com/prometheus-community/windows_exporter/internal/utils/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BenchmarkCollector(b *testing.B) {
|
func BenchmarkCollector(b *testing.B) {
|
||||||
testutils.FuncBenchmarkCollector(b, cs.Name, cs.NewWithFlags)
|
testutils.FuncBenchmarkCollector(b, gpu.Name, gpu.NewWithFlags)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCollector(t *testing.T) {
|
func TestCollector(t *testing.T) {
|
||||||
testutils.TestCollector(t, cs.New, nil)
|
testutils.TestCollector(t, gpu.New, nil)
|
||||||
}
|
}
|
||||||
55
internal/collector/gpu/types.go
Normal file
55
internal/collector/gpu/types.go
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
// Copyright The Prometheus Authors
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
//go:build windows
|
||||||
|
|
||||||
|
package gpu
|
||||||
|
|
||||||
|
type gpuEnginePerfDataCounterValues struct {
|
||||||
|
Name string
|
||||||
|
|
||||||
|
RunningTime float64 `perfdata:"Running Time"`
|
||||||
|
UtilizationPercentage float64 `perfdata:"Utilization Percentage"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type gpuAdapterMemoryPerfDataCounterValues struct {
|
||||||
|
Name string
|
||||||
|
|
||||||
|
DedicatedUsage float64 `perfdata:"Dedicated Usage"`
|
||||||
|
SharedUsage float64 `perfdata:"Shared Usage"`
|
||||||
|
TotalCommitted float64 `perfdata:"Total Committed"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type gpuLocalAdapterMemoryPerfDataCounterValues struct {
|
||||||
|
Name string
|
||||||
|
|
||||||
|
LocalUsage float64 `perfdata:"Local Usage"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type gpuNonLocalAdapterMemoryPerfDataCounterValues struct {
|
||||||
|
Name string
|
||||||
|
|
||||||
|
NonLocalUsage float64 `perfdata:"Non Local Usage"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type gpuProcessMemoryPerfDataCounterValues struct {
|
||||||
|
Name string
|
||||||
|
|
||||||
|
DedicatedUsage float64 `perfdata:"Dedicated Usage"`
|
||||||
|
LocalUsage float64 `perfdata:"Local Usage"`
|
||||||
|
NonLocalUsage float64 `perfdata:"Non Local Usage"`
|
||||||
|
SharedUsage float64 `perfdata:"Shared Usage"`
|
||||||
|
TotalCommitted float64 `perfdata:"Total Committed"`
|
||||||
|
}
|
||||||
84
internal/collector/gpu/utils.go
Normal file
84
internal/collector/gpu/utils.go
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
// Copyright The Prometheus Authors
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
//go:build windows
|
||||||
|
|
||||||
|
package gpu
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Instance struct {
|
||||||
|
Pid string
|
||||||
|
Luid [2]string
|
||||||
|
Phys string
|
||||||
|
Eng string
|
||||||
|
Engtype string
|
||||||
|
Part string
|
||||||
|
}
|
||||||
|
|
||||||
|
type PidPhys struct {
|
||||||
|
Pid string
|
||||||
|
Phys string
|
||||||
|
}
|
||||||
|
|
||||||
|
type PidPhysEngEngType struct {
|
||||||
|
Pid string
|
||||||
|
Phys string
|
||||||
|
Eng string
|
||||||
|
Engtype string
|
||||||
|
}
|
||||||
|
|
||||||
|
func parseGPUCounterInstanceString(s string) Instance {
|
||||||
|
// Example: "pid_1234_luid_0x00000000_0x00005678_phys_0_eng_0_engtype_3D"
|
||||||
|
// Example: "luid_0x00000000_0x00005678_phys_0"
|
||||||
|
// Example: "luid_0x00000000_0x00005678_phys_0_part_0"
|
||||||
|
parts := strings.Split(s, "_")
|
||||||
|
|
||||||
|
var instance Instance
|
||||||
|
|
||||||
|
for i, part := range parts {
|
||||||
|
switch part {
|
||||||
|
case "pid":
|
||||||
|
if i+1 < len(parts) {
|
||||||
|
instance.Pid = parts[i+1]
|
||||||
|
}
|
||||||
|
case "luid":
|
||||||
|
if i+2 < len(parts) {
|
||||||
|
instance.Luid[0] = parts[i+1]
|
||||||
|
instance.Luid[1] = parts[i+2]
|
||||||
|
}
|
||||||
|
case "phys":
|
||||||
|
if i+1 < len(parts) {
|
||||||
|
instance.Phys = parts[i+1]
|
||||||
|
}
|
||||||
|
case "eng":
|
||||||
|
if i+1 < len(parts) {
|
||||||
|
instance.Eng = parts[i+1]
|
||||||
|
}
|
||||||
|
case "engtype":
|
||||||
|
if i+1 < len(parts) {
|
||||||
|
instance.Engtype = parts[i+1]
|
||||||
|
}
|
||||||
|
case "part":
|
||||||
|
if i+1 < len(parts) {
|
||||||
|
instance.Part = parts[i+1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return instance
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -25,9 +25,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/Microsoft/hcsshim/osversion"
|
|
||||||
"github.com/alecthomas/kingpin/v2"
|
"github.com/alecthomas/kingpin/v2"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/mi"
|
"github.com/prometheus-community/windows_exporter/internal/mi"
|
||||||
|
"github.com/prometheus-community/windows_exporter/internal/osversion"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
CollectorsEnabled []string `yaml:"collectors_enabled"`
|
CollectorsEnabled []string `yaml:"enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint:gochecknoglobals
|
//nolint:gochecknoglobals
|
||||||
@@ -78,11 +78,6 @@ var ConfigDefaults = Config{
|
|||||||
|
|
||||||
// Collector is a Prometheus Collector for hyper-v.
|
// Collector is a Prometheus Collector for hyper-v.
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
config Config
|
|
||||||
|
|
||||||
collectorFns []func(ch chan<- prometheus.Metric) error
|
|
||||||
closeFns []func()
|
|
||||||
|
|
||||||
collectorDataStore
|
collectorDataStore
|
||||||
collectorDynamicMemoryBalancer
|
collectorDynamicMemoryBalancer
|
||||||
collectorDynamicMemoryVM
|
collectorDynamicMemoryVM
|
||||||
@@ -98,6 +93,11 @@ type Collector struct {
|
|||||||
collectorVirtualSMB
|
collectorVirtualSMB
|
||||||
collectorVirtualStorageDevice
|
collectorVirtualStorageDevice
|
||||||
collectorVirtualSwitch
|
collectorVirtualSwitch
|
||||||
|
|
||||||
|
config Config
|
||||||
|
|
||||||
|
collectorFns []func(ch chan<- prometheus.Metric) error
|
||||||
|
closeFns []func()
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(config *Config) *Collector {
|
func New(config *Config) *Collector {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -20,7 +20,7 @@ package hyperv
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/Microsoft/hcsshim/osversion"
|
"github.com/prometheus-community/windows_exporter/internal/osversion"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/pdh"
|
"github.com/prometheus-community/windows_exporter/internal/pdh"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/types"
|
"github.com/prometheus-community/windows_exporter/internal/types"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/utils"
|
"github.com/prometheus-community/windows_exporter/internal/utils"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -20,7 +20,7 @@ package hyperv
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/Microsoft/hcsshim/osversion"
|
"github.com/prometheus-community/windows_exporter/internal/osversion"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/pdh"
|
"github.com/prometheus-community/windows_exporter/internal/pdh"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/types"
|
"github.com/prometheus-community/windows_exporter/internal/types"
|
||||||
"github.com/prometheus-community/windows_exporter/internal/utils"
|
"github.com/prometheus-community/windows_exporter/internal/utils"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
@@ -310,26 +310,31 @@ func (c *Collector) collectHypervisorRootPartition(ch chan<- prometheus.Metric)
|
|||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartition2MDevicePages,
|
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartition2MDevicePages,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.hypervisorRootPartition2MGPAPages,
|
c.hypervisorRootPartition2MGPAPages,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartition2MGPAPages,
|
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartition2MGPAPages,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.hypervisorRootPartition4KDevicePages,
|
c.hypervisorRootPartition4KDevicePages,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartition4KDevicePages,
|
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartition4KDevicePages,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.hypervisorRootPartition4KGPAPages,
|
c.hypervisorRootPartition4KGPAPages,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartition4KGPAPages,
|
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartition4KGPAPages,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.hypervisorRootPartitionVirtualTLBFlushEntries,
|
c.hypervisorRootPartitionVirtualTLBFlushEntries,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartitionVirtualTLBFlushEntries,
|
c.perfDataObjectHypervisorRootPartition[0].HypervisorRootPartitionVirtualTLBFlushEntries,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.hypervisorRootPartitionVirtualTLBPages,
|
c.hypervisorRootPartitionVirtualTLBPages,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Copyright 2025 The Prometheus Authors
|
// Copyright The Prometheus Authors
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user