···
# nixpkgs/nixos/modules/services/prometheus/exporters/postfix.nix
{ config, lib, pkgs, options }:
# for convenience we define cfg here
cfg = config.services.prometheus.exporters.postfix;
···
# (and optional overrides for default options).
# Note that this attribute is optional.
100
-
telemetryPath = mkOption {
97
+
telemetryPath = lib.mkOption {
98
+
type = lib.types.str;
Path under which to expose metrics.
107
-
logfilePath = mkOption {
104
+
logfilePath = lib.mkOption {
105
+
type = lib.types.path;
default = /var/log/postfix_exporter_input.log;
example = /var/log/mail.log;
···
This file will be truncated by this exporter!
116
-
showqPath = mkOption {
113
+
showqPath = lib.mkOption {
114
+
type = lib.types.path;
default = /var/spool/postfix/public/showq;
example = /var/lib/postfix/queue/public/showq;
···
${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--web.telemetry-path ${cfg.telemetryPath} \
139
-
${concatStringsSep " \\\n " cfg.extraFlags}
136
+
${lib.concatStringsSep " \\\n " cfg.extraFlags}
···
{ config, lib, pkgs, options }:
cfg = config.services.prometheus.exporters.nginx;
···
# 'services.prometheus.exporters.nginx.telemetryEndpoint' -> 'services.prometheus.exporters.nginx.telemetryPath'
176
-
(mkRenamedOptionModule [ "telemetryEndpoint" ] [ "telemetryPath" ])
171
+
(lib.mkRenamedOptionModule [ "telemetryEndpoint" ] [ "telemetryPath" ])
# removed option 'services.prometheus.exporters.nginx.insecure'
179
-
(mkRemovedOptionModule [ "insecure" ] ''
174
+
(lib.mkRemovedOptionModule [ "insecure" ] ''
This option was replaced by 'prometheus.exporters.nginx.sslVerify' which defaults to true.
({ options.warnings = options.warnings; })