nixos/prometheus-nginx-exporter: update module
Update exporter submodule to match the new exporter version.
This commit is contained in:
parent
86c884fb5b
commit
c64f621bfd
@ -16,32 +16,40 @@ in
|
|||||||
Can be enabled with services.nginx.statusPage = true.
|
Can be enabled with services.nginx.statusPage = true.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
telemetryEndpoint = mkOption {
|
telemetryPath = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "/metrics";
|
default = "/metrics";
|
||||||
description = ''
|
description = ''
|
||||||
Path under which to expose metrics.
|
Path under which to expose metrics.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
insecure = mkOption {
|
sslVerify = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Ignore server certificate if using https.
|
Whether to perform certificate verification for https.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
serviceOpts = {
|
serviceOpts = {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.prometheus-nginx-exporter}/bin/nginx_exporter \
|
${pkgs.prometheus-nginx-exporter}/bin/nginx-prometheus-exporter \
|
||||||
--nginx.scrape_uri '${cfg.scrapeUri}' \
|
--nginx.scrape-uri '${cfg.scrapeUri}' \
|
||||||
--telemetry.address ${cfg.listenAddress}:${toString cfg.port} \
|
--nginx.ssl-verify ${toString cfg.sslVerify} \
|
||||||
--telemetry.endpoint ${cfg.telemetryEndpoint} \
|
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
||||||
--insecure ${toString cfg.insecure} \
|
--web.telemetry-path ${cfg.telemetryPath} \
|
||||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
imports = [
|
||||||
|
(mkRenamedOptionModule [ "telemetryEndpoint" ] [ "telemetryPath" ])
|
||||||
|
(mkRemovedOptionModule [ "insecure" ] ''
|
||||||
|
This option was replaced by 'prometheus.exporters.nginx.sslVerify'.
|
||||||
|
'')
|
||||||
|
({ options.warnings = options.warnings; })
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user