You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# docker-compose up
[+] Running 2/2
⠿ Network postfix-exporter_back-tier Created 0.1s
⠿ Container postfix-exporter-postfix-exporter-1 Created 0.1s
Attaching to postfix-exporter-postfix-exporter-1
postfix-exporter-postfix-exporter-1 | 2023/04/19 11:23:39 Reading log events from "/var/log/mail.log"
postfix-exporter-postfix-exporter-1 | 2023/04/19 11:23:39 Failed to create PostfixExporter: open "/var/log/mail.log": no such file or directory
postfix-exporter-postfix-exporter-1 exited with code 1
Tried to mount the directory /var/log also, same problem.
/var/log/mail.log exists on the host with read permissions. Help welcome ....
The text was updated successfully, but these errors were encountered:
Not sure if this works nowadays, but on my old mail server, I've used this docker-compose.yml file to run the postfix exporter:
version: '3.2'
services:
postfix-exporter:
# use local Dockerfile to build image
build: .
# mount spool and logfiles as read only to container
volumes:
- /var/spool/postfix:/var/spool/postfix:ro
- /var/log/mail.log:/var/log/mail.log:ro
# map ports to host
ports:
- 9154:9154
restart: unless-stopped
@maxkratz thanks for the speedy reply. I started from scratch and now it builds and starts up. Thanks! I now try to integrate this with the prometheus-container ... another issue.
Trying this:
Getting:
Tried to mount the directory
/var/log
also, same problem./var/log/mail.log
exists on the host with read permissions. Help welcome ....The text was updated successfully, but these errors were encountered: