forked from knyar/prometheus-remote-backfill
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
promdump: Add --node_prefix validation and make this flag optional wh…
…en --instances is specified Implements yugabyte/yb-tools#93. Previously, the --node_prefix flag was still required even when specifying a --instances flag. This commit adds logic to relax this requirement when it is safe to do so. This commit also adds some basic validation for the --node_prefix flag and an override flag --node_prefix_validation to disable the validation if necessary. This validation should reduce the number of issues where customers specify an incorrect node prefix and only the platform metrics are collected. Inverted the logic of the ambiguously named "isDefault" boolean in the promExport struct and changed its name to "changedFromDefault" to better reflect its purpose. This boolean flags any metrics that have been manually toggled by the user, so that the "collect" boolean isn't overridden by code that contextually flips metrics collectors on or off. Added a condition to omit the node_prefix PromQL selector if the user has specified --instances instead. Cleaned up several stale comments.
- Loading branch information
1 parent
ee8d6f0
commit e93e806
Showing
1 changed file
with
53 additions
and
33 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