-
Notifications
You must be signed in to change notification settings - Fork 811
feat: add node label on elasticsearch_nodes_roles metric #1107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pincher95
wants to merge
22
commits into
prometheus-community:master
Choose a base branch
from
pincher95:feature/add-node-label-to-nodes-roles
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: add node label on elasticsearch_nodes_roles metric #1107
pincher95
wants to merge
22
commits into
prometheus-community:master
from
pincher95:feature/add-node-label-to-nodes-roles
Conversation
This file contains hidden or 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
* Add multi-target support Signed-off-by: pincher95 <[email protected]> * Update example-prometheus.yml Signed-off-by: pincher95 <[email protected]> * Make `es.uri` optional by setting default to empty string check if it's empty and if so, don't parse it Signed-off-by: pincher95 <[email protected]> Signed-off-by: pincher95 <[email protected]> * Update README.md Signed-off-by: pincher95 <[email protected]> * Add sanity target scheme validation Signed-off-by: pincher95 <[email protected]> * Change yaml package to go.yaml.in/yaml/v3 Signed-off-by: pincher95 <[email protected]> * Update yaml package to go.yaml.in/yaml/v3 Signed-off-by: pincher95 <[email protected]> * Update CHANGELOG.md Signed-off-by: pincher95 <[email protected]> * Remove whitespaces from README.md Signed-off-by: pincher95 <[email protected]> * Add testing for apikey authentication module Update examples/auth_modules.yml Fix main.go to apply userpass credentials only if the module type is explicitly set to userpass. Signed-off-by: pincher95 <[email protected]> * Add Load-time validation for the auth module config file during startup Keep light-weight validation for the probe params during runtime Add AWS SigV4 authentication module support Signed-off-by: pincher95 <[email protected]> * Expose error in the logger Signed-off-by: pincher95 <[email protected]> * Add TLS config per target support Add TLS config validation Update config test to include TLS config Signed-off-by: pincher95 <[email protected]> * Indices and Shards collectors now fetch cluster_name once from GET / when no clusterinfo retriever is attached, avoiding the previous "unknown_cluster" label. Signed-off-by: pincher95 <[email protected]> * Removed the special-case logic that redirected /metrics?target= requests to /probe. Updated auth_modules.yml to include AWS SigV4 signing and mTLS support. Signed-off-by: pincher95 <[email protected]> * Add license headers to all new files Signed-off-by: pincher95 <[email protected]> * Fixes for relative paths in multi-target mode Signed-off-by: pincher95 <[email protected]> * Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.0 (prometheus-community#1065) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.22.0 to 1.23.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.22.0...v1.23.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-version: 1.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]> * Add target schema validation, http/https only Add tls auth type support in multi-target mode Update README.md, examples/auth_modules.yml, tests Signed-off-by: pincher95 <[email protected]> * Cleanup Signed-off-by: pincher95 <[email protected]> * Fix tls auth type validation Signed-off-by: pincher95 <[email protected]> * Remove aws.region validation Signed-off-by: pincher95 <[email protected]> * Add temp file cleanup in config_test.go Signed-off-by: pincher95 <[email protected]> * Add copyright header to config_test.go Signed-off-by: pincher95 <[email protected]> * Add version metric to the per-probe registry Update roundtripper.go to use region from config or environment resolver if not provided in config file (AWS_REGION) Update probe.go to accept module even if region omitted; environment resolver can provide it Update config.go to use region as optional field Update main.go to use region from config or environment resolver if not provided in config file (AWS_REGION) and update roundtripper.go to use region from config or environment resolver if not provided in config file (AWS_REGION) Signed-off-by: pincher95 <[email protected]> --------- Signed-off-by: pincher95 <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Yuri Tsuprun <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]>
- Add 'node' (node ID) label to elasticsearch_nodes_roles metric - Node ID comes from the map key in nodes stats response (no extra API calls) - Update tests for ES versions 5.6.16, 6.8.8, and 7.13.1 Signed-off-by: pincher95 <[email protected]>
- Add 'node' (node ID) label to elasticsearch_nodes_roles metric - Node ID comes from the map key in nodes stats response (no extra API calls) - Update tests for ES versions 5.6.16, 6.8.8, and 7.13.1 Signed-off-by: pincher95 <[email protected]>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.4.0 to 6.0.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@0aaccfd...4469467) --- updated-dependencies: - dependency-name: actions/setup-go dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]>
Bumps the aws group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.37.2 to 1.39.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](aws/aws-sdk-go-v2@v1.37.2...v1.39.2) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.30.3 to 1.31.12 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](aws/aws-sdk-go-v2@v1.30.3...config/v1.31.12) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.18.3 to 1.18.16 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](aws/aws-sdk-go-v2@config/v1.18.3...config/v1.18.16) Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.36.0 to 1.38.6 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](aws/aws-sdk-go-v2@v1.36.0...service/sts/v1.38.6) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-version: 1.39.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-version: 1.31.12 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-version: 1.18.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-version: 1.38.6 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@11bd719...08c6903) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]>
…theus-community#1084) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.23.0 to 1.23.2. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.23.0...v1.23.2) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-version: 1.23.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]>
The error itself already has the sanitized URL so there is no need to log the sensitive input string. Signed-off-by: Joe Adams <[email protected]> Signed-off-by: pincher95 <[email protected]>
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.14.0 to 0.14.1. - [Release notes](https://github.com/prometheus/exporter-toolkit/releases) - [Commits](prometheus/exporter-toolkit@v0.14.0...v0.14.1) --- updated-dependencies: - dependency-name: github.com/prometheus/exporter-toolkit dependency-version: 0.14.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: pincher95 <[email protected]>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.65.0 to 0.66.1. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](prometheus/common@v0.65.0...v0.66.1) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.66.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: pincher95 <[email protected]>
* Update minimum Go version to 1.24.0. * Update build to Go 1.25. * Cleanup disabled CircleCI pipeline. Signed-off-by: SuperQ <[email protected]> Signed-off-by: pincher95 <[email protected]>
* Fix mixed value types for disk watermark The disk watermark values can be a ratio or percentage according to the docs[1], however when set to a percentage, the defaults become an object and therefore fails to parse. In that case, we really only care about what the user set. Adds a test to confirm a fix for prometheus-community#1044. Fixes prometheus-community#1044 [1] https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings#disk-based-shard-allocation Signed-off-by: Joe Adams <[email protected]> * Add missing test fixture Signed-off-by: Joe Adams <[email protected]> --------- Signed-off-by: Joe Adams <[email protected]> Signed-off-by: pincher95 <[email protected]>
Signed-off-by: prombot <[email protected]> Signed-off-by: pincher95 <[email protected]>
Avoid logging collector failures at Error level to avoid log spam. Signed-off-by: SuperQ <[email protected]> Signed-off-by: pincher95 <[email protected]>
…ommunity#1091) Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.67.1 to 0.67.2. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](prometheus/common@v0.67.1...v0.67.2) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.67.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]>
Bumps the aws group with 4 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.39.2 to 1.39.5 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](aws/aws-sdk-go-v2@v1.39.2...v1.39.5) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.31.12 to 1.31.16 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](aws/aws-sdk-go-v2@config/v1.31.12...config/v1.31.16) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.18.16 to 1.18.20 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/config/v1.18.20/CHANGELOG.md) - [Commits](aws/aws-sdk-go-v2@config/v1.18.16...config/v1.18.20) Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.38.6 to 1.39.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](aws/aws-sdk-go-v2@service/sts/v1.38.6...v1.39.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-version: 1.39.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-version: 1.31.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-version: 1.18.20 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-version: 1.39.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]>
…mmunity#1042) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 7.0.0 to 8.0.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@1481404...4afd733) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: pincher95 <[email protected]>
Signed-off-by: prombot <[email protected]> Signed-off-by: pincher95 <[email protected]>
Signed-off-by: Joe Adams <[email protected]> Signed-off-by: pincher95 <[email protected]>
Move the metrics list to a separate markdown file to reduce the README size below the 25k bytes limit of Dockerhub. Signed-off-by: SuperQ <[email protected]> Signed-off-by: pincher95 <[email protected]>
- Add 'node' (node ID) label to elasticsearch_nodes_roles metric - Node ID comes from the map key in nodes stats response (no extra API calls) - Update tests for ES versions 5.6.16, 6.8.8, and 7.13.1 Signed-off-by: pincher95 <[email protected]>
Contributor
Author
|
resolve #1105 |
Contributor
|
This PR description seems to be inaccurate. Please update the description with the accurate description of the intent of this PR. |
Contributor
Author
|
@sysadmind updated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the
elasticsearch_nodes_rolesmetric to include the node ID as a new label, improving the uniqueness and traceability of reported node roles. The change modifies both the metric collection logic and the related tests to ensure the new label is present and validated.Enhancements to Node Role Metrics:
node(node ID) label to theelasticsearch_nodes_rolesmetric definition, making each metric instance uniquely identifiable by node ID in addition to cluster, host, and name.collector/nodes.goto iterate over node IDs and include the node ID as a label value when emitting node role metrics. [1] [2]Test Updates:
collector/nodes_test.goto require the newnodelabel in allelasticsearch_nodes_rolesmetric assertions, ensuring tests validate the updated metric format. [1] [2] [3]