Skip to content

Commit

Permalink
Merge pull request #100 from arajkumar/rebase-1.3.1
Browse files Browse the repository at this point in the history
Bump node_exporter to v1.3.1
  • Loading branch information
openshift-merge-robot committed Dec 16, 2021
2 parents 48647cc + 16a3130 commit 0eed310
Show file tree
Hide file tree
Showing 356 changed files with 16,646 additions and 10,470 deletions.
187 changes: 90 additions & 97 deletions .circleci/config.yml
Expand Up @@ -9,47 +9,40 @@ executors:
# should also be updated.
golang:
docker:
- image: circleci/golang:1.16
- image: circleci/golang:1.17

jobs:
test:
executor: golang

steps:
- prometheus/setup_environment
- run: go mod download
- run: make
- prometheus/store_artifact:
file: node_exporter
- prometheus/setup_environment
- run: go mod download
- run: make
- prometheus/store_artifact:
file: node_exporter

codespell:
docker:
- image: circleci/python
- image: circleci/python

steps:
- checkout
- run: sudo pip install codespell
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -L uint,packages\',uptodate
- checkout
- run: sudo pip install codespell
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -L uint,packages\',uptodate

test_mixins:
executor: golang
steps:
- checkout
- run:
command: go install -mod=readonly github.com/google/go-jsonnet/cmd/jsonnet github.com/google/go-jsonnet/cmd/jsonnetfmt github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb github.com/prometheus/prometheus/cmd/promtool
working_directory: ~/project/docs/node-mixin
- run:
command: make clean
working_directory: ~/project/docs/node-mixin
- run:
command: jb install
working_directory: ~/project/docs/node-mixin
- run:
command: make
working_directory: ~/project/docs/node-mixin
- run:
command: git diff --exit-code
working_directory: ~/project/docs/node-mixin
- checkout
- run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
- run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
- run: make promtool
- run: make -C docs/node-mixin clean
- run: make -C docs/node-mixin jb_install
- run: make -C docs/node-mixin
- run: git diff --exit-code

build:
machine:
Expand All @@ -58,17 +51,17 @@ jobs:
parallelism: 3

steps:
- prometheus/setup_environment
- run: docker run --privileged linuxkit/binfmt:v0.8
- run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- persist_to_workspace:
root: .
paths:
- .build
- store_artifacts:
path: .build
destination: /build
- prometheus/setup_environment
- run: docker run --privileged linuxkit/binfmt:v0.8
- run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- persist_to_workspace:
root: .
paths:
- .build
- store_artifacts:
path: .build
destination: /build

test_docker:
machine:
Expand All @@ -79,68 +72,68 @@ jobs:
REPO_PATH: github.com/prometheus/node_exporter

steps:
- prometheus/setup_environment
- attach_workspace:
at: .
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker
fi
- run: docker images
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make test-docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make test-docker
fi
- prometheus/setup_environment
- attach_workspace:
at: .
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker
fi
- run: docker images
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make test-docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make test-docker
fi
workflows:
version: 2
node_exporter:
jobs:
- test:
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
- codespell:
filters:
tags:
only: /.*/
- test_docker:
requires:
- test
- build
filters:
tags:
only: /.*/
- test_mixins:
filters:
tags:
only: /.*/
- prometheus/publish_master:
context: org-context
requires:
- test
- build
filters:
branches:
only: master
- prometheus/publish_release:
context: org-context
requires:
- test
- build
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- test:
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
- codespell:
filters:
tags:
only: /.*/
- test_docker:
requires:
- test
- build
filters:
tags:
only: /.*/
- test_mixins:
filters:
tags:
only: /.*/
- prometheus/publish_master:
context: org-context
requires:
- test
- build
filters:
branches:
only: master
- prometheus/publish_release:
context: org-context
requires:
- test
- build
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
31 changes: 31 additions & 0 deletions .github/workflows/golangci-lint.yml
@@ -0,0 +1,31 @@
name: golangci-lint
on:
push:
paths:
- "go.sum"
- "go.mod"
- "**.go"
- "scripts/errcheck_excludes.txt"
- ".github/workflows/golangci-lint.yml"
- ".golangci.yml"
pull_request:
paths:
- "go.sum"
- "go.mod"
- "**.go"
- "scripts/errcheck_excludes.txt"
- ".github/workflows/golangci-lint.yml"
- ".golangci.yml"

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.0
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -35,4 +35,4 @@ dependencies-stamp
# Test files extracted from ttar
collector/fixtures/sys/

