Big cleanup
Signed-off-by: Manuel Friedli <manuel@fritteli.ch>
This commit is contained in:
parent
c7e383aa20
commit
8dd8c05554
99 changed files with 61 additions and 2281 deletions
|
|
@ -1,47 +0,0 @@
|
|||
30 Apr 2022; Manuel Friedli <manuel@gentoo.org>
|
||||
-apache_exporter-0.8.0-r1.ebuild:
|
||||
app-metrics/apache_exporter: Prune old version.
|
||||
|
||||
30 Apr 2022; Manuel Friedli <manuel@gentoo.org> apache_exporter-0.11.0.ebuild:
|
||||
app-metrics/apache_exporter: Fix build.
|
||||
|
||||
*apache_exporter-0.11.0 (30 Apr 2022)
|
||||
|
||||
30 Apr 2022; Manuel Friedli <manuel@gentoo.org>
|
||||
+apache_exporter-0.11.0.ebuild, -apache_exporter-0.10.1.ebuild:
|
||||
app-metrics/apache_exporter: Add ebuild for 0.11.0
|
||||
|
||||
*apache_exporter-0.10.1 (12 Oct 2021)
|
||||
|
||||
12 Oct 2021; Manuel Friedli <manuel@gentoo.org>
|
||||
+apache_exporter-0.10.1.ebuild:
|
||||
app-metrics/apache_exporter: Bump version
|
||||
|
||||
*apache_exporter-0.8.0-r1 (29 Sep 2020)
|
||||
|
||||
29 Sep 2020; Manuel Friedli <manuel@gentoo.org>
|
||||
+apache_exporter-0.8.0-r1.ebuild, -apache_exporter-0.8.0.ebuild,
|
||||
files/apache_exporter.service:
|
||||
app-metrics/apache_exporter: Change location of sysconfig file
|
||||
|
||||
29 Sep 2020; Manuel Friedli <manuel@gentoo.org> -apache_exporter-0.7.0.ebuild:
|
||||
app-metrics/apache_exporter: Purge old ebuild
|
||||
|
||||
*apache_exporter-0.8.0 (29 Sep 2020)
|
||||
|
||||
29 Sep 2020; Manuel Friedli <manuel@gentoo.org> +apache_exporter-0.8.0.ebuild:
|
||||
app-metrics/apache_exporter: Add ebuild for versin 0.8.0. This is conforming
|
||||
to GLEP 81.
|
||||
|
||||
14 Nov 2019; <manuel@gentoo.org> apache_exporter-0.7.0.ebuild:
|
||||
app-metrics/apache_exporter: Fix ebuild again.
|
||||
|
||||
14 Nov 2019; <manuel@gentoo.org> apache_exporter-0.7.0.ebuild:
|
||||
app-metrics/apache_exporter: Fix ebuild for apache_exporter.
|
||||
|
||||
*node_exporter-0.18.1 (10 Nov 2019)
|
||||
|
||||
10 Nov 2019; <manuel@gentoo.org> +files/node_exporter-0.18.1-systemd.patch,
|
||||
+files/node_exporter-1.initd, +files/node_exporter.confd, +metadata.xml,
|
||||
+node_exporter-0.18.1.ebuild:
|
||||
app-metrics/node_exporter: Add systemd-patched ebuild fpr version 0.18.1.
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
AUX apache_exporter.confd 59 BLAKE2B 4466ae408352adc136fa882cf382c1562e8e0b6401edf8e5a8633d3736da20ecd3b2e10b0b2e6b2cbec30c74ea6aeac930863ff18568e2144544539306b79208 SHA512 eaf040d612155e8ed5359124283a591559b720170583a654a06d0b5e480cc9e99c1bcba97cffca03816f3c2b49d304e183f997067d325636ec71a33118a45df9
|
||||
AUX apache_exporter.initd 650 BLAKE2B 86d014a2bb4f98a54a5e98060884bb99d1ec4011ce028a981d9d39cc5a5292c39018a80df2a3f0ad4b97aa1a0da059e89ad151f0a0b3d13d6ba6386aa4a9d6d4 SHA512 42367bb35b79cb3c4946ae57e81fa918d94b9b5613469e1e070797ffc9ab7ae74aaa3ad244be35cef8fe5df043fb5e1a604449c3a416e01da7cb11ad95c2b5b1
|
||||
AUX apache_exporter.service 196 BLAKE2B b7429d240256bdbe594741900bd1715d7806f604d420b668c83ed2b4f66b32ba1ff142a54e04687182c0b24f43d58c6d74f5b319d69aaa4619d4b561a9567913 SHA512 a93847eb9407e94388a606972373a2e9c51ca46f16b8a87365d8544b680d1d0fbf47a6eb86865621375015a58c8b6480aeefa247f37c31fa0a84383a27a915f7
|
||||
AUX sysconfig.apache_exporter 11 BLAKE2B e83c8a1c6cf0d2269d032d80bfb5f37969adce8655298d49f942e19318e1fcabe7f618514ce65d9e0209959d5ccb38141e81fcccd65a754584eaf2db3b4fbd03 SHA512 f4d982f86de30c5b52b04c201cd38fffa87f860bef18af6ab85e856ae2081b919256b918b5f4821ee2fc4da0548d1a95c2522b29cddca57f694e2f26c1b1b2b9
|
||||
DIST apache_exporter-1.0.9-deps.tar.xz 80059112 BLAKE2B 6b3cd9d5b3b558c1da1f3b1b41c8c712bc2556aeb994201d048a58cdcdc15522e5c407a4dd31673f4e4bbc350edc727d4a70fa2772e8d1b4863289fcb75de197 SHA512 5c85a9f08b3b3adbe4b16b1df4ed95bb4135944dad4efc46330ef69afab63c02e708239288fe1fa6406a9c6a999750da8357b468dd59620066b4fb38604bb42e
|
||||
DIST apache_exporter-1.0.9.tar.gz 21212 BLAKE2B dc3840df7d9808434e1c4397283ffd963c73c6442559dda71a2228e9eb9123b39c99c987cd6d4413e2cca94c91c28bd073069c9699f584a10bf53ad5bbd04351 SHA512 3628b2719488323db46d09cb4d741096a84ae65b1506ee40091c0f86d095c7ad23c9e6a560a9d5ecf8a4bdd59b59559ac6f640bdd5734244d722e460c242d7a3
|
||||
EBUILD apache_exporter-1.0.9.ebuild 974 BLAKE2B 82a8ebef7723a6c85a5b4d03fc73a4f71c5c81d812a87a6a12c891ebb3edde96f86abea1ff663ca57370ad2a64f3d1d0ad6b4cf41407a0f8da9ec9bbd809858e SHA512 a126411c6baa069c23129ccf2593b72de8049378b7aa82dc27252ca299858e97ec44d15ad627545bcfcac58c5dc0258732c62209ce8800e13bca2e7827604e1a
|
||||
MISC ChangeLog 1784 BLAKE2B 711840e812185617076bb46a0932cf788ecb858410369aef3032da3e5a4a655f004d6f03fe2ea978d60e67bed11fc38632c2b794e9e344e14a85e6c5e8722886 SHA512 b95c61c77c453a542a101ae5aeb017b5801b6fe79a427cf1f1667e66956c94bc03e3ad49b75b2bdfaf33ad977fa1a9ff152fc782d2b223a21d4f3ffb82d2186d
|
||||
MISC metadata.xml 337 BLAKE2B bd72b6097fead5eaf80082790d3712ae0893b118140b62f58639f0e5c56bebf57dbd0ccd0ea19af82b2dce88c88c494d88290f98df4818e4fad3f4386398d171 SHA512 aee4825d8b90a8fd84fb558b9af4b7eb889fcf81bae6c7b317a9d69f62b06dd0f0bc2aa91aa2c32f10ff91fdbf64b341d7e5adc3c65a5225c7e0e92d7a6b7816
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit go-module systemd
|
||||
|
||||
DESCRIPTION="Prometheus exporter for apache metrics"
|
||||
HOMEPAGE="https://github.com/Lusitaniae/apache_exporter"
|
||||
SRC_URI="https://github.com/Lusitaniae/apache_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://gentoo-overlay.friedli.info/${P}-deps.tar.xz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="acct-group/apache_exporter
|
||||
acct-user/apache_exporter"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
ego build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin apache_exporter
|
||||
dodoc README.md
|
||||
newinitd "${FILESDIR}"/apache_exporter.initd apache_exporter
|
||||
newconfd "${FILESDIR}"/apache_exporter.confd apache_exporter
|
||||
|
||||
systemd_dounit "${FILESDIR}"/apache_exporter.service
|
||||
insinto /etc/sysconfig
|
||||
newins "${FILESDIR}/sysconfig.apache_exporter" apache_exporter
|
||||
|
||||
keepdir /var/log/apache_exporter
|
||||
fowners -R ${PN}:${PN} /var/log/apache_exporter
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# arguments for prometheus apache exporter
|
||||
command_args=""
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 2016-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Prometheus apache metrics exporter"
|
||||
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
|
||||
user=${user:-${RC_SVCNAME}}
|
||||
group=${group:-${RC_SVCNAME}}
|
||||
|
||||
command="/usr/bin/apache_exporter"
|
||||
command_args="${command_args:-}"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="--user ${user} --group ${group} \
|
||||
--stdout /var/log/apache_exporter/${RC_SVCNAME}.log \
|
||||
--stderr /var/log/apache_exporter/${RC_SVCNAME}.log"
|
||||
|
||||
depend() {
|
||||
after net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -q -d -m 0755 -o ${user}:${group} /var/log/apache_exporter
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=Apache Exporter
|
||||
|
||||
[Service]
|
||||
User=apache_exporter
|
||||
EnvironmentFile=/etc/sysconfig/apache_exporter
|
||||
ExecStart=/usr/bin/apache_exporter $OPTIONS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1 +0,0 @@
|
|||
OPTIONS=""
|
||||
|
|
@ -3,3 +3,4 @@ AUX beszel-agent.service 550 BLAKE2B 71381383813fc851ffe810772065cfe7aa0e160a634
|
|||
DIST beszel-0.18.3-vendor.tar.xz 29845172 BLAKE2B 7c1e7e40c60614553dfa312d1891a677a987be5191447670d14f07b0a95933d2b9884b11b6914e74d20166a9be20bf6e3a86f1d6f296cd953d049ed17bc4631a SHA512 b959211fcd7e3a8c5abb3d46dedca883fbd85493f502d716538d0c76bfa08796e40dd8000306f8f9dcfb20e3886847d272a695553e669910168a059ecd31b461
|
||||
DIST beszel-agent-0.18.3.tar.gz 1153782 BLAKE2B 13458446ed3d80c9409161bc17b54fbde6dc5da6cbf9d65c42a65c5ec236e34dcc7fe131173cb08cc9b5df30b435952bd36c643a87a29fd8a65d5b844de62aa5 SHA512 c4abbe9b28b79ec3206b401b29fcc6c49531c9b2e946909df11d3ac8430099d455d391e49d67503f8fa831b6c514d5efb7f67845f1ab4788e81ff80a9a4521cf
|
||||
EBUILD beszel-agent-0.18.3.ebuild 1121 BLAKE2B b0595e547466d5181bd384e22909c625246a13d5cd96c00cea6b25df504ce95c5d77f06d245aa4736b4b09ccbb1748ef1f8c39c6b01cbc1a009311864e41f1aa SHA512 f64031296fdeb6bff92c00e99663bcb952fa20ac8c2153af578d07f1053c925908c5b7f9e551d607073dbc98c0efa85cebe47c0ff04f2946be46d7b8cb7907e9
|
||||
MISC metadata.xml 327 BLAKE2B b22344ccf0ca03ad86f9ea95440de7498ca4bc7da459b2395d7b0eb0dbe0cab566a8a79f30fd8679eff6f89ddb0d28ebcbfd714d6d324992df52a69f20cef69d SHA512 3fd2a4502bb7a6eee7f12e9fc0c4cbfc1fd2b00074c2a21ceb63bc81d2b853b3e569b5370b36814614fcedefab2e27be33d81096f75d356a64e6e31aaf4ce34b
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
<name>Manuel Friedli</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">prometheus/node_exporter</remote-id>
|
||||
<remote-id type="github">henrygd/beszel</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
29 Sep 2020; Manuel Friedli <manuel@gentoo.org>
|
||||
-mysqld_exporter-0.11.0.ebuild:
|
||||
app-metrics/mysqld_exporter: Purge old ebuild
|
||||
|
||||
*mysqld_exporter-0.12.1_p20200622 (27 Sep 2020)
|
||||
|
||||
27 Sep 2020; Manuel Friedli <manuel@gentoo.org>
|
||||
+files/mysqld_exporter-0.12.1-skip-tests.patch,
|
||||
+mysqld_exporter-0.12.1_p20200622.ebuild:
|
||||
app-metrics/mysqld_exporter: Add new ebuild.
|
||||
|
||||
*mysqld_exporter-0.11.0 (11 Nov 2019)
|
||||
|
||||
11 Nov 2019; <manuel@gentoo.org> +files/mysqld_exporter-r1.confd,
|
||||
+files/mysqld_exporter-r1.initd, +files/mysqld_exporter.confd,
|
||||
+files/mysqld_exporter.logrotate, +files/mysqld_exporter.service,
|
||||
+metadata.xml, +mysqld_exporter-0.11.0.ebuild:
|
||||
app-metrics/mysqld_exporter: Add ebuild with systemd service file.
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
AUX mysqld_exporter-0.12.1-skip-tests.patch 545 BLAKE2B 02e01f23cb302dd128d47f48f9b20ded113ff37f2053e932b3d0ab510a22b14be6cb80779d2d545e774285d9772f8a6f7313c5a0c251d734e194fac992994185 SHA512 c4c808bae622797e47261824c8bfca7f7f8b04771c047440eb9ea923f45517ccc49f53cf71c7b51e3af8cd5b9c99911d80fce66e12487d87dc9d242381550cbc
|
||||
AUX mysqld_exporter-r1.confd 893 BLAKE2B bebec4ba675a5f7bfec52f0c1ad3b824f032258397dc9386892daa4d93ca1f7134c85e92c7662f9bd5b34d86478e2b3be2fc5b4adfb6fa1ece8d901ae530ec3e SHA512 3291e96479ece4f99de2c26e127469349f6197bc2764691fb4bffe5729fc9ce625fa84e2859649f0495260b339afa20edaa7bd2af99e6f161e6e6bbb153eee39
|
||||
AUX mysqld_exporter-r1.initd 2050 BLAKE2B f36d0d954e577f939f613887f86952ebf2460237df487b376237045bf1f0fae76ca0c1c7ba6359d2e702a817ff0b581984244c2263019b2f89d6d938e4b329eb SHA512 4b69f492cb240797247549f02f12577146d8df219ff51c92a494f126e0fc2382de4b1d92807669e7f2f385bff38009db0b117fe9c2c88da48e875452e35a404c
|
||||
AUX mysqld_exporter.confd 891 BLAKE2B 340b8d6b5f3fdc0a52851197cfd94b1d9d20fa3cda349c581a016c6cc7edd53cb7d86b634487551f916fd5c84294add402397cb9bf0fc2efb211b589dd571dd2 SHA512 ed4f949c8f5f88ad54c536342adf90be5d74922b54c383735a957e571aba341057830c7e8cdc0e45b53e439c5297d3ad70ba7bd178f77d10615787ed51bcc03f
|
||||
AUX mysqld_exporter.logrotate 68 BLAKE2B 04a9a0df5dae2a2afd3374cd6f6fd5d04df7629bc85ed63792ecc9e2b4772668d1f5b1fe4baf14b17c26a495ffa1ed3a7d748719db9a72f427587243505158d1 SHA512 3eb2e6bfa0eae0847c0b1e2e7fd990068cb0ad570d14463c88a8860d70ebc378b2e3bc4141f0a98e95304c972c765ae48dbff726b208ba825fe1f4e58765e462
|
||||
AUX mysqld_exporter.service 200 BLAKE2B 1053fe71dd3a1066ad5512f8ad2b40e34411365816b40f9c8f79b49a125099d0dc479c8cafce4ef4a5ca214859100324d04a1d429403dd08c4107e013f221acf SHA512 aaf7d1eb499aea03b435be24c0949f503f69759ce3507ccf08b81136ccde19d7720f42892924a701931a5ce8fdf297bf889725b789a538fed5e2f87568a95e38
|
||||
DIST mysqld_exporter-0.14.0_p20230328.tar.gz 92865 BLAKE2B 490219444b14006a356fa423b21c851693cf97f9aa6a9d20e8ee732ae8af5aed07aeda04a3419aebe26051f00c60f5655c3479c4ec3d5a2c9c18b44218cdc3b4 SHA512 a12aeb676ba81732310599344292f8cd5680abd14d8b380ae2d57198530de1969a5712619eca195e5d7b65abf518de7877789f494a9a4fbcebf42e3c8e35dac8
|
||||
DIST mysqld_exporter-fad2c0ccd8c0df8fed91a81463e930e4485fdfee-vendor.tar.xz 1473744 BLAKE2B 64f4f9dfee04522dbebdc9682c2619cc0f5c63b0835cfca50a37d0cce542e6a926968e23fe94a13d2e76cfbf931026cdcff74823c6c464b1b2f551bf0c70a5cf SHA512 aa10101fd5bc5a2fdef367c855f85d10ebb38b8a92969c5ebf786f011a287f9992559805b8ed24ea39da4db8aedbaf12893a2c6049ea7e90e989adf1ed13d79f
|
||||
EBUILD mysqld_exporter-0.14.0_p20230328.ebuild 2544 BLAKE2B ccf479f6a2ee54bc2cb4d2f37018615fec34556a318adce11817d393f4a20c23f1bdd9bdd92bd6b5b46dad443e8e3f30a276b85ab97577c7b537cab25b7a9960 SHA512 c8251f3821811130f2ff2957d1c5f1e228688034551537eb196642c19f7968822d2a11ad4cb9f097773d1e550a5ed3c5332ad57ce642fb56fbc774185942fcee
|
||||
MISC ChangeLog 733 BLAKE2B f524170f97aac958542aa79a0c383e2d018bb8aa7a886f34b8f801bd95199e6fec3d065b53ad91b793d48979fc33a8915a3d499eed52e3ea82fa2ae0ad1422d1 SHA512 9eb13634368e353219cf63f07167fb5841bd90041e6d2e1bb1026a37cb6dd141f016c07442547a1a3d79b290e478f27f80a8238725f92988e752342a58561da6
|
||||
MISC metadata.xml 339 BLAKE2B cc95303dfddecf9c81e77995bca8719a87cc74b9c3a95142bea4bc13d9fba4767ea7d5bdc56731e45f59a27a66dfd1e7ecb6924c737961ff30cd690c9ab250b5 SHA512 21cf66c2810306d975812118206a29d21f8ae3ed887c41c43fc66603a5901e261fe86d80e04160a7a31eaceec759f128e09b127a7c885fea0a3d06415743d022
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
--- a/collector/exporter_test.go
|
||||
+++ b/collector/exporter_test.go
|
||||
@@ -71,6 +71,8 @@ func TestExporter(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetMySQLVersion(t *testing.T) {
|
||||
+ t.Skip("Test requires running mysqld")
|
||||
+
|
||||
if testing.Short() {
|
||||
t.Skip("-short is passed, skipping test")
|
||||
}
|
||||
--- a/mysqld_exporter_test.go
|
||||
+++ b/mysqld_exporter_test.go
|
||||
@@ -142,6 +142,8 @@ type bin struct {
|
||||
|
||||
// TestBin builds, runs and tests binary.
|
||||
func TestBin(t *testing.T) {
|
||||
+ t.Skip("Test requires network access")
|
||||
+
|
||||
var err error
|
||||
binName := "mysqld_exporter"
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# /etc/conf.d/mysqld_exporter
|
||||
|
||||
# PID file
|
||||
#EXPORTER_PIDFILE="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
# The termination timeout (start-stop-daemon parameter "retry") ensures
|
||||
# that the service will be terminated within a given time (60 + 5 seconds
|
||||
# per default) when you are stopping the service.
|
||||
#EXPORTER_TERMTIMEOUT="TERM/60/KILL/5"
|
||||
|
||||
# User to run exporter as
|
||||
#EXPORTER_USER="mysqld_exporter"
|
||||
|
||||
# User group to run exporter as
|
||||
#EXPORTER_GROUP="mysqld_exporter"
|
||||
|
||||
# You can use this configuration option to pass additional options to the
|
||||
# start-stop-daemon, see start-stop-daemon(8) for more details.
|
||||
# Per default we wait 1000ms after we have started the service to ensure
|
||||
# that the daemon is really up and running.
|
||||
#EXPORTER_SSDARGS="--wait 1000"
|
||||
|
||||
# Exporter flags
|
||||
# See `mysqld_exporter --help` for more details
|
||||
EXPORTER_FLAGS="--log.level=info"
|
||||
#EXPORTER_FLAGS="${EXPORTER_FLAGS} --yourAdditionalFlag"
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 2016-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Prometheus exporter for MySQL server metrics"
|
||||
|
||||
EXPORTER_FLAGS=${EXPORTER_FLAGS:-""}
|
||||
EXPORTER_USER=${EXPORTER_USER:-"mysqld_exporter"}
|
||||
EXPORTER_GROUP=${EXPORTER_GROUP:-"mysqld_exporter"}
|
||||
EXPORTER_PIDFILE=${EXPORTER_PIDFILE:-"/run/${RC_SVCNAME}.pid"}
|
||||
EXPORTER_SSDARGS=${EXPORTER_SSDARGS:-"--wait 1000"}
|
||||
EXPORTER_TERMTIMEOUT=${EXPORTER_TERMTIMEOUT:-"TERM/60/KILL/5"}
|
||||
|
||||
command="/usr/bin/mysqld_exporter"
|
||||
command_args="${EXPORTER_FLAGS}"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="${EXPORTER_SSDARGS}"
|
||||
start_stop_daemon_args="${start_stop_daemon_args} --user ${EXPORTER_USER}"
|
||||
start_stop_daemon_args="${start_stop_daemon_args} --group ${EXPORTER_GROUP}"
|
||||
|
||||
# We are forcing log files because upstream is going to remove syslog support :/
|
||||
start_stop_daemon_args="${start_stop_daemon_args} --stdout /var/log/mysqld_exporter/${RC_SVCNAME}.log"
|
||||
start_stop_daemon_args="${start_stop_daemon_args} --stderr /var/log/mysqld_exporter/${RC_SVCNAME}.log"
|
||||
|
||||
getconfig() {
|
||||
local key="$1"
|
||||
local value_default="$2"
|
||||
local value=
|
||||
|
||||
if service_started; then
|
||||
value="$(service_get_value "${key}")"
|
||||
fi
|
||||
|
||||
if [ -z "${value}" ]; then
|
||||
# Value not explicitly set
|
||||
echo "${value_default}"
|
||||
else
|
||||
echo "${value}"
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
pidfile="$(getconfig pidfile ${EXPORTER_PIDFILE})"
|
||||
retry="$(getconfig retry ${EXPORTER_TERMTIMEOUT})"
|
||||
|
||||
configtest() {
|
||||
if test "${command_args#*config\.my-cnf}" = "${command_args}"; then
|
||||
local _default_config_file="/var/lib/mysqld_exporter/.my.cnf"
|
||||
if [ ! -s "${_default_config_file}" ]; then
|
||||
eerror "No MySQL credentials found in \"${_default_config_file}\"!"
|
||||
eerror "Either create that file and add credentials or specify another file via \"-config.my-cnf\" flag."
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
depend() {
|
||||
after net
|
||||
use mysql
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
if [ "${RC_CMD}" != "restart" ]; then
|
||||
configtest || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start_post() {
|
||||
service_set_value retry "${EXPORTER_TERMTIMEOUT}"
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# /etc/conf.d/mysqld_exporter
|
||||
|
||||
# PID file
|
||||
#EXPORTER_PIDFILE="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
# The termination timeout (start-stop-daemon parameter "retry") ensures
|
||||
# that the service will be terminated within a given time (60 + 5 seconds
|
||||
# per default) when you are stopping the service.
|
||||
#EXPORTER_TERMTIMEOUT="TERM/60/KILL/5"
|
||||
|
||||
# User to run exporter as
|
||||
#EXPORTER_USER="mysqld_exporter"
|
||||
|
||||
# User group to run exporter as
|
||||
#EXPORTER_GROUP="mysqld_exporter"
|
||||
|
||||
# You can use this configuration option to pass additional options to the
|
||||
# start-stop-daemon, see start-stop-daemon(8) for more details.
|
||||
# Per default we wait 1000ms after we have started the service to ensure
|
||||
# that the daemon is really up and running.
|
||||
#EXPORTER_SSDARGS="--wait 1000"
|
||||
|
||||
# Exporter flags
|
||||
# See `mysqld_exporter --help` for more details
|
||||
EXPORTER_FLAGS="-log.level=info"
|
||||
#EXPORTER_FLAGS="${EXPORTER_FLAGS} -yourAdditionalFlag"
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
/var/log/mysqld_exporter/*.log {
|
||||
missingok
|
||||
notifempty
|
||||
size 30k
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=MySqld Exporter
|
||||
|
||||
[Service]
|
||||
User=mysqld_exporter
|
||||
EnvironmentFile=/etc/conf.d/mysqld_exporter
|
||||
ExecStart=/usr/bin/mysqld_exporter $EXPORTER_FLAGS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>manuel@fritteli.ch</email>
|
||||
<name>Manuel Friedli</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">prometheus/mysqld_exporter</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit go-module systemd
|
||||
# uncomment the first setting of MY_PV for a normal release
|
||||
# MY_PV="v${PV/_rc/-rc.}"
|
||||
# set MY_PV to the full commit hash for a snapshot release
|
||||
MY_PV_HASH=fad2c0ccd8c0df8fed91a81463e930e4485fdfee
|
||||
: ${MY_PV_HASH_FOR_VENDOR:=${MY_PV_HASH}}
|
||||
if [[ -n "${MY_PV_HASH}" ]]; then
|
||||
MY_PV=${MY_PV_HASH}
|
||||
MYSQLD_EXPORTER_COMMIT=${MY_PV_HASH:0:8}
|
||||
SRC_URI_UPSTREAM="https://github.com/prometheus/mysqld_exporter/archive/${MY_PV}.tar.gz"
|
||||
else
|
||||
MY_PV=$PV
|
||||
MYSQLD_EXPORTER_COMMIT=
|
||||
SRC_URI_UPSTREAM="https://github.com/prometheus/mysqld_exporter/archive/refs/tags/v${PV}.tar.gz"
|
||||
fi
|
||||
MY_P=${PN}-${MY_PV}
|
||||
SRC_URI_VENDOR="https://dev.gentoo.org/~robbat2/distfiles/${MY_P}-vendor.tar.xz"
|
||||
|
||||
DESCRIPTION="Prometheus exporter for MySQL server metrics"
|
||||
HOMEPAGE="https://github.com/prometheus/mysqld_exporter"
|
||||
SRC_URI="
|
||||
${SRC_URI_UPSTREAM} -> ${P}.tar.gz
|
||||
${SRC_URI_VENDOR}
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
LICENSE="Apache-2.0 BSD BSD-2 MIT MPL-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
BDEPEND="dev-util/promu"
|
||||
|
||||
DEPEND="acct-group/mysqld_exporter
|
||||
acct-user/mysqld_exporter"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-0.12.1-skip-tests.patch )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if [[ -n $MYSQLD_EXPORTER_COMMIT ]]; then
|
||||
sed -i -e "s/{{.Revision}}/${MYSQLD_EXPORTER_COMMIT}/" .promu.yml || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
mkdir -p bin || die
|
||||
|
||||
promu build --prefix bin || die
|
||||
|
||||
# comment this for a normal release.
|
||||
mv bin/${PN}-${MY_PV} bin/${PN} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/*
|
||||
dodoc {README,CHANGELOG,CONTRIBUTING}.md
|
||||
|
||||
keepdir /var/lib/mysqld_exporter /var/log/mysqld_exporter
|
||||
fowners ${PN}:${PN} /var/lib/mysqld_exporter /var/log/mysqld_exporter
|
||||
fperms 0770 /var/lib/mysqld_exporter
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}-r1.initd ${PN}
|
||||
newconfd "${FILESDIR}"/${PN}-r1.confd ${PN}
|
||||
|
||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}"/${PN}.logrotate ${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
elog "Create \"${EROOT}/var/lib/mysqld_exporter/.my.cnf\" to read MySQL credentials from file."
|
||||
else
|
||||
local _replacing_version=
|
||||
for _replacing_version in ${REPLACING_VERSIONS}; do
|
||||
if ! ver_test "${_replacing_version}" -ge "0.11.0"; then
|
||||
elog "Starting with ${PN}-0.11.0, command-line flags will require double dashes (--)."
|
||||
elog "You must update your configuration or ${PN} won't start."
|
||||
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
29 Sep 2020; Manuel Friedli <manuel@gentoo.org>
|
||||
-postfix_exporter-0.1.2.ebuild:
|
||||
app-metrics/postfix_exporter: Purge old ebuild
|
||||
|
||||
*postfix_exporter-0.2.0-r1 (29 Sep 2020)
|
||||
|
||||
29 Sep 2020; Manuel Friedli <manuel@gentoo.org>
|
||||
+postfix_exporter-0.2.0-r1.ebuild, -postfix_exporter-0.2.0.ebuild:
|
||||
app-metrics/postfix_exporter: Make v0.2.0 GLEP 81 conformant
|
||||
|
||||
*postfix_exporter-0.2.0 (19 Nov 2019)
|
||||
|
||||
19 Nov 2019; <manuel@gentoo.org> +files/postfix_exporter-1.confd,
|
||||
+postfix_exporter-0.2.0.ebuild:
|
||||
app-metrics/postfix_exporter: Add ebuild for version 0.2.0.
|
||||
|
||||
*postfix_exporter-0.1.2 (19 Nov 2019)
|
||||
|
||||
19 Nov 2019; <manuel@gentoo.org> +files/postfix_exporter.confd,
|
||||
+files/postfix_exporter.initd, +files/postfix_exporter.logrotated,
|
||||
+files/postfix_exporter.service, +metadata.xml,
|
||||
+postfix_exporter-0.1.2.ebuild:
|
||||
app-metrics/postfix_exporter: Add ebuild with systemd unit file.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
AUX postfix_exporter-1.confd 891 BLAKE2B 7483607fd56a7cad95df4a1ba50306b1dd80226ad7caa7dc87de9d4de841546895df183f27232a9937c8c54df1d007f634150d238921226095be754281566591 SHA512 46650da87890f8d52efa2d28204c6f8bc31725cc5df2f7e762a7b6ee95857b5e8ca5ee529f5f2c9c96f174402aa002437300e6383c8de608338ce40a5a800cd9
|
||||
AUX postfix_exporter.confd 527 BLAKE2B c05b24a709dd2d4f67f048975fedae0ca78eaacf42918c56c20d7a1aba8568158ee573076bce0c77518b55db5a78fd36bb0d5bd79138e7a31e47d1b7cc47c7c7 SHA512 6275fc294668e64996053923be9c3c00246c2db5deaaa50b28ddc1f049f953f51d9923813c32ca8f809d409a8e843c0de49fafe3d1ed11f69f222e3e1bf25a77
|
||||
AUX postfix_exporter.initd 565 BLAKE2B 2bb9b4de2fdefd5e4be00415430eccd378dcb74254a308667679595269936a6acc02249a7c84f3d18f453efca7d64fd0a89748d601e97c8839130f0983285023 SHA512 4a525dfd6cac0d83ebf41b9f9265d1f06816bf25ed5753719451a187d71b7d4bdbc8669c6f34797e6c75ead5c489f18971435aae47396ec8c0c91554c5edbe3b
|
||||
AUX postfix_exporter.logrotated 105 BLAKE2B 5285292139b4412afa9ab5d0fbe19f17f8785e0f98784a18f400373ec2c079cd4302ebb458564f2f052fc77a9b94709c81445947dd46a108029e680a0fd2b81c SHA512 1c20e1718bdd91df38758d30af520db983146332659d06205112a662eb8f096c3671f7631bc835255fdcb0538c66224c244a523e94f12e08ccb7b85b953844b5
|
||||
AUX postfix_exporter.service 225 BLAKE2B 95517b7d089d79020d8376f14d82d01cefd572c35c83a6c51f9bbc40e2360a7b424ab19afb3f38cebdf591e06900de17ded91e4bea124fa953dd28627993744c SHA512 f95c8f9446306d86586866f494f2f3de7d6c226151d1a84855bb03cafbc1e130ee693f6ea4b521f36e628a465becde3df0ec16a13432134eefe33f51445d08f2
|
||||
DIST postfix_exporter-0.3.0-deps.tar.xz 10261848 BLAKE2B 3ab985ae873f53019b093266df90d4593b3a1755bafb6a0df600ae84411fd73f578cfeb6749fdfade5392ec55ec4df1916cf6b86f0ea0b5e04828dda50687789 SHA512 d591ef808fd3ccc7b48f37257ae6925b8ae491decef9ac679f13af08d0c6717b162a53cc2cd2ffb98361f38eaceaac24b2fba1db958fc9fa172fbe5060b639b1
|
||||
DIST postfix_exporter-0.3.0.tar.gz 26528 BLAKE2B 9d1b17917f4a6a6e73e1477e973454d9ce774d218463f151117e8772f77ea17c00536d0262789644716992c3c6ddcbf8b26d9c92eea77f9750e971e3a7c0d1d4 SHA512 1812d2ad95803290c12615975ba6e44c0a6f73dd0e10db927a9f1c58bfce27b71c9c2928f58623e263ba2737d2780f220e6a7fe0992e2607f290478eaa080b39
|
||||
EBUILD postfix_exporter-0.3.0-r2.ebuild 1037 BLAKE2B 71c5caa399bb6eef9c20b645a6af88c72862e2f9d928d6361a973ac3543a220975cd52b4a829fea891c72b23dc3f4fa012b68f956231b777ff279ebdf71e29ae SHA512 2acc5fa021736a6a1214735ab15dff136d6a17cd1f2fb42a44f8f5e3dd437b02f56d9eb8dc83f165ae4441f15dc7352b8cd9954ec008a72773d767b268058dae
|
||||
MISC ChangeLog 890 BLAKE2B de6961b87add10ea0b2597276ccf184a88fbe169bbfb1a30e17e48e8bfe5f35213f48a7fa0b597de95465cd9519370ceb81435eeba728618d910eecbd4e77dd3 SHA512 9b227ee69673fe8b7807a07af530d5e10a8840e65f93aac77be720632f11b117f5b2e9278947e6f81ed98afdd5354d07a0c23380ff5ddb4752a107fb5f8add7a
|
||||
MISC metadata.xml 255 BLAKE2B 1132f0657024f17717e5191a4992978685715f9abb96052db6399468506deaa85454efcaf58c7dcebfe5e1cf8948c767a7b001832d50c7d9dc162b0ff1395361 SHA512 36fb59a02d322553d6bfad2deeff884cc782c54bbb01a3fb344767fb43536905c43950df368e645d08ba9c48f3ec13c05b1d3c827fa12581c164623d2c174d73
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# --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")
|
||||
# --systemd.enable
|
||||
# Read from the systemd journal instead of log
|
||||
# --systemd.unit string
|
||||
# Name of the Postfix systemd unit. (default "postfix.service")
|
||||
# --systemd.slice string
|
||||
# Name of the Postfix systemd slice. Overrides the systemd unit. (default "")
|
||||
# --systemd.journal_path string
|
||||
# Path to the systemd journal (default "")
|
||||
command_args=""
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# -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=""
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/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
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/var/log/postfix_exporter/postfix_exporter.log {
|
||||
missingok
|
||||
size 5M
|
||||
rotate 3
|
||||
compress
|
||||
copytruncate
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=Postfix Exporter
|
||||
|
||||
[Service]
|
||||
User=postfix_exporter
|
||||
Group=postfix_exporter
|
||||
EnvironmentFile=/etc/conf.d/postfix_exporter
|
||||
ExecStart=/usr/bin/postfix_exporter $command_args
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<!-- maintainer-needed -->
|
||||
<upstream>
|
||||
<remote-id type="github">kumina/postfix_exporter</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module systemd
|
||||
|
||||
DESCRIPTION="Prometheus Exporter for Postfix"
|
||||
HOMEPAGE="https://github.com/kumina/postfix_exporter"
|
||||
SRC_URI="
|
||||
https://github.com/kumina/postfix_exporter/archive/${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://dev.gentoo.org/~arthurzam/distfiles/app-metrics/${PN}/${P}-deps.tar.xz
|
||||
"
|
||||
|
||||
LICENSE="Apache-2.0 BSD MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="systemd"
|
||||
RESTRICT+=" test"
|
||||
|
||||
RDEPEND="
|
||||
acct-group/postfix_exporter
|
||||
acct-user/postfix_exporter
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
systemd? ( sys-apps/systemd )
|
||||
"
|
||||
|
||||
src_compile() {
|
||||
ego build -tags "$(usex systemd '' 'nosystemd')" -v -o bin/${PN}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/${PN}
|
||||
dodoc {CHANGELOG,README}.md
|
||||
keepdir /var/log/${PN}
|
||||
fowners ${PN}:${PN} /var/log/${PN}
|
||||
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
||||
newconfd "${FILESDIR}"/${PN}-1.confd ${PN}
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
|
||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
*prometheus-cpu-mem-monitor-0.0.0.1-r1 (29 Sep 2020)
|
||||
|
||||
29 Sep 2020; Manuel Friedli <manuel@gentoo.org>
|
||||
+prometheus-cpu-mem-monitor-0.0.0.1-r1.ebuild,
|
||||
-prometheus-cpu-mem-monitor-0.0.0.1.ebuild:
|
||||
app-metrics/prometheus-cpu-mem-monitor: GLEP 81 compatible
|
||||
|
||||
*prometheus-cpu-mem-monitor-0.0.0.1 (11 Nov 2019)
|
||||
|
||||
11 Nov 2019; <manuel@gentoo.org> +files/prometheus-cpu-mem-monitor.service,
|
||||
+files/prometheus-cpu-mem-monitor.sh, +files/prometheus-cpu-mem-monitor.timer,
|
||||
+metadata.xml, +prometheus-cpu-mem-monitor-0.0.0.1.ebuild:
|
||||
app-metrics/prometheus-cpu-mem-monitor: Add very first draft version
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
AUX prometheus-cpu-mem-monitor.service 243 BLAKE2B 6f774e36b2e1b2dbc1614a930f2e64da9b664a0bef6023bb69db571949266625f32ec057ac31be12f1ec2fbcb9c5d7a732377471f750b5346384c366808ba42a SHA512 7d21c89a0ebf577fe654ef93b7098b4ef40127892213e26141583d64a8fadc683799b0da588b8ddb4a692129de536e3c75dc80be83939ba7a5c47f45e84be7b2
|
||||
AUX prometheus-cpu-mem-monitor.sh 564 BLAKE2B 1fcff16c183709c569398795afbce2ab11e558badfb437b8e4048cde5102e7ae7fe58ea11f64cb1bce7754bdfd7f85bddcaaf4deefd2a658ca76b1973df9d8bc SHA512 dfbd52eb86dca8e0d576f262b98a4efe145524653a3cfe9ae51e14695d0a02d3fc7618e0f236b5200ef59b84d81acf373b3a49665dbc23c694f299a29569479e
|
||||
AUX prometheus-cpu-mem-monitor.timer 291 BLAKE2B d41b99088752863c3ffaf065279702a5ddec90edabe0fd7ec11d71b883756f370c4236aa1c4074b4d3869b02f29142aca4b5247dd49281299d5625a3fe4f3509 SHA512 2245655fec3417c44c64c04074f1f5c061e7c80a3b34ba0f683c12b74b1a7c5c46abec16bb78fca479381982d8286bab0919be223c2e9c08d26d3e80ced772a3
|
||||
EBUILD prometheus-cpu-mem-monitor-0.0.0.1-r2.ebuild 458 BLAKE2B 8f1583af1e7c008c3f5ebc3b1337ed4382110681ae171bb230eddffdeb719f739853486be3309e43ad871cffb6b6d3e88aeaad8a09beaa6bf4449dfe2f462bb2 SHA512 4aed822725bf83b66093e6813c786349cf1bb935c396efff1b8257b84f92df660d4bcfc0e125e8de8d158a13899629e6a4aea8273a2e70ba72204cb060c3f88e
|
||||
MISC ChangeLog 604 BLAKE2B 3eeac06192d3c27598c59618e7a800beed43b282e16abbf3d69e1aebbe43b8c525c6d9981802b04ba92ca67a5f4bccac41bc2458b4fd031775af2beb54d6acf8 SHA512 c38d6a62608d97018fc92328f4d0d86d4bad79593ce68b07264d3cb84e853dd2dc755e6ffaed46c40b4afdc691ae4527027c545f30ad8203985db1dd17cc58f2
|
||||
MISC metadata.xml 337 BLAKE2B bd72b6097fead5eaf80082790d3712ae0893b118140b62f58639f0e5c56bebf57dbd0ccd0ea19af82b2dce88c88c494d88290f98df4818e4fad3f4386398d171 SHA512 aee4825d8b90a8fd84fb558b9af4b7eb889fcf81bae6c7b317a9d69f62b06dd0f0bc2aa91aa2c32f10ff91fdbf64b341d7e5adc3c65a5225c7e0e92d7a6b7816
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
# Calculate host statistics for prometheus
|
||||
# Written by Manuel Friedli
|
||||
# Changelog:
|
||||
# 2019-11-10: Inception
|
||||
|
||||
[Unit]
|
||||
Description=Calculate CPU/Memory stats for prometheus
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/prometheus-cpu-mem-monitor.sh
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Extract per-process CPU and memory usage from "ps aux" and send the data to prometheus
|
||||
#
|
||||
|
||||
TARGET_URL="http://localhost:9091/metrics/job/top/instance/vps-02.friedli.info"
|
||||
|
||||
z=$(ps aux)
|
||||
|
||||
while read -r z
|
||||
do
|
||||
cpustats=$cpustats$(awk '{print "cpu_usage{process=\""$11"\", pid=\""$2"\"}", $3z}');
|
||||
memstats=$memstats$(awk '{print "memory_usage{process=\""$11"\", pid=\""$2"\"}", $4z}');
|
||||
done <<< "$z"
|
||||
|
||||
curl -X POST -H "Content-Type: text/plain" --data "$cpustats
|
||||
" ${TARGET_URL}
|
||||
|
||||
curl -X POST -H "Content-Type: text/plain" --data "$memstats
|
||||
" ${TARGET_URL}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# Timer for calculating host statistics for prometheus
|
||||
# Written by Manuel Friedli
|
||||
# Changelog:
|
||||
# 2019-11-10: Inception
|
||||
|
||||
[Unit]
|
||||
Description=Timer for calculating CPU/Memory stats for prometheus
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1s
|
||||
OnUnitInactiveSec=10s
|
||||
AccuracySec=1s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>manuel@fritteli.ch</email>
|
||||
<name>Manuel Friedli</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">prometheus/node_exporter</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit systemd
|
||||
|
||||
DESCRIPTION="CPU and memory monitoring for prometheus"
|
||||
HOMEPAGE="https://gittr.ch/linux/gentoo-overlay"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="sys-process/procps"
|
||||
|
||||
src_install() {
|
||||
dobin "${FILESDIR}/${PN}.sh"
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
systemd_dounit "${FILESDIR}/${PN}.timer"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue