Page MenuHomeDevCentral

Export metrics for Postfix
Open, NormalPublic

Description

We can use https://github.com/kumina/postfix_exporter

Options: --postfix.logfile_path /var/log/maillog --posftfix.shows_path /var/spool/postfix/public/showq

Event Timeline

dereckson triaged this task as Normal priority.Jul 29 2024, 20:33
dereckson created this task.

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

We are insterested by trying the two
Discussed in E6

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