gnu: libdvbpsi: Update to 1.3.2.
[jackhill/guix/guix.git] / gnu / packages / monitoring.scm
CommitLineData
d30e578a
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
c8cee2ef 3;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
4d92c210 4;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
d30e578a
LC
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages monitoring)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix build-system perl)
4d92c210 26 #:use-module (guix build-system python)
d30e578a 27 #:use-module (guix build-system gnu)
c8cee2ef 28 #:use-module (gnu packages admin)
d30e578a
LC
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages compression)
e7a30ded 31 #:use-module (gnu packages django)
d30e578a 32 #:use-module (gnu packages gd)
7fc2d377
LC
33 #:use-module (gnu packages image)
34 #:use-module (gnu packages mail)
a15181bb 35 #:use-module (gnu packages perl)
e7a30ded
RW
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages python-web)
38 #:use-module (gnu packages time))
d30e578a
LC
39
40(define-public nagios
41 (package
42 (name "nagios")
7fc2d377
LC
43 (version "4.2.4")
44 ;; XXX: Nagios 4.2.x and later bundle a copy of AngularJS.
d30e578a
LC
45 (source (origin
46 (method url-fetch)
47 (uri (string-append
48 "mirror://sourceforge/nagios/nagios-4.x/nagios-"
49 version "/nagios-" version ".tar.gz"))
50 (sha256
51 (base32
7fc2d377 52 "0w0blbwiw0ps04b7gkyyk89qkgwsxh6gydhmggbm1kl3ar3mq1dh"))
d30e578a
LC
53 (modules '((guix build utils)))
54 (snippet
55 ;; Ensure reproducibility.
56 '(substitute* (find-files "cgi" "\\.c$")
57 (("__DATE__") "\"1970-01-01\"")
58 (("__TIME__") "\"00:00:00\"")))))
59 (build-system gnu-build-system)
7fc2d377
LC
60 (native-inputs
61 `(("unzip" ,unzip)))
d30e578a
LC
62 (inputs
63 `(("zlib" ,zlib)
64 ("libpng-apng" ,libpng)
65 ("gd" ,gd)
66 ("perl" ,perl)
67 ("mailutils" ,mailutils)))
68 (arguments
69 '(#:configure-flags (list "--sysconfdir=/etc"
70
71 ;; 'include/locations.h.in' defines file
72 ;; locations, and many things go directly under
73 ;; LOCALSTATEDIR, hence the extra '/nagios'.
74 "--localstatedir=/var/nagios"
75
76 (string-append
77 "--with-mail="
78 (assoc-ref %build-inputs "mailutils")
79 "/bin/mail"))
80 #:make-flags '("all")
81 #:phases (modify-phases %standard-phases
82 (add-before 'build 'do-not-chown-to-nagios
83 (lambda _
84 ;; Makefiles do 'install -o nagios -g nagios', which
85 ;; doesn't work for us.
86 (substitute* (find-files "." "^Makefile$")
87 (("-o nagios -g nagios")
88 ""))
89 #t))
90 (add-before 'build 'do-not-create-sysconfdir
91 (lambda _
92 ;; Don't try to create /var upon 'make install'.
93 (substitute* "Makefile"
94 (("\\$\\(INSTALL\\).*\\$\\(LOGDIR\\).*$" all)
95 (string-append "# " all))
96 (("\\$\\(INSTALL\\).*\\$\\(CHECKRESULTDIR\\).*$" all)
97 (string-append "# " all))
98 (("chmod g\\+s.*" all)
99 (string-append "# " all)))
100 #t))
101 (add-before 'build 'set-html/php-directory
102 (lambda _
103 ;; Install HTML and PHP files under 'share/nagios/html'
104 ;; instead of just 'share/'.
105 (substitute* '("html/Makefile" "Makefile")
106 (("HTMLDIR=.*$")
107 "HTMLDIR = $(datarootdir)/nagios/html\n"))
108 #t)))
109 #:tests? #f)) ;no 'check' target or similar
110 (home-page "https://www.nagios.org/")
111 (synopsis "Host, service, and network monitoring program")
112 (description
113 "Nagios is a host, service, and network monitoring program written in C.
114CGI programs are included to allow you to view the current status, history,
115etc. via a Web interface. Features include:
116
117@itemize
118@item Monitoring of network services (via SMTP, POP3, HTTP, PING, etc).
119@item Monitoring of host resources (processor load, disk usage, etc.).
120@item A plugin interface to allow for user-developed service monitoring
121 methods.
122@item Ability to define network host hierarchy using \"parent\" hosts,
123 allowing detection of and distinction between hosts that are down
124 and those that are unreachable.
125@item Notifications when problems occur and get resolved (via email,
126 pager, or user-defined method).
127@item Ability to define event handlers for proactive problem resolution.
128@item Automatic log file rotation/archiving.
129@item Optional web interface for viewing current network status,
130 notification and problem history, log file, etc.
131@end itemize\n")
132 (license license:gpl2)))
c8cee2ef
SB
133
134(define-public darkstat
135 (package
136 (name "darkstat")
137 (version "3.0.719")
138 (source (origin
139 (method url-fetch)
140 (uri (string-append "https://unix4lyfe.org/darkstat/darkstat-"
141 version ".tar.bz2"))
142 (sha256
143 (base32
144 "1mzddlim6dhd7jhr4smh0n2fa511nvyjhlx76b03vx7phnar1bxf"))))
145 (build-system gnu-build-system)
146 (arguments '(#:tests? #f)) ; no tests
147 (inputs
148 `(("libpcap" ,libpcap)
149 ("zlib" ,zlib)))
150 (home-page "https://unix4lyfe.org/darkstat/")
151 (synopsis "Network statistics gatherer")
152 (description
153 "@command{darkstat} is a packet sniffer that runs as a background process,
154gathers all sorts of statistics about network usage, and serves them over
155HTTP. Features:
156
157@itemize
158@item Traffic graphs, reports per host, shows ports for each host.
159@item Embedded web-server with deflate compression.
160@item Asynchronous reverse DNS resolution using a child process.
161@item Small. Portable. Single-threaded. Efficient.
162@item Supports IPv6.
163@end itemize")
164 (license license:gpl2)))
4d92c210
RW
165
166(define-public python-whisper
167 (package
168 (name "python-whisper")
169 (version "1.0.2")
170 (source
171 (origin
172 (method url-fetch)
173 (uri (pypi-uri "whisper" version))
174 (sha256
175 (base32
176 "1v1bi3fl1i6p4z4ki692bykrkw6907dn3mfq0151f70lvi3zpns3"))))
177 (build-system python-build-system)
178 (home-page "http://graphiteapp.org/")
179 (synopsis "Fixed size round-robin style database for Graphite")
180 (description "Whisper is one of three components within the Graphite
181project. Whisper is a fixed-size database, similar in design and purpose to
182RRD (round-robin-database). It provides fast, reliable storage of numeric
183data over time. Whisper allows for higher resolution (seconds per point) of
184recent data to degrade into lower resolutions for long-term retention of
185historical data.")
186 (license license:asl2.0)))
187
188(define-public python2-whisper
189 (package-with-python2 python-whisper))
a15181bb
RW
190
191(define-public python2-carbon
192 (package
193 (name "python2-carbon")
194 (version "1.0.2")
195 (source
196 (origin
197 (method url-fetch)
198 (uri (pypi-uri "carbon" version))
199 (sha256
200 (base32
201 "142smpmgbnjinvfb6s4ijazish4vfgzyd8zcmdkh55y051fkixkn"))))
202 (build-system python-build-system)
203 (arguments
204 `(#:python ,python-2 ; only supports Python 2
205 #:phases
206 (modify-phases %standard-phases
207 ;; Don't install to /opt
208 (add-after 'unpack 'do-not-install-to-/opt
209 (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1") #t)))))
210 (propagated-inputs
211 `(("python2-whisper" ,python2-whisper)
212 ("python2-configparser" ,python2-configparser)
213 ("python2-txamqp" ,python2-txamqp)))
214 (home-page "http://graphiteapp.org/")
215 (synopsis "Backend data caching and persistence daemon for Graphite")
216 (description "Carbon is a backend data caching and persistence daemon for
217Graphite. Carbon is responsible for receiving metrics over the network,
218caching them in memory for \"hot queries\" from the Graphite-Web application,
219and persisting them to disk using the Whisper time-series library.")
220 (license license:asl2.0)))
e7a30ded
RW
221
222(define-public python2-graphite-web
223 (package
224 (name "python2-graphite-web")
225 (version "1.0.2")
226 (source
227 (origin
228 (method url-fetch)
229 (uri (pypi-uri "graphite-web" version))
230 (sha256
231 (base32
232 "0q8bwlj75jqyzmazfsi5sa26xl58ssa8wdxm2l4j0jqyn8xpfnmc"))))
233 (build-system python-build-system)
234 (arguments
235 `(#:python ,python-2 ; only supports Python 2
236 #:phases
237 (modify-phases %standard-phases
238 (add-after 'unpack 'relax-requirements
239 (lambda _
240 (substitute* "setup.py"
241 (("0.4.3") ,(package-version python2-django-tagging))
242 (("<1.9.99") (string-append "<="
243 ,(package-version python2-django))))
244 #t))
245 ;; Don't install to /opt
246 (add-after 'unpack 'do-not-install-to-/opt
247 (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1") #t)))))
248 (propagated-inputs
249 `(("python2-cairocffi" ,python2-cairocffi)
250 ("python2-pytz" ,python2-pytz)
251 ("python2-whisper" ,python2-whisper)
252 ("python2-django" ,python2-django)
253 ("python2-django-tagging" ,python2-django-tagging)
254 ("python2-scandir" ,python2-scandir)
255 ("python2-urllib3" ,python2-urllib3)
256 ("python2-pyparsing" ,python2-pyparsing)
257 ("python2-txamqp" ,python2-txamqp)))
258 (home-page "http://graphiteapp.org/")
259 (synopsis "Scalable realtime graphing system")
260 (description "Graphite is a scalable real-time graphing system that does
261two things: store numeric time-series data, and render graphs of this data on
262demand.")
263 (license license:asl2.0)))