nixos/promtheus-nginx-exporter: update module
This commit is contained in:
parent
913ec8736c
commit
de60146f59
@ -9,21 +9,37 @@ in
|
|||||||
port = 9113;
|
port = 9113;
|
||||||
extraOpts = {
|
extraOpts = {
|
||||||
scrapeUri = mkOption {
|
scrapeUri = mkOption {
|
||||||
type = types.string;
|
type = types.str;
|
||||||
default = "http://localhost/nginx_status";
|
default = "http://localhost/nginx_status";
|
||||||
description = ''
|
description = ''
|
||||||
Address to access the nginx status page.
|
Address to access the nginx status page.
|
||||||
Can be enabled with services.nginx.statusPage = true.
|
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 = {
|
serviceOpts = {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.prometheus-nginx-exporter}/bin/nginx_exporter \
|
${pkgs.prometheus-nginx-exporter}/bin/nginx_exporter \
|
||||||
-nginx.scrape_uri '${cfg.scrapeUri}' \
|
--nginx.scrape_uri '${cfg.scrapeUri}' \
|
||||||
-telemetry.address ${cfg.listenAddress}:${toString cfg.port} \
|
--telemetry.address ${cfg.listenAddress}:${toString cfg.port} \
|
||||||
|
--telemetry.endpoint ${cfg.telemetryEndpoint} \
|
||||||
|
--insecure ${cfg.insecure} \
|
||||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user