diff options
author | WilliButz <wbutz@cyberfnord.de> | 2018-05-01 14:34:28 +0200 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2018-05-01 15:45:48 +0200 |
commit | de60146f592feb6482a82fc27d9d01f713f34277 (patch) | |
tree | 6b929639193a357cd43b157d45313a80ad8ab7a8 /nixos | |
parent | 913ec8736c70a089e43a9ee3d8e1f639d01134f4 (diff) |
nixos/promtheus-nginx-exporter: update module
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters/nginx.nix | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix index 6a3ba2d0457c..39054c2b73dd 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix @@ -9,21 +9,37 @@ in port = 9113; extraOpts = { scrapeUri = mkOption { - type = types.string; + type = types.str; default = "http://localhost/nginx_status"; description = '' Address to access the nginx status page. Can be enabled with services.nginx.statusPage = true. ''; }; + telemetryEndpoint = mkOption { + type = types.str; + default = "/metrics"; + description = '' + Path under which to expose metrics. + ''; + }; + insecure = mkOption { + type = types.bool; + default = true; + description = '' + Ignore server certificate if using 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} \ + --nginx.scrape_uri '${cfg.scrapeUri}' \ + --telemetry.address ${cfg.listenAddress}:${toString cfg.port} \ + --telemetry.endpoint ${cfg.telemetryEndpoint} \ + --insecure ${cfg.insecure} \ ${concatStringsSep " \\\n " cfg.extraFlags} ''; }; |