about summary refs log tree commit diff
path: root/nixos/modules/services/monitoring/prometheus/default.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-01-16 14:01:05 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2019-01-16 14:01:43 +0100
commit003132c2dd95110a30fc7b28dc71d77ca11d6298 (patch)
treefadc1b766d2a910780230e64b77d878854c070ed /nixos/modules/services/monitoring/prometheus/default.nix
parent3956a8421f2d78bc66ad9d3c23a3b5510bc695be (diff)
downloadnixlib-003132c2dd95110a30fc7b28dc71d77ca11d6298.tar
nixlib-003132c2dd95110a30fc7b28dc71d77ca11d6298.tar.gz
nixlib-003132c2dd95110a30fc7b28dc71d77ca11d6298.tar.bz2
nixlib-003132c2dd95110a30fc7b28dc71d77ca11d6298.tar.lz
nixlib-003132c2dd95110a30fc7b28dc71d77ca11d6298.tar.xz
nixlib-003132c2dd95110a30fc7b28dc71d77ca11d6298.tar.zst
nixlib-003132c2dd95110a30fc7b28dc71d77ca11d6298.zip
nixos/prometheus: make `source_labels` optional
It's possible to skip `source_labels` entirely, an example for this is
the blackbox exporter configuration:

https://github.com/prometheus/blackbox_exporter#prometheus-configuration
Diffstat (limited to 'nixos/modules/services/monitoring/prometheus/default.nix')
-rw-r--r--nixos/modules/services/monitoring/prometheus/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/default.nix b/nixos/modules/services/monitoring/prometheus/default.nix
index bf4dfc666bb6..1b1503ab5fc0 100644
--- a/nixos/modules/services/monitoring/prometheus/default.nix
+++ b/nixos/modules/services/monitoring/prometheus/default.nix
@@ -325,7 +325,8 @@ let
   promTypes.relabel_config = types.submodule {
     options = {
       source_labels = mkOption {
-        type = types.listOf types.str;
+        type = with types; nullOr (listOf str);
+        default = null;
         description = ''
           The source labels select values from existing labels. Their content
           is concatenated using the configured separator and matched against