Commit 752e7bc3 authored by godog's avatar godog
Browse files

Use dedicated stats listener for old_stats

By default Dovecot old_stats will create the socket owned by root (non
overridable from the configuration). Thus switch to a dedicated socket
and provide an example configuration.
parent 81b443db
......@@ -4,9 +4,21 @@ This repository provides a `dovecot_exporter` utility that can be used
to scrape statistics from Dovecot and export them as Prometheus metrics.
It extracts the metrics that are exposed by
[Dovecot's stats module]( by
connecting to UNIX socket `/var/run/dovecot/stats` and serves them as
connecting to UNIX socket `/var/run/dovecot/stats-exporter` and serves them as
Prometheus metrics over TCP port 9166.
The socket will be created with the appropriate permissions by this Dovecot
service stats {
fifo_listener stats-exporter {
user = dovecot
mode = 0600
A list of command line flags supported by this utility can be obtained
by looking at this exporter's `main()` function. Do note that all
command line flags require two leading dashes (e.g.,
......@@ -208,7 +208,7 @@ func main() {
app = kingpin.New("dovecot_exporter", "Prometheus metrics exporter for Dovecot")
listenAddress = app.Flag("web.listen-address", "Address to listen on for web interface and telemetry.").Default(":9166").String()
metricsPath = app.Flag("web.telemetry-path", "Path under which to expose metrics.").Default("/metrics").String()
socketPath = app.Flag("dovecot.socket-path", "Path under which to expose metrics.").Default("/var/run/dovecot/stats").String()
socketPath = app.Flag("dovecot.socket-path", "Path under which to expose metrics.").Default("/var/run/dovecot/stats-exporter").String()
dovecotScopes = app.Flag("dovecot.scopes", "Stats scopes to query (comma separated)").Default("user").String()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment