From bac7dbda2400ded74ff1a577fc8312c929eaf582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 29 May 2022 21:32:09 +0200 Subject: [PATCH] add settings for postfix exporter --- .../files/prometheus-postfix-exporter | 15 +++++++++++++++ roles/internalsmtp/tasks/main.yaml | 8 ++++++++ .../smtpgateway/files/prometheus-postfix-exporter | 15 +++++++++++++++ roles/smtpgateway/tasks/main.yaml | 8 ++++++++ 4 files changed, 46 insertions(+) create mode 100644 roles/internalsmtp/files/prometheus-postfix-exporter create mode 100644 roles/smtpgateway/files/prometheus-postfix-exporter 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