git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/prometheus-dovecot-exporter: enhance `socketPath` documentation
ca72dbdMaximilian Bosch
nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix+23−1
@@ -18,12 +18,34 @@ in
18 socketPath = mkOption {
18 socketPath = mkOption {
19 type = types.path;
19 type = types.path;
20 default = "/var/run/dovecot/stats";
20 default = "/var/run/dovecot/stats";
21− example = "/var/run/dovecot2/stats";
21+ example = "/var/run/dovecot2/old-stats";
22 description = ''
22 description = ''
23 Path under which the stats socket is placed.
23 Path under which the stats socket is placed.
24 The user/group under which the exporter runs,
24 The user/group under which the exporter runs,
25 should be able to access the socket in order
25 should be able to access the socket in order
26 to scrape the metrics successfully.
26 to scrape the metrics successfully.
27+
28+ Please keep in mind that the stats module has changed in
29+ <link xlink:href="https://wiki2.dovecot.org/Upgrading/2.3">Dovecot 2.3+</link> which
30+ is not <link xlink:href="https://github.com/kumina/dovecot_exporter/issues/8">compatible with this exporter</link>.
31+
32+ The following extra config has to be passed to Dovecot to ensure that recent versions
33+ work with this exporter:
34+ <programlisting>
35+ {
36+ <xref linkend="opt-services.prometheus.exporters.dovecot.enable" /> = true;
37+ <xref linkend="opt-services.prometheus.exporters.dovecot.socketPath" /> = "/var/run/dovecot2/old-stats";
38+ <xref linkend="opt-services.dovecot2.extraConfig" /> = '''
39+ mail_plugins = $mail_plugins old_stats
40+ service old-stats {
41+ unix_listener old-stats {
42+ user = nobody
43+ group = nobody
44+ }
45+ }
46+ ''';
47+ }
48+ </programlisting>
27 '';
49 '';
28 };
50 };
29 scopes = mkOption {
51 scopes = mkOption {