forked from percona/node_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge prometheus upstream release 1.7.0
BREAKING CHANGE: * following are metric names that have changed (only those previously used in project https://github.com/shatteredsilicon/grafana-dashboards) - node_boot_time -> node_boot_time_seconds - node_context_switches -> node_context_switches_total - node_time -> node_time_seconds - node_forks -> node_forks_total - node_intr -> node_intr_total - node_cpu -> node_cpu_seconds_total - node_disk_bytes_read -> node_disk_read_bytes_total - node_disk_bytes_written -> node_disk_written_bytes_total - node_disk_io_time_ms -> node_disk_io_time_seconds_total * 1000 - node_disk_reads_completed -> node_disk_reads_completed_total - node_disk_reads_merged -> node_disk_reads_merged_total - node_disk_read_time_ms -> node_disk_read_time_seconds_total * 1000 - node_disk_writes_completed -> node_disk_writes_completed_total - node_disk_writes_merged -> node_disk_writes_merged_total - node_disk_write_time_ms -> node_disk_write_time_seconds_total * 1000 - node_filesystem_free -> node_filesystem_free_bytes - node_filesystem_size -> node_filesystem_size_bytes - node_memory_Buffers -> node_memory_Buffers_bytes - node_memory_Cached -> node_memory_Cached_bytes - node_memory_Mapped -> node_memory_Mapped_bytes - node_memory_MemAvailable -> node_memory_MemAvailable_bytes - node_memory_MemFree -> node_memory_MemFree_bytes - node_memory_MemTotal -> node_memory_MemTotal_bytes - node_memory_SwapCached -> node_memory_SwapCached_bytes - node_memory_SwapFree -> node_memory_SwapFree_bytes - node_memory_SwapTotal -> node_memory_SwapTotal_bytes - node_network_receive_bytes -> node_network_receive_bytes_total - node_network_receive_drop -> node_network_receive_drop_total - node_network_receive_errs -> node_network_receive_errs_total - node_network_receive_multicast -> node_network_receive_multicast_total - node_network_receive_packets -> node_network_receive_packets_total - node_network_transmit_bytes -> node_network_transmit_bytes_total - node_network_transmit_drop -> node_network_transmit_drop_total - node_network_transmit_errs -> node_network_transmit_errs_total - node_network_transmit_multicast -> node_network_transmit_multicast_total - node_network_transmit_packets -> node_network_transmit_packets_total
- Loading branch information
Showing
528 changed files
with
38,178 additions
and
6,373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
--- | ||
version: 2.1 | ||
orbs: | ||
prometheus: prometheus/[email protected] | ||
executors: | ||
# Whenever the Go version is updated here, .promu.yml and .promu-cgo.yml | ||
# should also be updated. | ||
golang: | ||
docker: | ||
- image: cimg/go:1.21 | ||
arm: | ||
machine: | ||
image: ubuntu-2204:current | ||
resource_class: arm.medium | ||
|
||
jobs: | ||
test: | ||
executor: golang | ||
steps: | ||
- prometheus/setup_environment | ||
- run: go mod download | ||
- run: make | ||
- prometheus/store_artifact: | ||
file: node_exporter | ||
test-arm: | ||
executor: arm | ||
steps: | ||
- checkout | ||
- run: uname -a | ||
- run: make test-e2e | ||
test_mixins: | ||
executor: golang | ||
steps: | ||
- 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: | ||
image: ubuntu-2204:current | ||
parallelism: 3 | ||
steps: | ||
- prometheus/setup_environment | ||
- run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97 | ||
- 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: | ||
image: ubuntu-2204:current | ||
environment: | ||
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.18-base | ||
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 | ||
workflows: | ||
version: 2 | ||
node_exporter: | ||
jobs: | ||
- test: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test-arm: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- build: | ||
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: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
.tarballs/ | ||
|
||
!.build/linux-amd64 | ||
!.build/linux-armv7 | ||
!.build/linux-arm64 | ||
!.build/linux-ppc64le | ||
!.build/linux-s390x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
# This action is synced from https://github.com/prometheus/prometheus | ||
name: golangci-lint | ||
on: | ||
push: | ||
paths: | ||
- "go.sum" | ||
- "go.mod" | ||
- "**.go" | ||
- "scripts/errcheck_excludes.txt" | ||
- ".github/workflows/golangci-lint.yml" | ||
- ".golangci.yml" | ||
pull_request: | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: install Go | ||
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 | ||
with: | ||
go-version: 1.20.x | ||
- name: Install snmp_exporter/generator dependencies | ||
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev | ||
if: github.repository == 'prometheus/snmp_exporter' | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 | ||
with: | ||
version: v1.54.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
linters: | ||
enable: | ||
- misspell | ||
- 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 | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude-functions: | ||
# Used in HTTP handlers, any error is handled by the server itself. | ||
- (net/http.ResponseWriter).Write | ||
# Never check for logger errors. | ||
- (github.com/go-kit/log.Logger).Log | ||
revive: | ||
rules: | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter | ||
- name: unused-parameter | ||
severity: warning | ||
disabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
go: | ||
# Whenever the Go version is updated here, .circle/config.yml and | ||
# .promu.yml should also be updated. | ||
version: 1.21 | ||
cgo: true | ||
repository: | ||
path: github.com/prometheus/node_exporter | ||
build: | ||
binaries: | ||
- name: node_exporter | ||
flags: -a -tags 'netgo osusergo static_build' | ||
ldflags: | | ||
-X github.com/prometheus/common/version.Version={{.Version}} | ||
-X github.com/prometheus/common/version.Revision={{.Revision}} | ||
-X github.com/prometheus/common/version.Branch={{.Branch}} | ||
-X github.com/prometheus/common/version.BuildUser={{user}}@{{host}} | ||
-X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} | ||
tarball: | ||
files: | ||
- LICENSE | ||
- NOTICE | ||
crossbuild: | ||
platforms: | ||
- darwin/amd64 | ||
- darwin/arm64 | ||
- netbsd/amd64 | ||
- netbsd/386 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
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 | ||
indent-sequences: consistent | ||
key-duplicates: | ||
ignore: | | ||
config/testdata/section_key_dup.bad.yml | ||
line-length: disable | ||
truthy: | ||
check-keys: false |
Oops, something went wrong.