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 multi-metric support to promdump
Completed and (mostly) polished support for collecting multiple metrics. The utility now supports collecting a known set of Yugabyte metrics (master_export, node_export, tserver_export, cql_export (not a typo), and ysql_export), a specific custom metric, or both. If only --node_prefix is specified, Yugabyte metrics will be collected using the default export name for each metric (i.e. what is specified in export_type in the PromQL query). If --metric is specified but --node_prefix is not, only the specified metric will be collected. If both --node_prefix and --metric are specified, both the Yugabyte metrics and the specified custom metric will be collected. Individual Yugabyte metrics can be enabled or disabled using the corresponding flags. These flags are enabled by default when node_prefix is specified and disabled by default when it is not. The flag list is generated dynamically based on the collector configuration specified in the var() section of the code. New export collectors utilizing metrics of the same format (i.e. {export_type="...",node_prefix="..."}) can be added with no additional code required. The check for existing export files now happens before we attempt to export any metrics. Replaced detailed debug logging for handling of yugabyte metrics collection config with a summary. Added a check that forbids use of reserved export names as --out parameters for custom metrics. Changed the behaviour of individual metric export failures to report an error, then continue with the next metric. Fixed a bug where we were unconditionally trying to export a custom metric even if no custom metric was specified.
- Loading branch information
1 parent
0660cb2
commit baa876f
Showing
1 changed file
with
68 additions
and
25 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