[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#921351: [pkg-go] Bug#921351: prometheus-postfix-exporter: Init script missing

Hi Martin,

I'm sorry I didn't respond sooner. I've been swamped with $DAY_JOB, and don't have a lot of time to write now.

In brief, the exporter does not require any changes to logging config at all when run in a systemd environment, since it reads the systemd journal for the "postfix@-.service" unit. This is why I prefer this exporter to the mtail approach.

I agree that this exporter is not ideal in non-systemd environments, since it then does require changes to syslog config, i.e. the provisioning of a separate log file with the exporter will truncate (yuck). There is an issue already reported upstream about how suboptimal this is.

I'm totally fine with running the exporter as "prometheus" user, however that user will need to be added to postdrop group as you mentioned, and also to systemd-journal and / or adm group, in order to be able to read the postfix unit's journal / logs.


On 11.02.19 12:08, Martín Ferrari wrote:
Just a heads up.

Since there was no reply to this email, and with the soft freeze looming
over our heads, last night I went ahead and fixed this bug, which
required doing some substantive changes to the package. I hope it is OK
for all involved.

On 07/02/2019 17:01, Martín Ferrari wrote:
Daniel, et al.

I was preparing a fix for this by copying some support scripts from
other exporters when I noticed a couple of things, and wanted to check
with you before making any change.

This exporter is running with user postfix, while all the others use the
prometheus user. I understand that you need to access the queue
directly, but this could be done by granting the postqueue group when
starting the process instead.

Another thing is that this requires a special log configuration
(duplicating all postfix entries to a new file, and making that file
writable by the user this exporter runs as), which probably should be
documented in a Debian readme, and I have no idea how to do this with
systemd? Also, I'd suggest moving that log to /var/{lib,log}/prometheus

Honestly, back in the day I had looked at this exporter and decided it
was not great because of the log requirement, and started using mtail
for monitoring postfix.

Daniel Swarbrick
Senior Systems Developer

1&1 IONOS Cloud GmbH | Greifswalder Str. 207 | 10405 Berlin | Germany
Phone: +49 30 57700-8299 | Fax: +49 30 57700-8598
E-mail: daniel.swarbrick@cloud.ionos.com | Web: www.ionos.de

Head Office: Berlin, Germany
District Court Berlin Charlottenburg, Registration number: HRB 125506 B
Executive Management: Christoph Steffens, Matthias Steinberg, Achim Weiss

Member of United Internet

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient of this e-mail, you are hereby notified that saving,
distribution or use of the content of this e-mail in any way is prohibited. If
you have received this e-mail in error, please notify the sender and delete the

Reply to: