diff options
author | WilliButz <wbutz@cyberfnord.de> | 2019-07-17 14:36:37 +0200 |
---|---|---|
committer | WilliButz <wbutz@cyberfnord.de> | 2019-07-22 16:41:10 +0200 |
commit | c64f621bfd6f8746eb8441872492173cfb12e8c9 (patch) | |
tree | 796d4b8e5dae1efdef79b74e7bb334fdd86d51e6 /nixos | |
parent | 86c884fb5bd5d104f83078a78d0723bf8555fdb0 (diff) | |
download | nixlib-c64f621bfd6f8746eb8441872492173cfb12e8c9.tar nixlib-c64f621bfd6f8746eb8441872492173cfb12e8c9.tar.gz nixlib-c64f621bfd6f8746eb8441872492173cfb12e8c9.tar.bz2 nixlib-c64f621bfd6f8746eb8441872492173cfb12e8c9.tar.lz nixlib-c64f621bfd6f8746eb8441872492173cfb12e8c9.tar.xz nixlib-c64f621bfd6f8746eb8441872492173cfb12e8c9.tar.zst nixlib-c64f621bfd6f8746eb8441872492173cfb12e8c9.zip |
nixos/prometheus-nginx-exporter: update module
Update exporter submodule to match the new exporter version.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters/nginx.nix | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix index 519bd9efca26..7d819b04adaa 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix @@ -16,32 +16,40 @@ in Can be enabled with services.nginx.statusPage = true. ''; }; - telemetryEndpoint = mkOption { + telemetryPath = mkOption { type = types.str; default = "/metrics"; description = '' Path under which to expose metrics. ''; }; - insecure = mkOption { + sslVerify = mkOption { type = types.bool; default = true; description = '' - Ignore server certificate if using https. + Whether to perform certificate verification for https. ''; }; + }; serviceOpts = { serviceConfig = { DynamicUser = true; ExecStart = '' - ${pkgs.prometheus-nginx-exporter}/bin/nginx_exporter \ - --nginx.scrape_uri '${cfg.scrapeUri}' \ - --telemetry.address ${cfg.listenAddress}:${toString cfg.port} \ - --telemetry.endpoint ${cfg.telemetryEndpoint} \ - --insecure ${toString cfg.insecure} \ + ${pkgs.prometheus-nginx-exporter}/bin/nginx-prometheus-exporter \ + --nginx.scrape-uri '${cfg.scrapeUri}' \ + --nginx.ssl-verify ${toString cfg.sslVerify} \ + --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + --web.telemetry-path ${cfg.telemetryPath} \ ${concatStringsSep " \\\n " cfg.extraFlags} ''; }; }; + imports = [ + (mkRenamedOptionModule [ "telemetryEndpoint" ] [ "telemetryPath" ]) + (mkRemovedOptionModule [ "insecure" ] '' + This option was replaced by 'prometheus.exporters.nginx.sslVerify'. + '') + ({ options.warnings = options.warnings; }) + ]; } |