diff --git a/roles/internalsmtp/files/prometheus-postfix-exporter b/roles/internalsmtp/files/prometheus-postfix-exporter new file mode 100644 index 0000000..061a0f5 --- /dev/null +++ b/roles/internalsmtp/files/prometheus-postfix-exporter @@ -0,0 +1,15 @@ +# Private log file from Postfix to read and truncate. Configured in +# /etc/rsyslog.d/prometheus-postfix-exporter.conf +POSTFIXLOGFILE=/var/log/mail.log + +# Extra arguments for the daemon. +ARGS='' + +# Prometheus-postfix-exporter supports the following options: +# --postfix.showq_path string +# Path at which Postfix places its showq socket. +# (default "/var/spool/postfix/public/showq") +# --web.listen-address string +# Address to listen on for web interface and telemetry. (default ":9154") +# --web.telemetry-path string +# Path under which to expose metrics. (default "/metrics") diff --git a/roles/internalsmtp/tasks/main.yaml b/roles/internalsmtp/tasks/main.yaml index 671830a..f3068d2 100644 --- a/roles/internalsmtp/tasks/main.yaml +++ b/roles/internalsmtp/tasks/main.yaml @@ -24,6 +24,14 @@ name: - prometheus-postfix-exporter +- name: Copy default nginx config + ansible.builtin.copy: + src: prometheus-postfix-exporter + dest: /etc/default/prometheus-postfix-exporter + owner: root + group: root + mode: '0644' + - name: Enable and restart exporter daemon service: name: prometheus-postfix-exporter diff --git a/roles/smtpgateway/files/prometheus-postfix-exporter b/roles/smtpgateway/files/prometheus-postfix-exporter new file mode 100644 index 0000000..061a0f5 --- /dev/null +++ b/roles/smtpgateway/files/prometheus-postfix-exporter @@ -0,0 +1,15 @@ +# Private log file from Postfix to read and truncate. Configured in +# /etc/rsyslog.d/prometheus-postfix-exporter.conf +POSTFIXLOGFILE=/var/log/mail.log + +# Extra arguments for the daemon. +ARGS='' + +# Prometheus-postfix-exporter supports the following options: +# --postfix.showq_path string +# Path at which Postfix places its showq socket. +# (default "/var/spool/postfix/public/showq") +# --web.listen-address string +# Address to listen on for web interface and telemetry. (default ":9154") +# --web.telemetry-path string +# Path under which to expose metrics. (default "/metrics") diff --git a/roles/smtpgateway/tasks/main.yaml b/roles/smtpgateway/tasks/main.yaml index 50b4055..e1d2db1 100644 --- a/roles/smtpgateway/tasks/main.yaml +++ b/roles/smtpgateway/tasks/main.yaml @@ -33,6 +33,14 @@ name: - prometheus-postfix-exporter +- name: Copy default nginx config + ansible.builtin.copy: + src: prometheus-postfix-exporter + dest: /etc/default/prometheus-postfix-exporter + owner: root + group: root + mode: '0644' + - name: Enable and restart exporter daemon service: name: prometheus-postfix-exporter