From 244c70313b1445f49c56686163986e718b5c6f91 Mon Sep 17 00:00:00 2001 From: Florian Sesser <florian@private.storage> Date: Wed, 24 Aug 2022 17:22:53 +0000 Subject: [PATCH] Promtail: Allow additional scrape targets --- nixos/modules/monitoring/exporters/promtail.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/monitoring/exporters/promtail.nix b/nixos/modules/monitoring/exporters/promtail.nix index 8c408034..b828d247 100644 --- a/nixos/modules/monitoring/exporters/promtail.nix +++ b/nixos/modules/monitoring/exporters/promtail.nix @@ -28,6 +28,13 @@ in { # https://whetstone.private.storage/privatestorage/PrivateStorageio/-/merge_requests/258 default = "http://172.23.23.1:3100/loki/api/v1/push"; }; + extraScrapeConfigs = lib.mkOption { + type = lib.types.listOf lib.types.attrs; + description = '' + Additional scrape configs. + ''; + default = [ ]; + }; }; config = lib.mkIf cfg.enable { @@ -76,7 +83,7 @@ in { source_labels = [ "__journal__systemd_unit" ]; target_label = "unit"; }]; - }]; + }] ++ cfg.extraScrapeConfigs; }; }; } -- GitLab