From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-metrics/pushgateway/files/pushgateway-1.confd | 14 ++++++++++++++ app-metrics/pushgateway/files/pushgateway-1.initd | 19 +++++++++++++++++++ app-metrics/pushgateway/files/pushgateway-1.service | 16 ++++++++++++++++ app-metrics/pushgateway/files/pushgateway.confd | 14 ++++++++++++++ app-metrics/pushgateway/files/pushgateway.initd | 19 +++++++++++++++++++ app-metrics/pushgateway/files/pushgateway.logrotated | 7 +++++++ app-metrics/pushgateway/files/pushgateway.service | 16 ++++++++++++++++ 7 files changed, 105 insertions(+) create mode 100644 app-metrics/pushgateway/files/pushgateway-1.confd create mode 100644 app-metrics/pushgateway/files/pushgateway-1.initd create mode 100644 app-metrics/pushgateway/files/pushgateway-1.service create mode 100644 app-metrics/pushgateway/files/pushgateway.confd create mode 100644 app-metrics/pushgateway/files/pushgateway.initd create mode 100644 app-metrics/pushgateway/files/pushgateway.logrotated create mode 100644 app-metrics/pushgateway/files/pushgateway.service (limited to 'app-metrics/pushgateway/files') diff --git a/app-metrics/pushgateway/files/pushgateway-1.confd b/app-metrics/pushgateway/files/pushgateway-1.confd new file mode 100644 index 000000000000..73149075bb4e --- /dev/null +++ b/app-metrics/pushgateway/files/pushgateway-1.confd @@ -0,0 +1,14 @@ +# --log.format value +# If set use a syslog logger or JSON logging. Example: logger:syslog?appname=bob&local=7 or logger:stdout?json=true. Defaults to stderr. +# --log.level value +# Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]. +# --persistence.file string +# File to persist metrics. If empty, metrics are only kept in memory. +# --persistence.interval duration +# The minimum interval at which to write out the persistence file. (default 5m0s) +# --web.listen-address string +# Address to listen on for the web interface, API, and telemetry. (default ":9091") +# --web.telemetry-path string +# Path under which to expose metrics. (default "/metrics") + +#command_args="--web.listen-address localhost:9091 --persistence.file=/var/lib/${RC_SVCNAME}/persistence.gob" diff --git a/app-metrics/pushgateway/files/pushgateway-1.initd b/app-metrics/pushgateway/files/pushgateway-1.initd new file mode 100644 index 000000000000..60f81c1f38a2 --- /dev/null +++ b/app-metrics/pushgateway/files/pushgateway-1.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus push acceptor for ephemeral and batch jobs" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} + +command="/usr/bin/pushgateway" +command_args="${command_args:---web.listen-address localhost:9091 --persistence.file=/var/lib/${RC_SVCNAME}/persistence.gob}" +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() { + need net +} diff --git a/app-metrics/pushgateway/files/pushgateway-1.service b/app-metrics/pushgateway/files/pushgateway-1.service new file mode 100644 index 000000000000..03ae0a442772 --- /dev/null +++ b/app-metrics/pushgateway/files/pushgateway-1.service @@ -0,0 +1,16 @@ +[Unit] +Description=Prometheus exporter for ephemereal jobs +Documentation=https://prometheus.io/docs/instrumenting/pushing/ +After=network-online.target + +[Service] +User=pushgateway +Restart=on-failure +Environment=PUSHGATEWAY_ARGS="--web.listen-address localhost:9091 --persistence.file=/var/lib/pushgateway/persistence.gob" +ExecStart=/usr/bin/pushgateway $PUSHGATEWAY_ARGS +ExecReload=/bin/kill -HUP $MAINPID +TimeoutStopSec=20s +SendSIGKILL=no + +[Install] +WantedBy=multi-user.target diff --git a/app-metrics/pushgateway/files/pushgateway.confd b/app-metrics/pushgateway/files/pushgateway.confd new file mode 100644 index 000000000000..de9ef483723f --- /dev/null +++ b/app-metrics/pushgateway/files/pushgateway.confd @@ -0,0 +1,14 @@ +# -log.format value +# If set use a syslog logger or JSON logging. Example: logger:syslog?appname=bob&local=7 or logger:stdout?json=true. Defaults to stderr. +# -log.level value +# Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]. +# -persistence.file string +# File to persist metrics. If empty, metrics are only kept in memory. +# -persistence.interval duration +# The minimum interval at which to write out the persistence file. (default 5m0s) +# -web.listen-address string +# Address to listen on for the web interface, API, and telemetry. (default ":9091") +# -web.telemetry-path string +# Path under which to expose metrics. (default "/metrics") + +#command_args="-web.listen-address localhost:9091 -persistence.file=/var/lib/${RC_SVCNAME}/persistence.gob" diff --git a/app-metrics/pushgateway/files/pushgateway.initd b/app-metrics/pushgateway/files/pushgateway.initd new file mode 100644 index 000000000000..a187e57897ed --- /dev/null +++ b/app-metrics/pushgateway/files/pushgateway.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus push acceptor for ephemeral and batch jobs" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} + +command="/usr/bin/pushgateway" +command_args="${command_args:--web.listen-address localhost:9091 -persistence.file=/var/lib/${RC_SVCNAME}/persistence.gob}" +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() { + need net +} diff --git a/app-metrics/pushgateway/files/pushgateway.logrotated b/app-metrics/pushgateway/files/pushgateway.logrotated new file mode 100644 index 000000000000..c94b73952bc7 --- /dev/null +++ b/app-metrics/pushgateway/files/pushgateway.logrotated @@ -0,0 +1,7 @@ +/var/log/pushgateway/pushgateway.log { + missingok + size 5M + rotate 3 + compress + copytruncate +} diff --git a/app-metrics/pushgateway/files/pushgateway.service b/app-metrics/pushgateway/files/pushgateway.service new file mode 100644 index 000000000000..3915fdb5b337 --- /dev/null +++ b/app-metrics/pushgateway/files/pushgateway.service @@ -0,0 +1,16 @@ +[Unit] +Description=Prometheus exporter for ephemereal jobs +Documentation=https://prometheus.io/docs/instrumenting/pushing/ +After=network-online.target + +[Service] +User=pushgateway +Restart=on-failure +Environment=PUSHGATEWAY_ARGS="-web.listen-address localhost:9091 --persistence.file=/var/lib/pushgateway/persistence.gob" +ExecStart=/usr/bin/pushgateway $PUSHGATEWAY_ARGS +ExecReload=/bin/kill -HUP $MAINPID +TimeoutStopSec=20s +SendSIGKILL=no + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3