diff options
| author | Alex Korzh <alex@korzh.me> | 2026-08-02 13:52:33 +0200 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-08-08 17:56:14 +0900 |
| commit | c47f65bb512734fc5adae8773a3b8f35b4f7fa84 (patch) | |
| tree | 9e2f41fafeffaf6135316b498ccce282d061e025 | |
| parent | 49b32687a64d647c97cfb2ef9d7da68023311ab0 (diff) | |
gnu: Add monit.
* gnu/packages/monitoring.scm (monit): New variable.
Merges: https://codeberg.org/guix/guix/pulls/10294
Reviewed-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
| -rw-r--r-- | gnu/packages/monitoring.scm | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 43f8b6b28d0..8ef7d6c8c7b 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | ;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> | 24 | ;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> |
| 25 | ;;; Copyright © 2025 Giacomo Leidi <therewasa@fishinthecalculator.me> | 25 | ;;; Copyright © 2025 Giacomo Leidi <therewasa@fishinthecalculator.me> |
| 26 | ;;; Copyright © 2025 Christian Birk Sørensen <chrbirks@gmail.com> | 26 | ;;; Copyright © 2025 Christian Birk Sørensen <chrbirks@gmail.com> |
| 27 | ;;; Copyright © 2026 Alex Korzh <alex@korzh.me> | ||
| 27 | ;;; | 28 | ;;; |
| 28 | ;;; This file is part of GNU Guix. | 29 | ;;; This file is part of GNU Guix. |
| 29 | ;;; | 30 | ;;; |
| @@ -56,11 +57,14 @@ | |||
| 56 | #:use-module (gnu packages admin) | 57 | #:use-module (gnu packages admin) |
| 57 | #:use-module (gnu packages autotools) | 58 | #:use-module (gnu packages autotools) |
| 58 | #:use-module (gnu packages base) | 59 | #:use-module (gnu packages base) |
| 60 | #:use-module (gnu packages bison) | ||
| 59 | #:use-module (gnu packages curl) | 61 | #:use-module (gnu packages curl) |
| 60 | #:use-module (gnu packages check) | 62 | #:use-module (gnu packages check) |
| 61 | #:use-module (gnu packages compression) | 63 | #:use-module (gnu packages compression) |
| 64 | #:use-module (gnu packages crypto) | ||
| 62 | #:use-module (gnu packages databases) | 65 | #:use-module (gnu packages databases) |
| 63 | #:use-module (gnu packages django) | 66 | #:use-module (gnu packages django) |
| 67 | #:use-module (gnu packages compiler-tools) | ||
| 64 | #:use-module (gnu packages freedesktop) ; libatasmart | 68 | #:use-module (gnu packages freedesktop) ; libatasmart |
| 65 | #:use-module (gnu packages fontutils) | 69 | #:use-module (gnu packages fontutils) |
| 66 | #:use-module (gnu packages gd) | 70 | #:use-module (gnu packages gd) |
| @@ -491,6 +495,59 @@ system. It monitors CPU, load, memory, network bandwidth, disk I/O, disk use, | |||
| 491 | and more.") | 495 | and more.") |
| 492 | (license license:lgpl3+))) | 496 | (license license:lgpl3+))) |
| 493 | 497 | ||
| 498 | (define-public monit | ||
| 499 | (package | ||
| 500 | (name "monit") | ||
| 501 | (version "6.0.0") | ||
| 502 | (supported-systems | ||
| 503 | (filter (lambda (system) | ||
| 504 | (string-suffix? "-linux" system)) ;because of PAM | ||
| 505 | %supported-systems)) | ||
| 506 | (source | ||
| 507 | (origin | ||
| 508 | (method git-fetch) | ||
| 509 | (uri (git-reference | ||
| 510 | (url "https://bitbucket.org/tildeslash/monit.git") | ||
| 511 | (commit (string-append "release-" | ||
| 512 | (string-join (string-split version #\.) | ||
| 513 | "-"))))) | ||
| 514 | (file-name (git-file-name name version)) | ||
| 515 | (sha256 | ||
| 516 | (base32 "1lpai4lf4w6cz3g10ysspmnp7v3f9x8ilfwig4cxdgc514ybd79f")))) | ||
| 517 | (build-system gnu-build-system) | ||
| 518 | (arguments | ||
| 519 | (list | ||
| 520 | #:configure-flags | ||
| 521 | #~(list (string-append "--with-ssl-dir=" | ||
| 522 | #$(this-package-input "openssl"))) | ||
| 523 | #:phases | ||
| 524 | #~(modify-phases %standard-phases | ||
| 525 | (add-after 'unpack 'patch-tests | ||
| 526 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 527 | (substitute* "libmonit/test/CommandTest.c" | ||
| 528 | (("/bin/sh") | ||
| 529 | (search-input-file inputs "bin/sh")) | ||
| 530 | (("/bin/ls") | ||
| 531 | (search-input-file inputs "bin/ls"))))) | ||
| 532 | (add-before 'bootstrap 'patch-libmonit-bootstrap | ||
| 533 | (lambda _ | ||
| 534 | (patch-shebang "libmonit/bootstrap"))) | ||
| 535 | (replace 'check | ||
| 536 | (lambda* (#:key tests? #:allow-other-keys) | ||
| 537 | (when tests? | ||
| 538 | ;; TimeTest assumes local time is one hour ahead of UTC. | ||
| 539 | (setenv "TZ" "CET-1") | ||
| 540 | (with-directory-excursion "libmonit/test" | ||
| 541 | (invoke "./test.sh")))))))) | ||
| 542 | (native-inputs (list autoconf automake bison flex libtool perl)) | ||
| 543 | (inputs (list libxcrypt linux-pam openssl zlib)) | ||
| 544 | (home-page "https://mmonit.com/monit/") | ||
| 545 | (synopsis "Proactive monitoring") | ||
| 546 | (description | ||
| 547 | "Monit is a utility for managing and monitoring, processes, programs, | ||
| 548 | files, directories and filesystems on a UNIX system.") | ||
| 549 | (license license:agpl3))) | ||
| 550 | |||
| 494 | (define-public nagios | 551 | (define-public nagios |
| 495 | (package | 552 | (package |
| 496 | (name "nagios") | 553 | (name "nagios") |
