2016-11-30 23:26:57 +01:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
|
|
|
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
|
2018-01-06 07:13:41 +01:00
|
|
|
;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
|
2016-11-30 23:26:57 +01:00
|
|
|
;;;
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu packages monitoring)
|
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (guix download)
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
#:use-module (guix build-system perl)
|
|
|
|
#:use-module (guix build-system gnu)
|
2018-01-06 07:13:41 +01:00
|
|
|
#:use-module (gnu packages admin)
|
2016-11-30 23:26:57 +01:00
|
|
|
#:use-module (gnu packages base)
|
|
|
|
#:use-module (gnu packages compression)
|
|
|
|
#:use-module (gnu packages gd)
|
2016-12-31 20:02:59 +01:00
|
|
|
#:use-module (gnu packages image)
|
|
|
|
#:use-module (gnu packages mail)
|
gnu: Move contents of zip module into compression module.
* gnu/packages/zip.scm (zip, unzip, zziplib, perl-zip): Move to...
* gnu/packages/compression.scm: ...here.
* gnu/packages/zip.scm: Delete file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Unregister deleted file.
* po/packages/POTFILES.in: Unregister deleted file.
* gnu/packages/{audio, avr, bioinformatics, busybox, cdrom, ci, compression,
docbook, documentation, fonts, fpga, game-development, games, gl, gnome,
gnuzilla, graphics, guile, haskell, image, java, kodi, ldc, libreoffice,
markup, maths, mc, monitoring, music, php, pretty-print, python, scheme,
smalltalk, statistics, synergy, tex, textutils, video, web-browsers, xml,
zip}.scm, guix/build-system/{ant, font}.scm, guix/{download, packages}.scm:
Adapt module import.
2017-06-12 20:40:01 +02:00
|
|
|
#:use-module (gnu packages perl))
|
2016-11-30 23:26:57 +01:00
|
|
|
|
|
|
|
(define-public nagios
|
|
|
|
(package
|
|
|
|
(name "nagios")
|
2016-12-31 20:02:59 +01:00
|
|
|
(version "4.2.4")
|
|
|
|
;; XXX: Nagios 4.2.x and later bundle a copy of AngularJS.
|
2016-11-30 23:26:57 +01:00
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"mirror://sourceforge/nagios/nagios-4.x/nagios-"
|
|
|
|
version "/nagios-" version ".tar.gz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2016-12-31 20:02:59 +01:00
|
|
|
"0w0blbwiw0ps04b7gkyyk89qkgwsxh6gydhmggbm1kl3ar3mq1dh"))
|
2016-11-30 23:26:57 +01:00
|
|
|
(modules '((guix build utils)))
|
|
|
|
(snippet
|
|
|
|
;; Ensure reproducibility.
|
|
|
|
'(substitute* (find-files "cgi" "\\.c$")
|
|
|
|
(("__DATE__") "\"1970-01-01\"")
|
|
|
|
(("__TIME__") "\"00:00:00\"")))))
|
|
|
|
(build-system gnu-build-system)
|
2016-12-31 20:02:59 +01:00
|
|
|
(native-inputs
|
|
|
|
`(("unzip" ,unzip)))
|
2016-11-30 23:26:57 +01:00
|
|
|
(inputs
|
|
|
|
`(("zlib" ,zlib)
|
|
|
|
("libpng-apng" ,libpng)
|
|
|
|
("gd" ,gd)
|
|
|
|
("perl" ,perl)
|
|
|
|
("mailutils" ,mailutils)))
|
|
|
|
(arguments
|
|
|
|
'(#:configure-flags (list "--sysconfdir=/etc"
|
|
|
|
|
|
|
|
;; 'include/locations.h.in' defines file
|
|
|
|
;; locations, and many things go directly under
|
|
|
|
;; LOCALSTATEDIR, hence the extra '/nagios'.
|
|
|
|
"--localstatedir=/var/nagios"
|
|
|
|
|
|
|
|
(string-append
|
|
|
|
"--with-mail="
|
|
|
|
(assoc-ref %build-inputs "mailutils")
|
|
|
|
"/bin/mail"))
|
|
|
|
#:make-flags '("all")
|
|
|
|
#:phases (modify-phases %standard-phases
|
|
|
|
(add-before 'build 'do-not-chown-to-nagios
|
|
|
|
(lambda _
|
|
|
|
;; Makefiles do 'install -o nagios -g nagios', which
|
|
|
|
;; doesn't work for us.
|
|
|
|
(substitute* (find-files "." "^Makefile$")
|
|
|
|
(("-o nagios -g nagios")
|
|
|
|
""))
|
|
|
|
#t))
|
|
|
|
(add-before 'build 'do-not-create-sysconfdir
|
|
|
|
(lambda _
|
|
|
|
;; Don't try to create /var upon 'make install'.
|
|
|
|
(substitute* "Makefile"
|
|
|
|
(("\\$\\(INSTALL\\).*\\$\\(LOGDIR\\).*$" all)
|
|
|
|
(string-append "# " all))
|
|
|
|
(("\\$\\(INSTALL\\).*\\$\\(CHECKRESULTDIR\\).*$" all)
|
|
|
|
(string-append "# " all))
|
|
|
|
(("chmod g\\+s.*" all)
|
|
|
|
(string-append "# " all)))
|
|
|
|
#t))
|
|
|
|
(add-before 'build 'set-html/php-directory
|
|
|
|
(lambda _
|
|
|
|
;; Install HTML and PHP files under 'share/nagios/html'
|
|
|
|
;; instead of just 'share/'.
|
|
|
|
(substitute* '("html/Makefile" "Makefile")
|
|
|
|
(("HTMLDIR=.*$")
|
|
|
|
"HTMLDIR = $(datarootdir)/nagios/html\n"))
|
|
|
|
#t)))
|
|
|
|
#:tests? #f)) ;no 'check' target or similar
|
|
|
|
(home-page "https://www.nagios.org/")
|
|
|
|
(synopsis "Host, service, and network monitoring program")
|
|
|
|
(description
|
|
|
|
"Nagios is a host, service, and network monitoring program written in C.
|
|
|
|
CGI programs are included to allow you to view the current status, history,
|
|
|
|
etc. via a Web interface. Features include:
|
|
|
|
|
|
|
|
@itemize
|
|
|
|
@item Monitoring of network services (via SMTP, POP3, HTTP, PING, etc).
|
|
|
|
@item Monitoring of host resources (processor load, disk usage, etc.).
|
|
|
|
@item A plugin interface to allow for user-developed service monitoring
|
|
|
|
methods.
|
|
|
|
@item Ability to define network host hierarchy using \"parent\" hosts,
|
|
|
|
allowing detection of and distinction between hosts that are down
|
|
|
|
and those that are unreachable.
|
|
|
|
@item Notifications when problems occur and get resolved (via email,
|
|
|
|
pager, or user-defined method).
|
|
|
|
@item Ability to define event handlers for proactive problem resolution.
|
|
|
|
@item Automatic log file rotation/archiving.
|
|
|
|
@item Optional web interface for viewing current network status,
|
|
|
|
notification and problem history, log file, etc.
|
|
|
|
@end itemize\n")
|
|
|
|
(license license:gpl2)))
|
2018-01-06 07:13:41 +01:00
|
|
|
|
|
|
|
(define-public darkstat
|
|
|
|
(package
|
|
|
|
(name "darkstat")
|
|
|
|
(version "3.0.719")
|
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://unix4lyfe.org/darkstat/darkstat-"
|
|
|
|
version ".tar.bz2"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"1mzddlim6dhd7jhr4smh0n2fa511nvyjhlx76b03vx7phnar1bxf"))))
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
(arguments '(#:tests? #f)) ; no tests
|
|
|
|
(inputs
|
|
|
|
`(("libpcap" ,libpcap)
|
|
|
|
("zlib" ,zlib)))
|
|
|
|
(home-page "https://unix4lyfe.org/darkstat/")
|
|
|
|
(synopsis "Network statistics gatherer")
|
|
|
|
(description
|
|
|
|
"@command{darkstat} is a packet sniffer that runs as a background process,
|
|
|
|
gathers all sorts of statistics about network usage, and serves them over
|
|
|
|
HTTP. Features:
|
|
|
|
|
|
|
|
@itemize
|
|
|
|
@item Traffic graphs, reports per host, shows ports for each host.
|
|
|
|
@item Embedded web-server with deflate compression.
|
|
|
|
@item Asynchronous reverse DNS resolution using a child process.
|
|
|
|
@item Small. Portable. Single-threaded. Efficient.
|
|
|
|
@item Supports IPv6.
|
|
|
|
@end itemize")
|
|
|
|
(license license:gpl2)))
|