nixos/prometheus: add scrape_configs.honor_labels
This commit is contained in:
parent
9e44d34be2
commit
f0334c0336
|
@ -100,6 +100,29 @@ let
|
|||
The HTTP resource path on which to fetch metrics from targets.
|
||||
'';
|
||||
};
|
||||
honor_labels = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Controls how Prometheus handles conflicts between labels
|
||||
that are already present in scraped data and labels that
|
||||
Prometheus would attach server-side ("job" and "instance"
|
||||
labels, manually configured target labels, and labels
|
||||
generated by service discovery implementations).
|
||||
|
||||
If honor_labels is set to "true", label conflicts are
|
||||
resolved by keeping label values from the scraped data and
|
||||
ignoring the conflicting server-side labels.
|
||||
|
||||
If honor_labels is set to "false", label conflicts are
|
||||
resolved by renaming conflicting labels in the scraped data
|
||||
to "exported_<original-label>" (for example
|
||||
"exported_instance", "exported_job") and then attaching
|
||||
server-side labels. This is useful for use cases such as
|
||||
federation, where all labels specified in the target should
|
||||
be preserved.
|
||||
'';
|
||||
};
|
||||
scheme = mkOption {
|
||||
type = types.enum ["http" "https"];
|
||||
default = "http";
|
||||
|
|
Loading…
Reference in New Issue