Skip to content

Commit 65a733e

Browse files
committed
Merge tag 'refs/tags/v1.8.2' into PMM-12116-update-from-upstream
v1.8.2 # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEEoFiTUofnXYMugU5GxkayPJ4yRfEFAmaTvA0ACgkQxkayPJ4y # RfFwLA//Scg51x8eagp8Cfr8jDbd4+cJiaoxPzzLejgRUr3iGXJcLojhPQjYom3V # GbXSzdW3N1+Dy97aJaUFxBDhBoIWq3OO3qJo5oTntaOeCD3CVjTEmV5DXBgMZWyz # V2wvle09fTLeCwXYFpfMgrI/3dkwEmqj5giV71YNMxg4Iy90x8Yx0HKIigBBRBnk # oQoii30bky5qKZ2QN0Nv70ot0OdiupA977KzckC7Ep+uEOkvbjU//bqcxXZ94RBA # 8l+vCkdLX7Rv/Y258zPDiy1FWQds9VpcvabvbL11cS6O0Dx7sv+ijtpdOTXrg+0n # Yd+1inNbz04GANWfxwzCVwccT51OBkKWf7r/fa/Nw8/U8R+zOEtVPz5xB556w0ch # NpMmQPY8hp4KAQpxyaCPjXVmMwOiKXq8m9xJ3XVCzVl2Z5ur9r9kfpGtPz0CkBO5 # DCZh1IBrLuLmN3FgYFTqI2gVzxsKO5GY5Q7N7uUmeN0RRARJZutTHZzDX0AKzfhT # P4uyjR/T0JM5oYQGE1N5uMpsCpm40n78lD2tYHENKKHuP6J6TGB5J9YfKTXojPHt # jG+4JIHDsnPHXDdWv7UYva/6RaLhi3rck+VOL9cc6zrNNDz+6+ATBDO0tlCQFaRa # xGBio0mn9/L50Ov4kFGyrr9HwdUH/xCkqTUOTh7j1syBjaMmViw= # =vEy9 # -----END PGP SIGNATURE----- # gpg: Signature made Sun Jul 14 17:52:45 2024 +06 # gpg: using RSA key A058935287E75D832E814E46C646B23C9E3245F1 # gpg: Can't check signature: No public key # Conflicts: # go.mod # go.sum # node_exporter.go
2 parents f0aecfa + f1e0e83 commit 65a733e

File tree

135 files changed

+4123
-1444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+4123
-1444
lines changed

.circleci/config.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
version: 2.1
33
orbs:
4-
prometheus: prometheus/prometheus@0.16.0
4+
prometheus: prometheus/prometheus@0.17.1
55
executors:
66
# Whenever the Go version is updated here, .promu.yml and .promu-cgo.yml
77
# should also be updated.
88
golang:
99
docker:
10-
- image: cimg/go:1.19
10+
- image: cimg/go:1.22
1111
arm:
1212
machine:
13-
image: ubuntu-2004:current
13+
image: ubuntu-2204:current
1414
resource_class: arm.medium
1515

1616
jobs:
@@ -28,13 +28,6 @@ jobs:
2828
- checkout
2929
- run: uname -a
3030
- run: make test-e2e
31-
codespell:
32-
docker:
33-
- image: circleci/python
34-
steps:
35-
- checkout
36-
- run: sudo pip install codespell
37-
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -I scripts/codespell_ignore.txt
3831
test_mixins:
3932
executor: golang
4033
steps:
@@ -49,13 +42,23 @@ jobs:
4942
- run: git diff --exit-code
5043
build:
5144
machine:
52-
image: ubuntu-2004:202101-01
45+
image: ubuntu-2204:current
5346
parallelism: 3
5447
steps:
5548
- prometheus/setup_environment
56-
- run: docker run --privileged linuxkit/binfmt:v0.8
49+
- run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97
5750
- run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
5851
- run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
52+
# sign the darwin build so it doesn't get SIGKILLed on start, see: https://github.com/prometheus/node_exporter/issues/2539
53+
- run:
54+
command: |
55+
if [[ -f "$(pwd)/.build/darwin-arm64/node_exporter" ]]; then
56+
promu codesign "$(pwd)/.build/darwin-arm64/node_exporter"
57+
fi
58+
59+
if [[ -f "$(pwd)/.build/darwin-amd64/node_exporter" ]]; then
60+
promu codesign "$(pwd)/.build/darwin-amd64/node_exporter"
61+
fi
5962
- persist_to_workspace:
6063
root: .
6164
paths:
@@ -65,9 +68,9 @@ jobs:
6568
destination: /build
6669
test_docker:
6770
machine:
68-
image: ubuntu-2204:2022.04.2
71+
image: ubuntu-2204:current
6972
environment:
70-
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.18-base
73+
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.22-base
7174
REPO_PATH: github.com/prometheus/node_exporter
7275
steps:
7376
- prometheus/setup_environment
@@ -105,10 +108,6 @@ workflows:
105108
filters:
106109
tags:
107110
only: /.*/
108-
- codespell:
109-
filters:
110-
tags:
111-
only: /.*/
112111
- test_docker:
113112
requires:
114113
- test

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Before filing a bug report, note that running node_exporter in Docker is
77
not recommended, for the reasons detailed in the README:
88
9-
https://github.com/prometheus/node_exporter#using-docker
9+
https://github.com/prometheus/node_exporter#docker
1010
1111
Finally, also note that node_exporter is focused on *NIX kernels, and the
1212
WMI exporter should be used instead on Windows.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: Push README to Docker Hub
3+
on:
4+
push:
5+
paths:
6+
- "README.md"
7+
- ".github/workflows/container_description.yml"
8+
branches: [ main, master ]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
PushDockerHubReadme:
15+
runs-on: ubuntu-latest
16+
name: Push README to Docker Hub
17+
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
18+
steps:
19+
- name: git checkout
20+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
21+
- name: Set docker hub repo name
22+
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
23+
- name: Push README to Dockerhub
24+
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
25+
env:
26+
DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }}
27+
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
28+
with:
29+
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
30+
provider: dockerhub
31+
short_description: ${{ env.DOCKER_REPO_NAME }}
32+
readme_file: 'README.md'
33+
34+
PushQuayIoReadme:
35+
runs-on: ubuntu-latest
36+
name: Push README to quay.io
37+
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
38+
steps:
39+
- name: git checkout
40+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
41+
- name: Set quay.io org name
42+
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
43+
- name: Set quay.io repo name
44+
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
45+
- name: Push README to quay.io
46+
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
47+
env:
48+
DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }}
49+
with:
50+
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
51+
provider: quay
52+
readme_file: 'README.md'
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
# This action is synced from https://github.com/prometheus/prometheus
13
name: golangci-lint
24
on:
35
push:
@@ -10,21 +12,27 @@ on:
1012
- ".golangci.yml"
1113
pull_request:
1214

15+
permissions: # added using https://github.com/step-security/secure-repo
16+
contents: read
17+
1318
jobs:
1419
golangci:
20+
permissions:
21+
contents: read # for actions/checkout to fetch code
22+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
1523
name: lint
1624
runs-on: ubuntu-latest
1725
steps:
1826
- name: Checkout repository
19-
uses: actions/checkout@v3
27+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
2028
- name: install Go
21-
uses: actions/setup-go@v2
29+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
2230
with:
23-
go-version: 1.18.x
31+
go-version: 1.22.x
2432
- name: Install snmp_exporter/generator dependencies
2533
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
2634
if: github.repository == 'prometheus/snmp_exporter'
2735
- name: Lint
28-
uses: golangci/golangci-lint-action@v3.2.0
36+
uses: golangci/golangci-lint-action@9d1e0624a798bb64f6c3cea93db47765312263dc # v5.1.0
2937
with:
30-
version: v1.45.2
38+
version: v1.56.2

.golangci.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
linters:
22
enable:
3+
- depguard
4+
- misspell
35
- revive
46
disable:
57
# Disable soon to deprecated[1] linters that lead to false
@@ -18,5 +20,23 @@ issues:
1820
- errcheck
1921

2022
linters-settings:
23+
depguard:
24+
rules:
25+
no_exec_policy:
26+
files:
27+
- "!$test"
28+
deny:
29+
- pkg: "os/exec"
30+
desc: "Using os/exec to run sub processes it not allowed by policy"
2131
errcheck:
22-
exclude: scripts/errcheck_excludes.txt
32+
exclude-functions:
33+
# Used in HTTP handlers, any error is handled by the server itself.
34+
- (net/http.ResponseWriter).Write
35+
# Never check for logger errors.
36+
- (github.com/go-kit/log.Logger).Log
37+
revive:
38+
rules:
39+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
40+
- name: unused-parameter
41+
severity: warning
42+
disabled: true

.promu-cgo.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
go:
22
# Whenever the Go version is updated here, .circle/config.yml and
33
# .promu.yml should also be updated.
4-
version: 1.19
4+
version: 1.22
55
cgo: true
66
repository:
77
path: github.com/prometheus/node_exporter
88
build:
99
binaries:
1010
- name: node_exporter
11-
flags: -a -tags 'netgo osusergo static_build'
1211
ldflags: |
1312
-X github.com/prometheus/common/version.Version={{.Version}}
1413
-X github.com/prometheus/common/version.Revision={{.Revision}}

.promu.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
go:
22
# Whenever the Go version is updated here, .circle/config.yml and
33
# .promu-cgo.yml should also be updated.
4-
version: 1.19
4+
version: 1.22
55
repository:
66
path: github.com/prometheus/node_exporter
77
build:
88
binaries:
99
- name: node_exporter
10-
flags: -a -tags 'netgo osusergo static_build'
1110
ldflags: |
1211
-X github.com/prometheus/common/version.Version={{.Version}}
1312
-X github.com/prometheus/common/version.Revision={{.Revision}}

.yamllint

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
extends: default
3+
ignore: |
4+
ui/react-app/node_modules
35

46
rules:
57
braces:
@@ -20,9 +22,4 @@ rules:
2022
config/testdata/section_key_dup.bad.yml
2123
line-length: disable
2224
truthy:
23-
ignore: |
24-
.github/workflows/codeql-analysis.yml
25-
.github/workflows/funcbench.yml
26-
.github/workflows/fuzzing.yml
27-
.github/workflows/prombench.yml
28-
.github/workflows/golangci-lint.yml
25+
check-keys: false

0 commit comments

Comments
 (0)