app-metrics/postfix_exporter: Add ebuild with systemd unit file.
Package-Manager: Portage-2.3.76, Repoman-2.3.16
This commit is contained in:
parent
280322e41a
commit
d19f584e7c
8 changed files with 136 additions and 0 deletions
|
@ -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=""
|
19
app-metrics/postfix_exporter/files/postfix_exporter.initd
Normal file
19
app-metrics/postfix_exporter/files/postfix_exporter.initd
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 2016-2019 Gentoo Authors
|
||||
# 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
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
/var/log/postfix_exporter/postfix_exporter.log {
|
||||
missingok
|
||||
size 5M
|
||||
rotate 3
|
||||
compress
|
||||
copytruncate
|
||||
}
|
10
app-metrics/postfix_exporter/files/postfix_exporter.service
Normal file
10
app-metrics/postfix_exporter/files/postfix_exporter.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Postfix Exporter
|
||||
|
||||
[Service]
|
||||
User=postfix_exporter
|
||||
EnvironmentFile=/etc/conf.d/postfix_exporter
|
||||
ExecStart=/usr/bin/postfix_exporter $command_args
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue