diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-29 00:04:04 +0000 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-01-21 23:42:35 +0000 |
| commit | 08f26bc70d9f716286f13076e7d02dbf28fa11c8 (patch) | |
| tree | 767f162f85955f20315e7b9d1925c48ea352f094 /gnu | |
| parent | 34c10a61c348d91a6fa3455f918302a889f4c82e (diff) | |
gnu: go-github-com-prometheus-node-exporter: 1.8.2-0.b8aac7c.
* gnu/packages/monitoring.scm: Add golang-build, golang-web, golang-xyz,
and prometheus modules.
(go-github-com-prometheus-node-exporter): 1.8.2-0.b8aac7c.
[arguments] <install-source?>: Skip source installation as it's a final
command.
<build-flags>: Provide ldflags.
<embed-files>: Copy 2 files required as not symlinks.
<phases>: Add 'pre-check and 'post-check - unpacking and removing
provided test data.
[propagated-inputs]: Add go-github-com-alecthomas-kingpin-v2,
go-github-com-beevik-ntp, go-github-com-coreos-go-systemd-v22,
go-github-com-dennwc-btrfs, go-github-com-ema-qdisc,
go-github-com-go-kit-log, go-github-com-godbus-dbus-v5,
go-github-com-hashicorp-go-envparse, go-github-com-hodgesds-perf-utils,
go-github-com-josharian-native, go-github-com-jsimonetti-rtnetlink,
go-github-com-mattn-go-xmlrpc, go-github-com-mdlayher-ethtool,
go-github-com-mdlayher-netlink, go-github-com-mdlayher-wifi,
go-github-com-jsimonetti-rtnetlink-v2,
go-github-com-opencontainers-selinux,
go-github-com-prometheus-client-golang,
go-github-com-prometheus-client-model, go-github-com-prometheus-common,
go-github-com-prometheus-community-go-runit,
go-github-com-prometheus-exporter-toolkit,
go-github-com-prometheus-procfs-next, go-github-com-safchain-ethtool,
go-golang-org-x-exp, go-golang-org-x-sys, and go-howett-net-plist.
* gnu/packages/prometheus.scm (go-github-com-prometheus-procfs-next):
New variable.
Change-Id: I06f9d5d99266ca1abb3e8203ec66d9415842306a
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/monitoring.scm | 103 | ||||
| -rw-r--r-- | gnu/packages/prometheus.scm | 20 |
2 files changed, 104 insertions, 19 deletions
diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 7dd30f9a6e0..2198eb9d531 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm | |||
| @@ -54,6 +54,9 @@ | |||
| 54 | #:use-module (gnu packages gettext) | 54 | #:use-module (gnu packages gettext) |
| 55 | #:use-module (gnu packages gnome) ;libnotify | 55 | #:use-module (gnu packages gnome) ;libnotify |
| 56 | #:use-module (gnu packages golang) | 56 | #:use-module (gnu packages golang) |
| 57 | #:use-module (gnu packages golang-build) | ||
| 58 | #:use-module (gnu packages golang-web) | ||
| 59 | #:use-module (gnu packages golang-xyz) | ||
| 57 | #:use-module (gnu packages image) | 60 | #:use-module (gnu packages image) |
| 58 | #:use-module (gnu packages mail) | 61 | #:use-module (gnu packages mail) |
| 59 | #:use-module (gnu packages ncurses) | 62 | #:use-module (gnu packages ncurses) |
| @@ -62,6 +65,7 @@ | |||
| 62 | #:use-module (gnu packages pcre) | 65 | #:use-module (gnu packages pcre) |
| 63 | #:use-module (gnu packages perl) | 66 | #:use-module (gnu packages perl) |
| 64 | #:use-module (gnu packages pkg-config) | 67 | #:use-module (gnu packages pkg-config) |
| 68 | #:use-module (gnu packages prometheus) | ||
| 65 | #:use-module (gnu packages python) | 69 | #:use-module (gnu packages python) |
| 66 | #:use-module (gnu packages python-build) | 70 | #:use-module (gnu packages python-build) |
| 67 | #:use-module (gnu packages python-web) | 71 | #:use-module (gnu packages python-web) |
| @@ -522,26 +526,87 @@ WSGI and the node exporter textfile collector.") | |||
| 522 | (license license:asl2.0))) | 526 | (license license:asl2.0))) |
| 523 | 527 | ||
| 524 | (define-public go-github-com-prometheus-node-exporter | 528 | (define-public go-github-com-prometheus-node-exporter |
| 525 | (package | 529 | ;; The latest release is failing to build, use the latest commit from the |
| 526 | (name "go-github-com-prometheus-node-exporter") | 530 | ;; master branch. |
| 527 | (version "0.18.1") | 531 | (let ((commit "b8aac7c92e2d7f3dea56b2d4802d4ef3ee29c3cc") |
| 528 | (source (origin | 532 | (revision "0")) |
| 529 | (method git-fetch) | 533 | (package |
| 530 | (uri (git-reference | 534 | (name "go-github-com-prometheus-node-exporter") |
| 531 | (url "https://github.com/prometheus/node_exporter") | 535 | (version (git-version "1.8.2" revision commit)) |
| 532 | (commit (string-append "v" version)))) | 536 | (source (origin |
| 533 | (file-name (git-file-name name version)) | 537 | (method git-fetch) |
| 534 | (sha256 | 538 | (uri (git-reference |
| 535 | (base32 | 539 | (url "https://github.com/prometheus/node_exporter") |
| 536 | "0s3sp1gj86p7npxl38hkgs6ymd3wjjmc5hydyg1b5wh0x3yvpx07")))) | 540 | (commit commit))) |
| 537 | (build-system go-build-system) | 541 | (file-name (git-file-name name version)) |
| 538 | (arguments | 542 | (sha256 |
| 539 | '(#:import-path "github.com/prometheus/node_exporter")) | 543 | (base32 |
| 540 | (synopsis "Prometheus exporter for hardware and OS metrics") | 544 | "0n2s2z168xzp6i0ihaqvvs8zinp1iqld45c6lj89x7wjv8m741j3")))) |
| 541 | (description "Prometheus exporter for metrics exposed by *NIX kernels, | 545 | (build-system go-build-system) |
| 546 | (arguments | ||
| 547 | (list | ||
| 548 | #:install-source? #f | ||
| 549 | #:build-flags | ||
| 550 | #~(list (string-append | ||
| 551 | "-ldflags=" | ||
| 552 | "-X github.com/prometheus/common/version.Version=" #$version | ||
| 553 | " -X github.com/prometheus/common/version.Revision=" #$revision | ||
| 554 | " -X github.com/prometheus/common/version.Branch=master" | ||
| 555 | " -X github.com/prometheus/common/version.BuildUser=guix" | ||
| 556 | " -X github.com/prometheus/common/version.BuildDate=n/a")) | ||
| 557 | #:embed-files #~(list "landing_page.css" "landing_page.html") | ||
| 558 | #:import-path "github.com/prometheus/node_exporter" | ||
| 559 | #:phases | ||
| 560 | #~(modify-phases %standard-phases | ||
| 561 | (add-before 'check 'pre-check | ||
| 562 | (lambda* (#:key tests? import-path #:allow-other-keys) | ||
| 563 | (with-directory-excursion (string-append "src/" import-path) | ||
| 564 | (invoke "./ttar" "-C" "collector/fixtures" | ||
| 565 | "-x" "-f" "collector/fixtures/sys.ttar") | ||
| 566 | (invoke "./ttar" "-C" "collector/fixtures" | ||
| 567 | "-x" "-f" "collector/fixtures/udev.ttar")))) | ||
| 568 | (add-after 'check 'post-check | ||
| 569 | (lambda* (#:key tests? import-path #:allow-other-keys) | ||
| 570 | (with-directory-excursion (string-append "src/" import-path) | ||
| 571 | (for-each delete-file-recursively | ||
| 572 | (list "collector/fixtures/sys" | ||
| 573 | "collector/fixtures/sys.ttar" | ||
| 574 | "collector/fixtures/udev" | ||
| 575 | "collector/fixtures/udev.ttar")))))))) | ||
| 576 | (propagated-inputs | ||
| 577 | (list go-github-com-alecthomas-kingpin-v2 | ||
| 578 | go-github-com-beevik-ntp | ||
| 579 | go-github-com-coreos-go-systemd-v22 | ||
| 580 | go-github-com-dennwc-btrfs | ||
| 581 | go-github-com-ema-qdisc | ||
| 582 | go-github-com-go-kit-log | ||
| 583 | go-github-com-godbus-dbus-v5 | ||
| 584 | go-github-com-hashicorp-go-envparse | ||
| 585 | go-github-com-hodgesds-perf-utils | ||
| 586 | go-github-com-josharian-native | ||
| 587 | go-github-com-jsimonetti-rtnetlink | ||
| 588 | go-github-com-mattn-go-xmlrpc | ||
| 589 | go-github-com-mdlayher-ethtool | ||
| 590 | go-github-com-mdlayher-netlink | ||
| 591 | go-github-com-mdlayher-wifi | ||
| 592 | go-github-com-jsimonetti-rtnetlink-v2 | ||
| 593 | go-github-com-opencontainers-selinux | ||
| 594 | go-github-com-prometheus-client-golang | ||
| 595 | go-github-com-prometheus-client-model | ||
| 596 | go-github-com-prometheus-common | ||
| 597 | go-github-com-prometheus-community-go-runit | ||
| 598 | go-github-com-prometheus-exporter-toolkit | ||
| 599 | go-github-com-prometheus-procfs-next | ||
| 600 | go-github-com-safchain-ethtool | ||
| 601 | go-golang-org-x-exp | ||
| 602 | go-golang-org-x-sys | ||
| 603 | go-howett-net-plist)) | ||
| 604 | (home-page "https://github.com/prometheus/node_exporter") | ||
| 605 | (synopsis "Prometheus exporter for hardware and OS metrics") | ||
| 606 | (description | ||
| 607 | "Prometheus exporter for metrics exposed by *NIX kernels, | ||
| 542 | written in Go with pluggable metric collectors.") | 608 | written in Go with pluggable metric collectors.") |
| 543 | (home-page "https://github.com/prometheus/node_exporter") | 609 | (license license:asl2.0)))) |
| 544 | (license license:asl2.0))) | ||
| 545 | 610 | ||
| 546 | (define-public temper-exporter | 611 | (define-public temper-exporter |
| 547 | (let ((commit "a87bbab19c05609d62d9e4c7941178700c1ef84d") | 612 | (let ((commit "a87bbab19c05609d62d9e4c7941178700c1ef84d") |
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm index 1adb42bb9a1..e582673a0d7 100644 --- a/gnu/packages/prometheus.scm +++ b/gnu/packages/prometheus.scm | |||
| @@ -508,6 +508,26 @@ Protocol,ICMP} echo (ping) functionality.") | |||
| 508 | kernel, and process metrics from the @file{/proc} pseudo file system.") | 508 | kernel, and process metrics from the @file{/proc} pseudo file system.") |
| 509 | (license license:asl2.0))) | 509 | (license license:asl2.0))) |
| 510 | 510 | ||
| 511 | ;; To make it compatible with node_exporter, see | ||
| 512 | ;; <https://github.com/prometheus/node_exporter/issues/3143>. | ||
| 513 | (define-public go-github-com-prometheus-procfs-next | ||
| 514 | (let ((commit "24ab3d8d880d820115eef19f7b0c2c38fffd6a25") | ||
| 515 | (revision "0")) | ||
| 516 | (hidden-package | ||
| 517 | (package | ||
| 518 | (inherit go-github-com-prometheus-procfs) | ||
| 519 | (name "go-github-com-prometheus-procfs") | ||
| 520 | (version (git-version "0.15.2" revision commit)) | ||
| 521 | (source | ||
| 522 | (origin | ||
| 523 | (method git-fetch) | ||
| 524 | (uri (git-reference | ||
| 525 | (url "https://github.com/prometheus/procfs") | ||
| 526 | (commit commit))) | ||
| 527 | (file-name (git-file-name name version)) | ||
| 528 | (sha256 | ||
| 529 | (base32 "0fv3f83q5wigbpl6mdpk4k7bj8jabc81rap0ym95l7rpw93cdlim")))))))) | ||
| 530 | |||
| 511 | (define-public go-github-com-prometheus-statsd-exporter | 531 | (define-public go-github-com-prometheus-statsd-exporter |
| 512 | (package | 532 | (package |
| 513 | (name "go-github-com-prometheus-statsd-exporter") | 533 | (name "go-github-com-prometheus-statsd-exporter") |
