summaryrefslogtreecommitdiff
path: root/app-metrics
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-23 16:28:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-23 16:28:44 +0000
commit191f9d51469a31970723ed9eb0aee70ffe63094e (patch)
tree2502e164870943a5ca491043010657f1b83e4a27 /app-metrics
parent2114f9bc3d55c52f926a43f08765b350871e86f2 (diff)
gentoo auto-resync : 23:11:2023 - 16:28:43
Diffstat (limited to 'app-metrics')
-rw-r--r--app-metrics/Manifest.gzbin7115 -> 7119 bytes
-rw-r--r--app-metrics/node_exporter/Manifest17
-rw-r--r--app-metrics/node_exporter/files/01-default-settings-1.7.0.patch133
-rw-r--r--app-metrics/node_exporter/files/node_exporter-1.7.0.logrotate9
-rw-r--r--app-metrics/node_exporter/files/node_exporter-1.7.0.service21
-rw-r--r--app-metrics/node_exporter/files/node_exporter.initd23
-rw-r--r--app-metrics/node_exporter/files/node_exporter.service13
-rw-r--r--app-metrics/node_exporter/metadata.xml15
-rw-r--r--app-metrics/node_exporter/node_exporter-1.3.1.ebuild47
-rw-r--r--app-metrics/node_exporter/node_exporter-1.4.0.ebuild51
-rw-r--r--app-metrics/node_exporter/node_exporter-1.7.0.ebuild74
-rw-r--r--app-metrics/node_exporter/node_exporter-9999.ebuild74
12 files changed, 334 insertions, 143 deletions
diff --git a/app-metrics/Manifest.gz b/app-metrics/Manifest.gz
index 9436ca0b2193..b7ad45cea92d 100644
--- a/app-metrics/Manifest.gz
+++ b/app-metrics/Manifest.gz
Binary files differ
diff --git a/app-metrics/node_exporter/Manifest b/app-metrics/node_exporter/Manifest
index f267dc7aabe6..27131bfa74c0 100644
--- a/app-metrics/node_exporter/Manifest
+++ b/app-metrics/node_exporter/Manifest
@@ -1,15 +1,14 @@
+AUX 01-default-settings-1.7.0.patch 7705 BLAKE2B 9de6d34f5b8bbf1edb193c794e844288c4560773691e9a7805c0068f1843b5b9fca675c52c0f2ff3bdbc21a0201a51f1f6bc88b420944f0c0d8ec995473abaf3 SHA512 ce5061a4e50662d37e7a09e0cbd80164f626e1384b10592e73f9d08cac87130174f860c38675b83067c9924def2f60371c7373cfc83757636be57956a9a43159
+AUX node_exporter-1.7.0.logrotate 147 BLAKE2B 4153888cc2bf626217dc998943208498dec58200ef110288bf910857592fead4fa1a3fc4996608adfd7f05d635381f9c183bc109c4f4f7f666c8b12910f1e141 SHA512 b1a893c4939b819e69a4afc8d8c6c2e965eb88a83e708878c757c533741ecd0b65d2dc052f54484f39ed8e52c96107c43050c5b1e37f22d8d0053b21b9b47701
+AUX node_exporter-1.7.0.service 464 BLAKE2B 6f306e2d21727f91f2139cebbf2d3c18ca61150b8bb2b3827d0666c155c19efe3d1c44eb2d05cd8c77ba70ddc7061d07ce9c9f70bc0e64a45931a0d2424021a2 SHA512 8a1943d80a95b5ad9790b9e14e62d2e2153c7d95a40f114fdf54ca93bfe109ad92815cbb6b7d340e6c4330f19a6f167a58d805c5e3402b84d491a5daed9800e8
AUX node_exporter.confd 111 BLAKE2B bb40370633c41a4f1283677ed16ad9734c7f180683e4d9d82be36ea5e63d3b8fc2a861a61c62e2e899209f7293588e3e7532ffe52ecb9aab4773a3943168d5dd SHA512 cce5db8eccf2ecfe1198aa8252b04fd6a96006f707e7132c2d01c5400d175551c3b9890c4d57fec9ccbe17594dfb937e1f99ead0e1c3fd8cf22930dabd70418d
-AUX node_exporter.initd 701 BLAKE2B 6dbe6f147332580c2f1433d293649d818bcb0033faf0cd14567eb1f017a677b3a5568a51c3fe9929d3e6f9f96455d96138709444cba8024235084dbfcaf5b78b SHA512 9af0a58796aa087f1dfbe00bc25e4af0d3a7e4054071bfecd76b9e3dbc3c222b649fe0f7c2a5907ce733d3c0cc3eba127d5815366a749fc16952d1c6b9d397ae
AUX node_exporter.initd-1 674 BLAKE2B e33c8ba727f82ccdf166a836c31364a6f41f5445a05b518e92c5b4ecada75dccf97fdfc93ed4f65757f3b5d9716f650e9e5779cdb1c79d6a1a67f15f1edbced1 SHA512 6f51a4c4b1c7381fc92e47d1ca4434d1b3839ff15af1c16c47374cd2b96d615937bcd13470bff16d067b05b79bdfa94b018f5e986222dc0e5a932de765216bba
-AUX node_exporter.service 223 BLAKE2B 1d6646c85ac4da5ad6c8b62ec932d0e7dae6f6cd02a1148c4641562f21b9807fe371adef564804812c81df0252043be74abe7f4f980221f2ce4b762e4186cdbd SHA512 7d7c5122773cfd2ad9f4cf987b259ed98788cbba0288485cf1a32f0b973353b6ed93e0e03320a5bfdf0d5431c050de918a1ae912b140355d14d817b383cc920e
AUX node_exporter.service-1 278 BLAKE2B bbafc8c8d5bc3fc9cf5e0f34fcd3237a64714a0df386081c4877724a6d0f3e1189aad0073cefe7e36dd82a0e372e73b4ca61386efb334d240262793dda417259 SHA512 c5dbb78b7fd4c516fdb78d64ef3d2bda45ec740bd9410d82ecb0de42f640fb57c628b2ca2cdb5e23fba1447837941f80ab3df1b1df49fe6c18775b10fe4551cc
-DIST node_exporter-1.3.1-deps.tar.xz 110247608 BLAKE2B 0c3cbea40927a2f780aea4113846a95fb24e79a03f53d880ec0cb4ad805e94dd2cd48402ad08673835e4bce2f06548a452dfb3a9f6f53b5d2d7b0a24048de5be SHA512 d7f7976f8ca3825876f8d246c58dccb6973edcb2e7a572c690b9ca8c8d7935bc0f225ab0285eacbaa93767b6f4181324b168338765a35a7e3112c32f926a3c8a
-DIST node_exporter-1.3.1.tar.gz 299038 BLAKE2B 8c4b562fab36632f6a4bcfc0c7bc65484bd9d44b16691a3d531c3e163ab17bf0fe81712d5ea3115460144be246599fc3430a80dd2244981333f0e1e5b2384c80 SHA512 cd73ca3551b0b52307d8b76aff29bf497609a1729203da9898270d1441d3358e8d9ba907bb8a75b5934ed64a8cf6b360385b1b2d0a3de55e0e149e0f819e0a1f
-DIST node_exporter-1.4.0-deps.tar.xz 24623388 BLAKE2B 76ea5392f3f4ee2d76706d77625a0b1708f0a09d11dde1fc7511f62625cf7d2e26117eb8ed77c495d4e1d7aa98c62dfbaffc7310c415d831a670360705789975 SHA512 9e64c1d51bd47cb6a8caa5fd6f22846c266ebb86c79e5f8ab363e847c614fca4044e7c388691870e61a8f017f08c2b5bcada56c8390bdf9877e71ccdbd646ad9
-DIST node_exporter-1.4.0.tar.gz 325743 BLAKE2B df6af555035c70930a610790e8d5eee87ca12cd27308ed95edf875da8615b61dde805d960d6262587322abecb721695bd42b1c078a7bcc40b24053cfce86015d SHA512 ebb4f9662ba995130b96e108050571119da368a8195e50896a19aab04d7cb40d60f9ae81052a0de08f571886cfb4150bf006a7b67a3d3683f2d04b5f43d61e7a
DIST node_exporter-1.5.0-deps.tar.xz 25558844 BLAKE2B fd862394c4e9456af395af4a1a8fb5c9504b96fcfa5170027903edadcf29935ffa389a945a8306e59e8d373b238481090e61dca4d9b037d890e8df05a5c8ede7 SHA512 5141beabd6f6af57014d2095271ea7c9a7e6087d9939cf6fc4a89908df0a5b87267f469987d47b20a48411d5a01a1317c53bfad8138dcfa6aa80c0a9f3822aa7
DIST node_exporter-1.5.0.tar.gz 329004 BLAKE2B 650e176ce15be980f9a3534f3246b577390d6d557b0ac7aa5341f3c91390bed829c4c3c3f60a4c108c814945134dc83639e12a13f416471e9c791ec88ed8a7bd SHA512 5b6d1da70a3458a1de270bcaf6ab177bd41c8b7031e67a4691b0b79931d15f0e22dbe1533f1ff0474496fcf4433bbd4b3473b8c0063f8891456960d7b6f56e15
-EBUILD node_exporter-1.3.1.ebuild 1373 BLAKE2B b0499e63ac218265e9583db91b6a39392fc4a0b91c589f7d104a56735d52c205e04dd5b17d06b852ae7e1e1a554571881889da29b3a36ce4d6aec03f3b2ed3ee SHA512 02720883e3e6bdcaffcd8d9b800742dc75cae0e4f0b9021143165b35d175bf1a1ee3da9b76a0a5355881a208e10d0193e3770f10e79def8c6dd83b2330dd8aff
-EBUILD node_exporter-1.4.0.ebuild 1491 BLAKE2B 82401f474a82821b0bca2a47f60a5e1cc7b97ffbc67892ff4ff146d5738be516086b904b92516910b2e7cea82cef5700aa8c919f1c0730b644a3cb1d760bb613 SHA512 9c8181e66663a3e0fe2eb3742ac031785ab1a1b5872382682fbab10e6a3b1afe500e95e4e6ce2a2d93fa99580e8995bbd4d03abc8eb94c62e6c06eed3b77a38a
+DIST node_exporter-1.7.0-deps.tar.xz 26490120 BLAKE2B 3177aa96a50eefaeafad73b293144772443428b8c1b90210230e3e508a678f5515aebec1c51661d47a1e021cd03c8febe9aa948cc3d955eff2b2f272a539b6af SHA512 9fe19ad0fc375f4846fddb7618de5b34ddad583b5c6b09d896c099c3218976fd337c11765699a713c66bbaa834b6cfcaee960b1b1d4014be263b99b897fb1e1c
+DIST node_exporter-1.7.0.tar.gz 328830 BLAKE2B 5f6b8101637bc0df605ea84446f905fcf8abeb68d0f2eda1e172b12aae4cffcfef54996f8725ad458671947c72a48fbbd73d4d401d8fd001e9e9d75f248230fc SHA512 4cd38b81cb54ca620a57c642a88b89d6d1ae36a752fff5f065c8848ea02066a211c6feb955bea4e311f7baafffee30a74670efe1cf4dac113c9bf7d154a1067b
EBUILD node_exporter-1.5.0.ebuild 1518 BLAKE2B 2427b9d287a00188c64d3b758888b0fcce332c24de327c2f2e762840d92bb01c885251be105daa93d637bf2dd9ebbd5f90011b9681cba3c30d9bce42d929137e SHA512 1b1a1f0689626a875056609a83b4e0c6e63a8d1a03ffc6ed50b117d22c2b04227be77ac9633e33886e4a9196b6421d37b6d671076a8b1d9706bc57b46109a2b0
-MISC metadata.xml 338 BLAKE2B 71f28f9a471e6dc27a6a358882a47aedbbe4bbbf2fe9b10b55ea7a5e6a042617f44c471ca936b3ddf494cd8714568ba3cfb7f824953bce9b2fe2f57553ae2f19 SHA512 45e5281f9295a1a723e235abab72e08262b1e75948899226417ebe51b01d8c989f05580272c4780826a4d4910370cfe29fab7057d14aa81a65a78a38d3e69aad
+EBUILD node_exporter-1.7.0.ebuild 1814 BLAKE2B 25c3007ac2f0b6573cb319f45bb0fe7800583b4dfaeb08f4484f25685ec7cbff374bbde7940d13c919e76050a2d5551a409ae5f83f9fc4b7f60b6f5027801aed SHA512 d277651a8d1d3b76305452accbeb4c3b5ca50f780ca813b5d03a7306d4ec0a46f304b68e175029cb91cae976e4f68a1940f0a9bb8894346c22122480303546bf
+EBUILD node_exporter-9999.ebuild 1814 BLAKE2B 25c3007ac2f0b6573cb319f45bb0fe7800583b4dfaeb08f4484f25685ec7cbff374bbde7940d13c919e76050a2d5551a409ae5f83f9fc4b7f60b6f5027801aed SHA512 d277651a8d1d3b76305452accbeb4c3b5ca50f780ca813b5d03a7306d4ec0a46f304b68e175029cb91cae976e4f68a1940f0a9bb8894346c22122480303546bf
+MISC metadata.xml 836 BLAKE2B a70c1987b21a91b7394a98e43414cc858de62cb1e77a186fc03ba3eb3322248d23dea45cf14e40b675cb8b193c891d95f3de6442f4d359bf0c19093ac4a9d576 SHA512 ce8a6a06563dde515140105532e139009aa3ca771679ef601df2bb2d6be4ba61db83dc14ceb35eb3584a04b8421b44e7f4ad9a523007553b1152a312aeef060f
diff --git a/app-metrics/node_exporter/files/01-default-settings-1.7.0.patch b/app-metrics/node_exporter/files/01-default-settings-1.7.0.patch
new file mode 100644
index 000000000000..114c6d23423e
--- /dev/null
+++ b/app-metrics/node_exporter/files/01-default-settings-1.7.0.patch
@@ -0,0 +1,133 @@
+Grabbed from https://salsa.debian.org/go-team/packages/prometheus-node-exporter/-/tree/debian/sid/debian/patches
+Only thing changed is textFileDirectory default path adapted for Gentoo
+##############
+Description: Set defaults that make sense for Debian systems.
+ We remove the deprecated options completely because they were introduced in
+ 1.0.0 and were never part of a stable release, and are causing issues with
+ the default value setting as it then makes the code consider it a usage and
+ errors out when the legacy option is used.
+Forwarded: not-needed
+---
+ collector/filesystem_linux.go | 2 +-
+ collector/netdev_common.go | 22 +---------------------
+ collector/systemd_linux.go | 23 ++---------------------
+ collector/textfile.go | 2 +-
+ 4 files changed, 5 insertions(+), 44 deletions(-)
+
+--- a/collector/filesystem_linux.go
++++ b/collector/filesystem_linux.go
+@@ -33,7 +33,7 @@ import (
+ )
+
+ const (
+- defMountPointsExcluded = "^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)"
++ defMountPointsExcluded = "^/(dev|proc|run|sys|mnt|media|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)"
+ defFSTypesExcluded = "^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$"
+ )
+
+--- a/collector/netdev_common.go
++++ b/collector/netdev_common.go
+@@ -32,9 +32,7 @@ import (
+
+ var (
+ netdevDeviceInclude = kingpin.Flag("collector.netdev.device-include", "Regexp of net devices to include (mutually exclusive to device-exclude).").String()
+- oldNetdevDeviceInclude = kingpin.Flag("collector.netdev.device-whitelist", "DEPRECATED: Use collector.netdev.device-include").Hidden().String()
+- netdevDeviceExclude = kingpin.Flag("collector.netdev.device-exclude", "Regexp of net devices to exclude (mutually exclusive to device-include).").String()
+- oldNetdevDeviceExclude = kingpin.Flag("collector.netdev.device-blacklist", "DEPRECATED: Use collector.netdev.device-exclude").Hidden().String()
++ netdevDeviceExclude = kingpin.Flag("collector.netdev.device-exclude", "Regexp of net devices to exclude (mutually exclusive to device-include).").Default("^lo$").String()
+ netdevAddressInfo = kingpin.Flag("collector.netdev.address-info", "Collect address-info for every device").Bool()
+ netdevDetailedMetrics = kingpin.Flag("collector.netdev.enable-detailed-metrics", "Use (incompatible) metric names that provide more detailed stats on Linux").Bool()
+ )
+@@ -55,24 +53,6 @@ func init() {
+
+ // NewNetDevCollector returns a new Collector exposing network device stats.
+ func NewNetDevCollector(logger log.Logger) (Collector, error) {
+- if *oldNetdevDeviceInclude != "" {
+- if *netdevDeviceInclude == "" {
+- level.Warn(logger).Log("msg", "--collector.netdev.device-whitelist is DEPRECATED and will be removed in 2.0.0, use --collector.netdev.device-include")
+- *netdevDeviceInclude = *oldNetdevDeviceInclude
+- } else {
+- return nil, errors.New("--collector.netdev.device-whitelist and --collector.netdev.device-include are mutually exclusive")
+- }
+- }
+-
+- if *oldNetdevDeviceExclude != "" {
+- if *netdevDeviceExclude == "" {
+- level.Warn(logger).Log("msg", "--collector.netdev.device-blacklist is DEPRECATED and will be removed in 2.0.0, use --collector.netdev.device-exclude")
+- *netdevDeviceExclude = *oldNetdevDeviceExclude
+- } else {
+- return nil, errors.New("--collector.netdev.device-blacklist and --collector.netdev.device-exclude are mutually exclusive")
+- }
+- }
+-
+ if *netdevDeviceExclude != "" && *netdevDeviceInclude != "" {
+ return nil, errors.New("device-exclude & device-include are mutually exclusive")
+ }
+--- a/collector/systemd_linux.go
++++ b/collector/systemd_linux.go
+@@ -18,7 +18,6 @@ package collector
+
+ import (
+ "context"
+- "errors"
+ "fmt"
+ "math"
+ "regexp"
+@@ -47,13 +46,11 @@ var (
+ systemdUnitIncludeSet = true
+ return nil
+ }).String()
+- oldSystemdUnitInclude = kingpin.Flag("collector.systemd.unit-whitelist", "DEPRECATED: Use --collector.systemd.unit-include").Hidden().String()
+ systemdUnitExcludeSet bool
+- systemdUnitExclude = kingpin.Flag("collector.systemd.unit-exclude", "Regexp of systemd units to exclude. Units must both match include and not match exclude to be included.").Default(".+\\.(automount|device|mount|scope|slice)").PreAction(func(c *kingpin.ParseContext) error {
++ systemdUnitExclude = kingpin.Flag("collector.systemd.unit-exclude", "Regexp of systemd units to exclude. Units must both match include and not match exclude to be included.").Default(".+\\.(automount|device|mount|scope|slice|target)").PreAction(func(c *kingpin.ParseContext) error {
+ systemdUnitExcludeSet = true
+ return nil
+ }).String()
+- oldSystemdUnitExclude = kingpin.Flag("collector.systemd.unit-blacklist", "DEPRECATED: Use collector.systemd.unit-exclude").Hidden().String()
+ systemdPrivate = kingpin.Flag("collector.systemd.private", "Establish a private, direct connection to systemd without dbus (Strongly discouraged since it requires root. For testing purposes only).").Hidden().Bool()
+ enableTaskMetrics = kingpin.Flag("collector.systemd.enable-task-metrics", "Enables service unit tasks metrics unit_tasks_current and unit_tasks_max").Bool()
+ enableRestartsMetrics = kingpin.Flag("collector.systemd.enable-restarts-metrics", "Enables service unit metric service_restart_total").Bool()
+@@ -83,7 +80,7 @@ type systemdCollector struct {
+ var unitStatesName = []string{"active", "activating", "deactivating", "inactive", "failed"}
+
+ func init() {
+- registerCollector("systemd", defaultDisabled, NewSystemdCollector)
++ registerCollector("systemd", defaultEnabled, NewSystemdCollector)
+ }
+
+ // NewSystemdCollector returns a new Collector exposing systemd statistics.
+@@ -133,22 +130,6 @@ func NewSystemdCollector(logger log.Logg
+ prometheus.BuildFQName(namespace, subsystem, "version"),
+ "Detected systemd version", []string{"version"}, nil)
+
+- if *oldSystemdUnitExclude != "" {
+- if !systemdUnitExcludeSet {
+- level.Warn(logger).Log("msg", "--collector.systemd.unit-blacklist is DEPRECATED and will be removed in 2.0.0, use --collector.systemd.unit-exclude")
+- *systemdUnitExclude = *oldSystemdUnitExclude
+- } else {
+- return nil, errors.New("--collector.systemd.unit-blacklist and --collector.systemd.unit-exclude are mutually exclusive")
+- }
+- }
+- if *oldSystemdUnitInclude != "" {
+- if !systemdUnitIncludeSet {
+- level.Warn(logger).Log("msg", "--collector.systemd.unit-whitelist is DEPRECATED and will be removed in 2.0.0, use --collector.systemd.unit-include")
+- *systemdUnitInclude = *oldSystemdUnitInclude
+- } else {
+- return nil, errors.New("--collector.systemd.unit-whitelist and --collector.systemd.unit-include are mutually exclusive")
+- }
+- }
+ level.Info(logger).Log("msg", "Parsed flag --collector.systemd.unit-include", "flag", *systemdUnitInclude)
+ systemdUnitIncludePattern := regexp.MustCompile(fmt.Sprintf("^(?:%s)$", *systemdUnitInclude))
+ level.Info(logger).Log("msg", "Parsed flag --collector.systemd.unit-exclude", "flag", *systemdUnitExclude)
+--- a/collector/textfile.go
++++ b/collector/textfile.go
+@@ -33,7 +33,7 @@ import (
+ )
+
+ var (
+- textFileDirectory = kingpin.Flag("collector.textfile.directory", "Directory to read text files with metrics from.").Default("").String()
++ textFileDirectory = kingpin.Flag("collector.textfile.directory", "Directory to read text files with metrics from.").Default("/var/lib/node_exporter").String()
+ mtimeDesc = prometheus.NewDesc(
+ "node_textfile_mtime_seconds",
+ "Unixtime mtime of textfiles successfully read.",
diff --git a/app-metrics/node_exporter/files/node_exporter-1.7.0.logrotate b/app-metrics/node_exporter/files/node_exporter-1.7.0.logrotate
new file mode 100644
index 000000000000..82cad3ace322
--- /dev/null
+++ b/app-metrics/node_exporter/files/node_exporter-1.7.0.logrotate
@@ -0,0 +1,9 @@
+/var/log/node_exporter/node_exporter.log {
+ weekly
+ rotate 10
+ copytruncate
+ compress
+ delaycompress
+ notifempty
+ missingok
+}
diff --git a/app-metrics/node_exporter/files/node_exporter-1.7.0.service b/app-metrics/node_exporter/files/node_exporter-1.7.0.service
new file mode 100644
index 000000000000..e704c809b8e5
--- /dev/null
+++ b/app-metrics/node_exporter/files/node_exporter-1.7.0.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Prometheus exporter for machine metrics
+Documentation=https://github.com/prometheus/node_exporter
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+User=node_exporter
+Group=node_exporter
+Restart=on-failure
+Type=exec
+ExecStart=/usr/sbin/node_exporter
+ExecReload=/usr/bin/kill -HUP $MAINPID
+TimeoutStopSec=20s
+SendSIGKILL=no
+NoNewPrivileges=true
+ProtectHome=read-only
+ProtectSystem=strict
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-metrics/node_exporter/files/node_exporter.initd b/app-metrics/node_exporter/files/node_exporter.initd
deleted file mode 100644
index 3ccddf757a89..000000000000
--- a/app-metrics/node_exporter/files/node_exporter.initd
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2016-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="Prometheus machine metrics exporter"
-pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
-user=${user:-${RC_SVCNAME}}
-group=${group:-${RC_SVCNAME}}
-
-command="/usr/sbin/node_exporter"
-command_args="${command_args:---collector.textfile.directory=/var/lib/node_exporter/}"
-command_background="true"
-start_stop_daemon_args="--user ${user} --group ${group} \
- --stdout /var/log/node_exporter/${RC_SVCNAME}.log \
- --stderr /var/log/node_exporter/${RC_SVCNAME}.log"
-
-depend() {
- after net
-}
-
-start_pre() {
- checkpath -q -d -m 0755 -o ${user}:${group} /var/log/node_exporter
-}
diff --git a/app-metrics/node_exporter/files/node_exporter.service b/app-metrics/node_exporter/files/node_exporter.service
deleted file mode 100644
index 20eac483fc8a..000000000000
--- a/app-metrics/node_exporter/files/node_exporter.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Node Exporter
-Wants=network-online.target
-After=network-online.target
-
-[Service]
-User=node_exporter
-Group=node_exporter
-Type=simple
-ExecStart=/usr/sbin/node_exporter
-
-[Install]
-WantedBy=multi-user.target
diff --git a/app-metrics/node_exporter/metadata.xml b/app-metrics/node_exporter/metadata.xml
index 080050c2eb9d..e4512038e885 100644
--- a/app-metrics/node_exporter/metadata.xml
+++ b/app-metrics/node_exporter/metadata.xml
@@ -5,7 +5,22 @@
<email>williamh@gentoo.org</email>
<name>William Hubbs</name>
</maintainer>
+ <maintainer type="person" proxied="yes">
+ <email>rahil3108@gmail.com</email>
+ <name>Rahil Bhimjiani</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="systemd">
+ Enables systemd collector by default
+ </flag>
+ </use>
<upstream>
<remote-id type="github">prometheus/node_exporter</remote-id>
+ <bugs-to>https://github.com/prometheus/node_exporter/issues</bugs-to>
+ <doc>https://github.com/prometheus/node_exporter/blob/master/README.md</doc>
</upstream>
</pkgmetadata>
diff --git a/app-metrics/node_exporter/node_exporter-1.3.1.ebuild b/app-metrics/node_exporter/node_exporter-1.3.1.ebuild
deleted file mode 100644
index 983e6beeaca1..000000000000
--- a/app-metrics/node_exporter/node_exporter-1.3.1.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit go-module systemd
-MY_PV="v${PV/_rc/-rc.}"
-NODE_EXPORTER_COMMIT=a2321e7
-
-DESCRIPTION="Prometheus exporter for machine metrics"
-HOMEPAGE="https://github.com/prometheus/node_exporter"
-SRC_URI="https://github.com/prometheus/node_exporter/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
- https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
-
-LICENSE="Apache-2.0 BSD BSD-2 MIT"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~riscv ~x86"
-IUSE="selinux"
-
-CDEPEND="acct-group/node_exporter
- acct-user/node_exporter"
-DEPEND=">=dev-util/promu-0.3.0
- ${CDEPEND}"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-node_exporter )"
-
-S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
-
-src_prepare() {
- default
- sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" .promu.yml || die
- sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" .promu-cgo.yml || die
-}
-
-src_compile() {
- mkdir -p bin || die
- promu build -v --prefix node_exporter || die
-}
-
-src_install() {
- dosbin node_exporter/node_exporter
- dodoc {README,CHANGELOG,CONTRIBUTING}.md
- systemd_dounit "${FILESDIR}"/node_exporter.service
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
- newconfd "${FILESDIR}"/${PN}.confd ${PN}
- keepdir /var/lib/node_exporter /var/log/node_exporter
- fowners ${PN}:${PN} /var/lib/node_exporter /var/log/node_exporter
-}
diff --git a/app-metrics/node_exporter/node_exporter-1.4.0.ebuild b/app-metrics/node_exporter/node_exporter-1.4.0.ebuild
deleted file mode 100644
index 2017364f299d..000000000000
--- a/app-metrics/node_exporter/node_exporter-1.4.0.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-inherit go-module systemd
-MY_PV="v${PV/_rc/-rc.}"
-NODE_EXPORTER_COMMIT=7da1321761b3b8dfc9e496e1a60e6a476fec6018
-
-DESCRIPTION="Prometheus exporter for machine metrics"
-HOMEPAGE="https://github.com/prometheus/node_exporter"
-SRC_URI="https://github.com/prometheus/node_exporter/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
- https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
-
-LICENSE="Apache-2.0 BSD BSD-2 MIT"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~riscv ~x86"
-IUSE="selinux"
-
-COMMON_DEPEND="acct-group/node_exporter
- acct-user/node_exporter"
-DEPEND=">=dev-util/promu-0.3.0
- ${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}
- selinux? ( sec-policy/selinux-node_exporter )"
-
-S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
-
-src_prepare() {
- default
- sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" .promu.yml || die
- sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" .promu-cgo.yml || die
-}
-
-src_compile() {
- mkdir -p bin || die
- promu build -v --prefix node_exporter || die
-}
-
-src_test() {
- emake test-flags= test
-}
-
-src_install() {
- dosbin node_exporter/node_exporter
- dodoc {README,CHANGELOG,CONTRIBUTING}.md
- systemd_newunit "${FILESDIR}"/node_exporter.service-1 node_exporter.service
- newinitd "${FILESDIR}"/${PN}.initd-1 ${PN}
- newconfd "${FILESDIR}"/${PN}.confd ${PN}
- keepdir /var/lib/node_exporter /var/log/node_exporter
- fowners ${PN}:${PN} /var/lib/node_exporter /var/log/node_exporter
-}
diff --git a/app-metrics/node_exporter/node_exporter-1.7.0.ebuild b/app-metrics/node_exporter/node_exporter-1.7.0.ebuild
new file mode 100644
index 000000000000..e02032dc5f61
--- /dev/null
+++ b/app-metrics/node_exporter/node_exporter-1.7.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd
+
+DESCRIPTION="Prometheus exporter for machine metrics"
+HOMEPAGE="https://github.com/prometheus/node_exporter"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/prometheus/node_exporter.git"
+else
+ SRC_URI="https://github.com/prometheus/node_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI+=" https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
+fi
+
+# main pkg
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD BSD-2 MIT"
+SLOT="0"
+IUSE="selinux systemd"
+
+RDEPEND="
+ acct-group/node_exporter
+ acct-user/node_exporter
+ selinux? ( sec-policy/selinux-node_exporter )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-util/promu-0.3.0"
+PATCHES=(
+ "${FILESDIR}"/01-default-settings-1.7.0.patch
+)
+
+src_prepare() {
+ default
+ use !systemd && { sed -i -e "s|defaultEnabled|defaultDisabled|g;" collector/systemd_linux.go || die; }
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]]; then
+ git-r3_src_unpack
+ go-module_live_vendor
+ else
+ go-module_src_unpack
+ fi
+}
+
+src_compile() {
+ promu build -v || die
+ ./"${PN}" --help-man > "${PN}".1 || die
+}
+
+src_test() {
+ emake test-flags= test
+}
+
+src_install() {
+ dosbin "${PN}"
+ systemd_newunit "${FILESDIR}"/node_exporter-1.7.0.service node_exporter.service
+ newinitd "${FILESDIR}"/${PN}.initd-1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/node_exporter-1.7.0.logrotate "${PN}"
+ keepdir /var/lib/node_exporter /var/log/node_exporter
+ fowners ${PN}:${PN} /var/lib/node_exporter /var/log/node_exporter
+
+ doman "${PN}".1
+ dodoc example-rules.yml *.md
+}
diff --git a/app-metrics/node_exporter/node_exporter-9999.ebuild b/app-metrics/node_exporter/node_exporter-9999.ebuild
new file mode 100644
index 000000000000..e02032dc5f61
--- /dev/null
+++ b/app-metrics/node_exporter/node_exporter-9999.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd
+
+DESCRIPTION="Prometheus exporter for machine metrics"
+HOMEPAGE="https://github.com/prometheus/node_exporter"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/prometheus/node_exporter.git"
+else
+ SRC_URI="https://github.com/prometheus/node_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI+=" https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
+fi
+
+# main pkg
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD BSD-2 MIT"
+SLOT="0"
+IUSE="selinux systemd"
+
+RDEPEND="
+ acct-group/node_exporter
+ acct-user/node_exporter
+ selinux? ( sec-policy/selinux-node_exporter )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-util/promu-0.3.0"
+PATCHES=(
+ "${FILESDIR}"/01-default-settings-1.7.0.patch
+)
+
+src_prepare() {
+ default
+ use !systemd && { sed -i -e "s|defaultEnabled|defaultDisabled|g;" collector/systemd_linux.go || die; }
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]]; then
+ git-r3_src_unpack
+ go-module_live_vendor
+ else
+ go-module_src_unpack
+ fi
+}
+
+src_compile() {
+ promu build -v || die
+ ./"${PN}" --help-man > "${PN}".1 || die
+}
+
+src_test() {
+ emake test-flags= test
+}
+
+src_install() {
+ dosbin "${PN}"
+ systemd_newunit "${FILESDIR}"/node_exporter-1.7.0.service node_exporter.service
+ newinitd "${FILESDIR}"/${PN}.initd-1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/node_exporter-1.7.0.logrotate "${PN}"
+ keepdir /var/lib/node_exporter /var/log/node_exporter
+ fowners ${PN}:${PN} /var/lib/node_exporter /var/log/node_exporter
+
+ doman "${PN}".1
+ dodoc example-rules.yml *.md
+}