nixos/prometheus-dovecot-exporter: enhance socketPath
documentation
In Dovecot 2.3[1] the stats module changed and now the UNIX socket provided by Dovecot by default isn't compatible anymore with the exporter[2]. By enabling the `old-stats` plugin in Dovecot this issue can be solved which should be documented in this module. [1] https://wiki2.dovecot.org/Upgrading/2.3 [2] https://github.com/kumina/dovecot_exporter/issues/8
This commit is contained in:
parent
15d8f837c6
commit
ca72dbd125
@ -18,12 +18,34 @@ in
|
|||||||
socketPath = mkOption {
|
socketPath = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = "/var/run/dovecot/stats";
|
default = "/var/run/dovecot/stats";
|
||||||
example = "/var/run/dovecot2/stats";
|
example = "/var/run/dovecot2/old-stats";
|
||||||
description = ''
|
description = ''
|
||||||
Path under which the stats socket is placed.
|
Path under which the stats socket is placed.
|
||||||
The user/group under which the exporter runs,
|
The user/group under which the exporter runs,
|
||||||
should be able to access the socket in order
|
should be able to access the socket in order
|
||||||
to scrape the metrics successfully.
|
to scrape the metrics successfully.
|
||||||
|
|
||||||
|
Please keep in mind that the stats module has changed in
|
||||||
|
<link xlink:href="https://wiki2.dovecot.org/Upgrading/2.3">Dovecot 2.3+</link> which
|
||||||
|
is not <link xlink:href="https://github.com/kumina/dovecot_exporter/issues/8">compatible with this exporter</link>.
|
||||||
|
|
||||||
|
The following extra config has to be passed to Dovecot to ensure that recent versions
|
||||||
|
work with this exporter:
|
||||||
|
<programlisting>
|
||||||
|
{
|
||||||
|
<xref linkend="opt-services.prometheus.exporters.dovecot.enable" /> = true;
|
||||||
|
<xref linkend="opt-services.prometheus.exporters.dovecot.socketPath" /> = "/var/run/dovecot2/old-stats";
|
||||||
|
<xref linkend="opt-services.dovecot2.extraConfig" /> = '''
|
||||||
|
mail_plugins = $mail_plugins old_stats
|
||||||
|
service old-stats {
|
||||||
|
unix_listener old-stats {
|
||||||
|
user = nobody
|
||||||
|
group = nobody
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''';
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
scopes = mkOption {
|
scopes = mkOption {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user