/vendor
# /vendor
17 changes: 13 additions & 4 deletions .golangci.yml
@@ -1,12 +1,21 @@
linters:
enable:
- golint
- revive
disable:
# Disable soon to deprecated[1] linters that lead to false
# positives when build tags disable certain files[2]
# 1: https://github.com/golangci/golangci-lint/issues/1841
# 2: https://github.com/prometheus/node_exporter/issues/1545
- deadcode
- unused
- structcheck
- varcheck

issues:
exclude-rules:
- path: _test.go
linters:
- errcheck
- path: _test.go
linters:
- errcheck

linters-settings:
errcheck:
Expand Down
2 changes: 1 addition & 1 deletion .promu-cgo.yml
@@ -1,7 +1,7 @@
go:
# Whenever the Go version is updated here, .circle/config.yml and
# .promu.yml should also be updated.
version: 1.16
version: 1.17
cgo: true
repository:
path: github.com/prometheus/node_exporter
Expand Down
2 changes: 1 addition & 1 deletion .promu.yml
@@ -1,7 +1,7 @@
go:
# Whenever the Go version is updated here, .circle/config.yml and
# .promu-cgo.yml should also be updated.
version: 1.16
version: 1.17
repository:
path: github.com/prometheus/node_exporter
build:
Expand Down
27 changes: 27 additions & 0 deletions .yamllint
@@ -0,0 +1,27 @@
---
extends: default

rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
commas: disable
comments: disable
comments-indentation: disable
document-start: disable
indentation:
spaces: consistent
key-duplicates:
ignore: |
config/testdata/section_key_dup.bad.yml
line-length: disable
truthy:
ignore: |
.github/workflows/codeql-analysis.yml
.github/workflows/funcbench.yml
.github/workflows/fuzzing.yml
.github/workflows/prombench.yml
.github/workflows/golangci-lint.yml
38 changes: 38 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,44 @@
* [ENHANCEMENT]
* [BUGFIX]

* [ENHANCEMENT] Add node_softirqs_total metric #2221

## 1.3.1 / 2021-12-01

* [BUGFIX] Handle nil CPU thermal power status on M1 #2218
* [BUGFIX] bsd: Ignore filesystems flagged as MNT_IGNORE. #2227
* [BUGFIX] Sanitize UTF-8 in dmi collector #2229

## 1.3.0 / 2021-10-20

NOTE: In order to support globs in the textfile collector path, filenames exposed by
`node_textfile_mtime_seconds` now contain the full path name.

* [CHANGE] Add path label to rapl collector #2146
* [CHANGE] Exclude filesystems under /run/credentials #2157
* [CHANGE] Add TCPTimeouts to netstat default filter #2189
* [FEATURE] Add lnstat collector for metrics from /proc/net/stat/ #1771
* [FEATURE] Add darwin powersupply collector #1777
* [FEATURE] Add support for monitoring GPUs on Linux #1998
* [FEATURE] Add Darwin thermal collector #2032
* [FEATURE] Add os release collector #2094
* [FEATURE] Add netdev.address-info collector #2105
* [FEATURE] Add clocksource metrics to time collector #2197
* [ENHANCEMENT] Support glob textfile collector directories #1985
* [ENHANCEMENT] ethtool: Expose node_ethtool_info metric #2080
* [ENHANCEMENT] Use include/exclude flags for ethtool filtering #2165
* [ENHANCEMENT] Add flag to disable guest CPU metrics #2123
* [ENHANCEMENT] Add DMI collector #2131
* [ENHANCEMENT] Add threads metrics to processes collector #2164
* [ENHANCMMENT] Reduce timer GC delays in the Linux filesystem collector #2169
* [ENHANCMMENT] Add TCPTimeouts to netstat default filter #2189
* [ENHANCMMENT] Use SysctlTimeval for boottime collector on BSD #2208
* [BUGFIX] ethtool: Sanitize metric names #2093
* [BUGFIX] Fix ethtool collector for multiple interfaces #2126
* [BUGFIX] Fix possible panic on macOS #2133
* [BUGFIX] Collect flag_info and bug_info only for one core #2156
* [BUGFIX] Prevent duplicate ethtool metric names #2187

## 1.2.2 / 2021-08-06

* [BUGFIX] Fix processes collector long int parsing #2112
Expand Down

0 comments on commit 0eed310

Please sign in to comment.