git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #53986 from Ma27/document-dovecot-prometheus-exporter-issues

nixos/prometheus-dovecot-exporter: enhance `socketPath` documentation

commit7222fd9e21a41d4f00556700986ce5190c878f6f authorSilvan Mosberger <infinisil@icloud.com> dateThu 24 Jan 2019, 00:17 (8 years ago) parentf88f643ca72dbd
1 file changed+23−1
nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix+23−1
nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix+23−1
@@ -18,12 +18,34 @@ in
1818 socketPath = mkOption {
1919 type = types.path;
2020 default = "/var/run/dovecot/stats";
21− example = "/var/run/dovecot2/stats";
21+ example = "/var/run/dovecot2/old-stats";
2222 description = ''
2323 Path under which the stats socket is placed.
2424 The user/group under which the exporter runs,
2525 should be able to access the socket in order
2626 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>
2749 '';
2850 };
2951 scopes = mkOption {