summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/monitoring/prometheus/exporters.xml
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/monitoring/prometheus/exporters.xml')
-rw-r--r--nixos/modules/services/monitoring/prometheus/exporters.xml110
1 files changed, 55 insertions, 55 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.xml b/nixos/modules/services/monitoring/prometheus/exporters.xml
index 7a0a1bdf2c14..81ac998729be 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters.xml
+++ b/nixos/modules/services/monitoring/prometheus/exporters.xml
@@ -112,65 +112,65 @@
directory, which will be called postfix.nix and contains all exporter
specific options and configuration:
<programlisting>
- # nixpgs/nixos/modules/services/prometheus/exporters/postfix.nix
- { config, lib, pkgs }:
+# nixpgs/nixos/modules/services/prometheus/exporters/postfix.nix
+{ config, lib, pkgs }:
- with lib;
+with lib;
- let
- # for convenience we define cfg here
- cfg = config.services.prometheus.exporters.postfix;
- in
- {
- port = 9154; # The postfix exporter listens on this port by default
+let
+ # for convenience we define cfg here
+ cfg = config.services.prometheus.exporters.postfix;
+in
+{
+ port = 9154; # The postfix exporter listens on this port by default
- # `extraOpts` is an attribute set which contains additional options
- # (and optional overrides for default options).
- # Note that this attribute is optional.
- extraOpts = {
- telemetryPath = mkOption {
- type = types.str;
- default = "/metrics";
- description = ''
- Path under which to expose metrics.
- '';
- };
- logfilePath = mkOption {
- type = types.path;
- default = /var/log/postfix_exporter_input.log;
- example = /var/log/mail.log;
- description = ''
- Path where Postfix writes log entries.
- This file will be truncated by this exporter!
- '';
- };
- showqPath = mkOption {
- type = types.path;
- default = /var/spool/postfix/public/showq;
- example = /var/lib/postfix/queue/public/showq;
- description = ''
- Path at which Postfix places its showq socket.
- '';
- };
- };
+ # `extraOpts` is an attribute set which contains additional options
+ # (and optional overrides for default options).
+ # Note that this attribute is optional.
+ extraOpts = {
+ telemetryPath = mkOption {
+ type = types.str;
+ default = "/metrics";
+ description = ''
+ Path under which to expose metrics.
+ '';
+ };
+ logfilePath = mkOption {
+ type = types.path;
+ default = /var/log/postfix_exporter_input.log;
+ example = /var/log/mail.log;
+ description = ''
+ Path where Postfix writes log entries.
+ This file will be truncated by this exporter!
+ '';
+ };
+ showqPath = mkOption {
+ type = types.path;
+ default = /var/spool/postfix/public/showq;
+ example = /var/lib/postfix/queue/public/showq;
+ description = ''
+ Path at which Postfix places its showq socket.
+ '';
+ };
+ };
- # `serviceOpts` is an attribute set which contains configuration
- # for the exporter's systemd service. One of
- # `serviceOpts.script` and `serviceOpts.serviceConfig.ExecStart`
- # has to be specified here. This will be merged with the default
- # service confiuration.
- serviceOpts = {
- serviceConfig = {
- ExecStart = ''
- ${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
- --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
- --web.telemetry-path ${cfg.telemetryPath} \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- };
- };
- }
- </programlisting>
+ # `serviceOpts` is an attribute set which contains configuration
+ # for the exporter's systemd service. One of
+ # `serviceOpts.script` and `serviceOpts.serviceConfig.ExecStart`
+ # has to be specified here. This will be merged with the default
+ # service confiuration.
+ serviceOpts = {
+ serviceConfig = {
+ ExecStart = ''
+ ${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
+ --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ --web.telemetry-path ${cfg.telemetryPath} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
+</programlisting>
</para>
</listitem>
<listitem>