We can use https://github.com/kumina/postfix_exporter
Options: --postfix.logfile_path /var/log/maillog --posftfix.shows_path /var/spool/postfix/public/showq
We can use https://github.com/kumina/postfix_exporter
Options: --postfix.logfile_path /var/log/maillog --posftfix.shows_path /var/spool/postfix/public/showq
rOPS Nasqueron Operations | |||
D3386 | rOPSe8b486d9e75b Scrape Postfix metrics into Prometheus |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Wontfix | dereckson | T4 Setup fauve services | |||
Open | None | T1476 Host @wolfplex.be mail | |||
Open | Epic | DorianWinty | T1475 Provision a mail server | ||
Resolved | DorianWinty | T1930 Postfix Provisioning | |||
Open | None | T1621 Prepare a more flexible containers platform | |||
Open | None | T1633 Collect metrics from RabbitMQ | |||
Resolved | dereckson | T1392 Evaluate Prometheus | |||
Resolved | dereckson | T1623 Deploy Prometheus to gain observability | |||
Open | DorianWinty | T1990 Export metrics for Postfix |
Author seems to report issues with the exporter and uses mtail.
mtail was developed at Google to extract from logs metrics for timeseries, and they provide an example for postfix based on the exporter rules: https://github.com/google/mtail/blob/main/examples/postfix.mtail
There is no FreeBSD port for mtail, but I can prepare one, it's straightforward enough for Go applications.
Grafana dashboard for mtail: https://gitlab.torproject.org/tpo/tpa/grafana-dashboards/-/blob/main/services/postfix-mtail.json?ref_type=heads
In any case, the exporter should run as a non-root account
Currently:
root 22535 0.0 0.2 1262068 19176 14 I+ 30Ju l24 122:08.21 postfix_exporter --postfix.logfile_path /var/log/maillog --postfix.showq_path /var/spool/postfix