Skip to content

Commit d5077bf

Browse files
authored
Merge pull request #4 from cloudlinux/upgrade-to-latest
CLPRO-2902: Sync node_exporter with upstream All jenkins tests passed, build successfull. https://build.cloudlinux.com/#/build/692f3cb0d18740fa8c88571d No problems found while manual testing
2 parents d28b6fb + 78e8446 commit d5077bf

1,506 files changed

Lines changed: 30899 additions & 382582 deletions

File tree

Some content is hidden

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

.circleci/config.yml

Lines changed: 115 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,139 @@
11
---
22
version: 2.1
3-
43
orbs:
5-
prometheus: prometheus/prometheus@0.4.0
6-
4+
prometheus: prometheus/prometheus@0.17.1
75
executors:
86
# Whenever the Go version is updated here, .promu.yml and .promu-cgo.yml
97
# should also be updated.
108
golang:
119
docker:
12-
- image: circleci/golang:1.14
10+
- image: cimg/go:1.25
11+
arm:
12+
docker:
13+
- image: cimg/go:1.25
14+
resource_class: arm.medium
1315

1416
jobs:
1517
test:
1618
executor: golang
17-
1819
steps:
19-
- prometheus/setup_environment
20-
- run: make
21-
- prometheus/store_artifact:
22-
file: node_exporter
23-
24-
codespell:
25-
docker:
26-
- image: circleci/python
27-
20+
- prometheus/setup_environment
21+
- run: go mod download
22+
- run: make
23+
- prometheus/store_artifact:
24+
file: node_exporter
25+
test-arm:
26+
executor: arm
2827
steps:
29-
- checkout
30-
- run: sudo pip install codespell
31-
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -L uint,packages\',uptodate
32-
28+
- prometheus/setup_environment
29+
- run: uname -a
30+
- run: make test-e2e
31+
test_mixins:
32+
executor: golang
33+
steps:
34+
- checkout
35+
- run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest
36+
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
37+
- run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
38+
- run: make promtool
39+
- run: make -C docs/node-mixin clean
40+
- run: make -C docs/node-mixin jb_install
41+
- run: make -C docs/node-mixin
42+
- run: git diff --exit-code
3343
build:
3444
machine:
35-
image: ubuntu-1604:201903-01
45+
image: ubuntu-2404:current
46+
parallelism: 3
47+
steps:
48+
- prometheus/setup_environment
49+
- run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97
50+
- run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
51+
- 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
3658
59+
if [[ -f "$(pwd)/.build/darwin-amd64/node_exporter" ]]; then
60+
promu codesign "$(pwd)/.build/darwin-amd64/node_exporter"
61+
fi
62+
- persist_to_workspace:
63+
root: .
64+
paths:
65+
- .build
66+
- store_artifacts:
67+
path: .build
68+
destination: /build
69+
test_docker:
70+
machine:
71+
image: ubuntu-2404:current
3772
environment:
38-
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.14-base
73+
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.25-base
3974
REPO_PATH: github.com/prometheus/node_exporter
40-
4175
steps:
42-
- checkout
43-
- run: docker run --privileged linuxkit/binfmt:v0.7
44-
- run: make promu
45-
- run: promu crossbuild
46-
- run: promu --config .promu-cgo.yml crossbuild
47-
- persist_to_workspace:
48-
root: .
49-
paths:
50-
- .build
51-
- store_artifacts:
52-
path: .build
53-
destination: /build
54-
- run:
55-
command: |
56-
if [ -n "$CIRCLE_TAG" ]; then
57-
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
58-
else
59-
make docker
60-
fi
61-
- run: docker images
62-
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
63-
- run:
64-
command: |
65-
if [ -n "$CIRCLE_TAG" ]; then
66-
make test-docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
67-
else
68-
make test-docker
69-
fi
70-
76+
- prometheus/setup_environment
77+
- attach_workspace:
78+
at: .
79+
- run:
80+
command: |
81+
if [ -n "$CIRCLE_TAG" ]; then
82+
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
83+
else
84+
make docker
85+
fi
86+
- run: docker images
87+
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
88+
- run:
89+
command: |
90+
if [ -n "$CIRCLE_TAG" ]; then
91+
make test-docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
92+
else
93+
make test-docker
94+
fi
7195
workflows:
7296
version: 2
7397
node_exporter:
7498
jobs:
75-
- test:
76-
filters:
77-
tags:
78-
only: /.*/
79-
- build:
80-
filters:
81-
tags:
82-
only: /.*/
83-
- codespell:
84-
filters:
85-
tags:
86-
only: /.*/
87-
- prometheus/publish_master:
88-
context: org-context
89-
requires:
90-
- test
91-
- build
92-
filters:
93-
branches:
94-
only: master
95-
- prometheus/publish_release:
96-
context: org-context
97-
requires:
98-
- test
99-
- build
100-
filters:
101-
tags:
102-
only: /^v.*/
103-
branches:
104-
ignore: /.*/
99+
- test:
100+
filters:
101+
tags:
102+
only: /.*/
103+
- test-arm:
104+
filters:
105+
tags:
106+
only: /.*/
107+
- build:
108+
filters:
109+
tags:
110+
only: /.*/
111+
- test_docker:
112+
requires:
113+
- test
114+
- build
115+
filters:
116+
tags:
117+
only: /.*/
118+
- test_mixins:
119+
filters:
120+
tags:
121+
only: /.*/
122+
- prometheus/publish_master:
123+
context: org-context
124+
requires:
125+
- test
126+
- build
127+
filters:
128+
branches:
129+
only: master
130+
- prometheus/publish_release:
131+
context: org-context
132+
requires:
133+
- test
134+
- build
135+
filters:
136+
tags:
137+
only: /^v.*/
138+
branches:
139+
ignore: /.*/

.github/ISSUE_TEMPLATE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
<!--
22
Please note: GitHub issues should only be used for feature requests and
3-
bug reports. For general usage/help/discussions, please refer to one of:
4-
5-
- #prometheus on freenode
6-
- the Prometheus Users list: https://groups.google.com/forum/#!forum/prometheus-users
3+
bug reports. For general discussions, please refer to one of the community channels
4+
described in https://prometheus.io/community/.
75
86
Before filing a bug report, note that running node_exporter in Docker is
97
not recommended, for the reasons detailed in the README:
108
11-
https://github.com/prometheus/node_exporter#using-docker
9+
https://github.com/prometheus/node_exporter#docker
1210
1311
Finally, also note that node_exporter is focused on *NIX kernels, and the
1412
WMI exporter should be used instead on Windows.
@@ -25,6 +23,8 @@
2523
### node_exporter command line flags
2624
<!-- Please list all of the command line flags -->
2725

26+
### node_exporter log output
27+
2828
### Are you running node_exporter in Docker?
2929
<!-- Please note the warning above. -->
3030

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "monthly"

0 commit comments

Comments
 (0)