From 336494e19f4110a9024f994a5628743f77fbade2 Mon Sep 17 00:00:00 2001 From: n0emis <22817873+n0emis@users.noreply.github.com> Date: Sat, 10 Jul 2021 21:18:38 +0200 Subject: [PATCH] nixos/prometheus: add password_file option to scrapeConfig's basic_auth (#123252) --- .../services/monitoring/prometheus/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/monitoring/prometheus/default.nix b/nixos/modules/services/monitoring/prometheus/default.nix index 8fe689ef3dbb..3be247ffb24e 100644 --- a/nixos/modules/services/monitoring/prometheus/default.nix +++ b/nixos/modules/services/monitoring/prometheus/default.nix @@ -323,15 +323,13 @@ let HTTP username ''; }; - password = mkOption { - type = types.str; - description = '' - HTTP password - ''; - }; + password = mkOpt types.str "HTTP password"; + password_file = mkOpt types.str "HTTP password file"; }; }) '' - Optional http login credentials for metrics scraping. + Sets the `Authorization` header on every scrape request with the + configured username and password. + password and password_file are mutually exclusive. ''; bearer_token = mkOpt types.str ''