diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-12-23 17:42:05 +0100 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-12-25 15:38:55 +0100 |
commit | b20fdff5214e760205f7fccbce6848c545f12b0b (patch) | |
tree | 2973b5aef4081e92414566b07c51f077629e483f /nixos/modules/services/monitoring/prometheus | |
parent | 7cd5ef772b891668e220561ff0e00088ae235cd0 (diff) | |
download | nixpkgs-b20fdff5214e760205f7fccbce6848c545f12b0b.tar nixpkgs-b20fdff5214e760205f7fccbce6848c545f12b0b.tar.gz nixpkgs-b20fdff5214e760205f7fccbce6848c545f12b0b.tar.bz2 nixpkgs-b20fdff5214e760205f7fccbce6848c545f12b0b.tar.lz nixpkgs-b20fdff5214e760205f7fccbce6848c545f12b0b.tar.xz nixpkgs-b20fdff5214e760205f7fccbce6848c545f12b0b.tar.zst nixpkgs-b20fdff5214e760205f7fccbce6848c545f12b0b.zip |
nixos/prometheus: make scrapeConfigs.*.static_configs.*.labels optional
...by providing a default value of "no labels" (an empty attrset). Without this change we get $ nixos-rebuild test -I nixpkgs=. building Nix... building the system configuration... error: The option `services.prometheus.scrapeConfigs.[definition 1-entry 1].static_configs.[definition 1-entry 1].labels' is used but not defined. which is unneeded, because labels _are_ optional.
Diffstat (limited to 'nixos/modules/services/monitoring/prometheus')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/default.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/default.nix b/nixos/modules/services/monitoring/prometheus/default.nix index d692dd5fc79..a07445ce167 100644 --- a/nixos/modules/services/monitoring/prometheus/default.nix +++ b/nixos/modules/services/monitoring/prometheus/default.nix @@ -191,6 +191,7 @@ let }; labels = mkOption { type = types.attrsOf types.str; + default = {}; description = '' Labels assigned to all metrics scraped from the targets. ''; |