diff options
Diffstat (limited to 'app-metrics/postfix_exporter/files')
3 files changed, 35 insertions, 0 deletions
diff --git a/app-metrics/postfix_exporter/files/postfix_exporter.confd b/app-metrics/postfix_exporter/files/postfix_exporter.confd new file mode 100644 index 000000000000..a96327925e11 --- /dev/null +++ b/app-metrics/postfix_exporter/files/postfix_exporter.confd @@ -0,0 +1,9 @@ +# -postfix.logfile_path string +# Path where Postfix writes log entries. This file will be truncated by this exporter. (default "/var/log/postfix_exporter_input.log") +# -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") +command_args="" diff --git a/app-metrics/postfix_exporter/files/postfix_exporter.initd b/app-metrics/postfix_exporter/files/postfix_exporter.initd new file mode 100644 index 000000000000..8fce39c9db03 --- /dev/null +++ b/app-metrics/postfix_exporter/files/postfix_exporter.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 2016-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus Exporter for Postfix Metrics" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} + +command="/usr/bin/postfix_exporter" +command_args="${command_args:-}" +command_background="true" +start_stop_daemon_args="--user ${user} --group ${group} \ + --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \ + --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" + +depend() { + after net +} diff --git a/app-metrics/postfix_exporter/files/postfix_exporter.logrotated b/app-metrics/postfix_exporter/files/postfix_exporter.logrotated new file mode 100644 index 000000000000..7c9e9f4018c8 --- /dev/null +++ b/app-metrics/postfix_exporter/files/postfix_exporter.logrotated @@ -0,0 +1,7 @@ +/var/log/postfix_exporter/postfix_exporter.log { + missingok + size 5M + rotate 3 + compress + copytruncate +} |