Commit | Line | Data |
---|---|---|
d30e578a | 1 | ;;; GNU Guix --- Functional package management for GNU |
ca1caf9c | 2 | ;;; Copyright © 2016, 2021, 2021 Ludovic Courtès <ludo@gnu.org> |
c8cee2ef | 3 | ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org> |
0b6de85a | 4 | ;;; Copyright © 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> |
dda16f7c | 5 | ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr> |
39109778 | 6 | ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com> |
be683576 | 7 | ;;; Copyright © 2018, 2019, 2020 Oleg Pykhalov <go.wigust@gmail.com> |
1518b4bc | 8 | ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com> |
bc2529cb | 9 | ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org> |
d9a7727d | 10 | ;;; Copyright © 2021 Marius Bakke <marius@gnu.org> |
803be097 | 11 | ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at> |
45bb3470 | 12 | ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be> |
d30e578a LC |
13 | ;;; |
14 | ;;; This file is part of GNU Guix. | |
15 | ;;; | |
16 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
17 | ;;; under the terms of the GNU General Public License as published by | |
18 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
19 | ;;; your option) any later version. | |
20 | ;;; | |
21 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
22 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
23 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
24 | ;;; GNU General Public License for more details. | |
25 | ;;; | |
26 | ;;; You should have received a copy of the GNU General Public License | |
27 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
28 | ||
29 | (define-module (gnu packages monitoring) | |
30 | #:use-module (guix packages) | |
31 | #:use-module (guix download) | |
780205a0 | 32 | #:use-module (guix git-download) |
d30e578a LC |
33 | #:use-module ((guix licenses) #:prefix license:) |
34 | #:use-module (guix build-system perl) | |
4d92c210 | 35 | #:use-module (guix build-system python) |
d30e578a | 36 | #:use-module (guix build-system gnu) |
780205a0 | 37 | #:use-module (guix build-system go) |
ead46692 | 38 | #:use-module (guix utils) |
bc2529cb | 39 | #:use-module (gnu packages) |
c8cee2ef | 40 | #:use-module (gnu packages admin) |
64eb038e | 41 | #:use-module (gnu packages autotools) |
d30e578a | 42 | #:use-module (gnu packages base) |
ead46692 | 43 | #:use-module (gnu packages curl) |
fb6f35ba | 44 | #:use-module (gnu packages check) |
d30e578a | 45 | #:use-module (gnu packages compression) |
ead46692 | 46 | #:use-module (gnu packages databases) |
e7a30ded | 47 | #:use-module (gnu packages django) |
d30e578a | 48 | #:use-module (gnu packages gd) |
64eb038e | 49 | #:use-module (gnu packages gettext) |
7fc2d377 LC |
50 | #:use-module (gnu packages image) |
51 | #:use-module (gnu packages mail) | |
d9a7727d | 52 | #:use-module (gnu packages ncurses) |
ead46692 OP |
53 | #:use-module (gnu packages networking) |
54 | #:use-module (gnu packages libevent) | |
55 | #:use-module (gnu packages pcre) | |
a15181bb | 56 | #:use-module (gnu packages perl) |
bc2529cb | 57 | #:use-module (gnu packages pkg-config) |
e7a30ded | 58 | #:use-module (gnu packages python) |
05e3638b | 59 | #:use-module (gnu packages python-build) |
e7a30ded | 60 | #:use-module (gnu packages python-web) |
44d10b1f | 61 | #:use-module (gnu packages python-xyz) |
bc2529cb | 62 | #:use-module (gnu packages rrdtool) |
ead46692 | 63 | #:use-module (gnu packages time) |
bc2529cb LDB |
64 | #:use-module (gnu packages tls) |
65 | #:use-module (gnu packages web)) | |
d30e578a LC |
66 | |
67 | (define-public nagios | |
68 | (package | |
69 | (name "nagios") | |
15475f0c | 70 | (version "4.4.6") |
7fc2d377 | 71 | ;; XXX: Nagios 4.2.x and later bundle a copy of AngularJS. |
d30e578a LC |
72 | (source (origin |
73 | (method url-fetch) | |
74 | (uri (string-append | |
75 | "mirror://sourceforge/nagios/nagios-4.x/nagios-" | |
76 | version "/nagios-" version ".tar.gz")) | |
77 | (sha256 | |
78 | (base32 | |
15475f0c | 79 | "1x5hb97zbvkm73q53ydp1gwj8nnznm72q9c4rm6ny7phr995l3db")) |
d30e578a LC |
80 | (modules '((guix build utils))) |
81 | (snippet | |
82 | ;; Ensure reproducibility. | |
6cbee49d MW |
83 | '(begin |
84 | (substitute* (find-files "cgi" "\\.c$") | |
85 | (("__DATE__") "\"1970-01-01\"") | |
86 | (("__TIME__") "\"00:00:00\"")) | |
87 | #t)))) | |
d30e578a | 88 | (build-system gnu-build-system) |
7fc2d377 | 89 | (native-inputs |
8394619b | 90 | (list unzip)) |
d30e578a LC |
91 | (inputs |
92 | `(("zlib" ,zlib) | |
93 | ("libpng-apng" ,libpng) | |
94 | ("gd" ,gd) | |
95 | ("perl" ,perl) | |
96 | ("mailutils" ,mailutils))) | |
97 | (arguments | |
98 | '(#:configure-flags (list "--sysconfdir=/etc" | |
99 | ||
100 | ;; 'include/locations.h.in' defines file | |
101 | ;; locations, and many things go directly under | |
102 | ;; LOCALSTATEDIR, hence the extra '/nagios'. | |
103 | "--localstatedir=/var/nagios" | |
104 | ||
105 | (string-append | |
106 | "--with-mail=" | |
107 | (assoc-ref %build-inputs "mailutils") | |
108 | "/bin/mail")) | |
109 | #:make-flags '("all") | |
110 | #:phases (modify-phases %standard-phases | |
111 | (add-before 'build 'do-not-chown-to-nagios | |
112 | (lambda _ | |
113 | ;; Makefiles do 'install -o nagios -g nagios', which | |
114 | ;; doesn't work for us. | |
115 | (substitute* (find-files "." "^Makefile$") | |
116 | (("-o nagios -g nagios") | |
117 | "")) | |
118 | #t)) | |
119 | (add-before 'build 'do-not-create-sysconfdir | |
120 | (lambda _ | |
121 | ;; Don't try to create /var upon 'make install'. | |
122 | (substitute* "Makefile" | |
123 | (("\\$\\(INSTALL\\).*\\$\\(LOGDIR\\).*$" all) | |
124 | (string-append "# " all)) | |
125 | (("\\$\\(INSTALL\\).*\\$\\(CHECKRESULTDIR\\).*$" all) | |
126 | (string-append "# " all)) | |
127 | (("chmod g\\+s.*" all) | |
128 | (string-append "# " all))) | |
129 | #t)) | |
130 | (add-before 'build 'set-html/php-directory | |
131 | (lambda _ | |
132 | ;; Install HTML and PHP files under 'share/nagios/html' | |
133 | ;; instead of just 'share/'. | |
134 | (substitute* '("html/Makefile" "Makefile") | |
135 | (("HTMLDIR=.*$") | |
136 | "HTMLDIR = $(datarootdir)/nagios/html\n")) | |
137 | #t))) | |
138 | #:tests? #f)) ;no 'check' target or similar | |
139 | (home-page "https://www.nagios.org/") | |
140 | (synopsis "Host, service, and network monitoring program") | |
141 | (description | |
142 | "Nagios is a host, service, and network monitoring program written in C. | |
143 | CGI programs are included to allow you to view the current status, history, | |
144 | etc. via a Web interface. Features include: | |
145 | ||
146 | @itemize | |
147 | @item Monitoring of network services (via SMTP, POP3, HTTP, PING, etc). | |
148 | @item Monitoring of host resources (processor load, disk usage, etc.). | |
149 | @item A plugin interface to allow for user-developed service monitoring | |
150 | methods. | |
151 | @item Ability to define network host hierarchy using \"parent\" hosts, | |
152 | allowing detection of and distinction between hosts that are down | |
153 | and those that are unreachable. | |
154 | @item Notifications when problems occur and get resolved (via email, | |
155 | pager, or user-defined method). | |
156 | @item Ability to define event handlers for proactive problem resolution. | |
157 | @item Automatic log file rotation/archiving. | |
158 | @item Optional web interface for viewing current network status, | |
159 | notification and problem history, log file, etc. | |
160 | @end itemize\n") | |
161 | (license license:gpl2))) | |
c8cee2ef | 162 | |
ead46692 OP |
163 | (define-public zabbix-agentd |
164 | (package | |
165 | (name "zabbix-agentd") | |
dda88cda | 166 | (version "5.2.6") |
ead46692 OP |
167 | (source |
168 | (origin | |
169 | (method url-fetch) | |
170 | (uri (string-append | |
be683576 OP |
171 | "https://cdn.zabbix.com/zabbix/sources/stable/" |
172 | (version-major+minor version) "/zabbix-" version ".tar.gz")) | |
ead46692 | 173 | (sha256 |
dda88cda | 174 | (base32 "100n1rv7r4pqagxxifzpcza5bhrr2fklzx7gndxwiyq4597p1jvn")))) |
ead46692 OP |
175 | (build-system gnu-build-system) |
176 | (arguments | |
177 | `(#:configure-flags | |
178 | (list "--enable-agent" | |
868e3088 | 179 | "--enable-ipv6" |
ead46692 OP |
180 | (string-append "--with-iconv=" |
181 | (assoc-ref %build-inputs "libiconv")) | |
182 | (string-append "--with-libpcre=" | |
183 | (assoc-ref %build-inputs "pcre"))))) | |
184 | (inputs | |
8394619b | 185 | (list libiconv pcre)) |
ead46692 OP |
186 | (home-page "https://www.zabbix.com/") |
187 | (synopsis "Distributed monitoring solution (client-side agent)") | |
188 | (description "This package provides a distributed monitoring | |
189 | solution (client-side agent)") | |
190 | (license license:gpl2))) | |
191 | ||
192 | (define-public zabbix-server | |
193 | (package | |
194 | (inherit zabbix-agentd) | |
195 | (name "zabbix-server") | |
2c9ac839 | 196 | (outputs '("out" "front-end" "schema")) |
ead46692 OP |
197 | (arguments |
198 | (substitute-keyword-arguments | |
199 | `(#:phases | |
200 | (modify-phases %standard-phases | |
2c9ac839 | 201 | (add-after 'install 'install-front-end |
ead46692 | 202 | (lambda* (#:key outputs #:allow-other-keys) |
2c9ac839 | 203 | (let* ((php (string-append (assoc-ref outputs "front-end") |
ead46692 OP |
204 | "/share/zabbix/php")) |
205 | (front-end-conf (string-append php "/conf")) | |
206 | (etc (string-append php "/etc"))) | |
207 | (mkdir-p php) | |
be683576 | 208 | (copy-recursively "ui" php) |
2c9ac839 | 209 | ;; Make front-end write config to ‘/etc/zabbix’ directory. |
ead46692 OP |
210 | (rename-file front-end-conf |
211 | (string-append front-end-conf "-example")) | |
2c9ac839 OP |
212 | (symlink "/etc/zabbix" front-end-conf)) |
213 | #t)) | |
214 | (add-after 'install 'install-schema | |
215 | (lambda* (#:key outputs #:allow-other-keys) | |
216 | (let ((database-directory | |
217 | (string-append (assoc-ref outputs "schema") | |
218 | "/database"))) | |
219 | (for-each delete-file | |
220 | (find-files "database" "Makefile\\.in|\\.am$")) | |
221 | (mkdir-p database-directory) | |
222 | (copy-recursively "database" database-directory)) | |
223 | #t))) | |
ead46692 OP |
224 | ,@(package-arguments zabbix-agentd)) |
225 | ((#:configure-flags flags) | |
226 | `(cons* "--enable-server" | |
227 | "--with-postgresql" | |
228 | (string-append "--with-libevent=" | |
229 | (assoc-ref %build-inputs "libevent")) | |
230 | "--with-net-snmp" | |
231 | (string-append "--with-gnutls=" | |
232 | (assoc-ref %build-inputs "gnutls")) | |
233 | "--with-libcurl" | |
f2f95601 OP |
234 | (string-append "--with-zlib=" |
235 | (assoc-ref %build-inputs "zlib")) | |
ead46692 OP |
236 | ,flags)))) |
237 | (inputs | |
8394619b LC |
238 | (modify-inputs (package-inputs zabbix-agentd) |
239 | (prepend curl | |
240 | libevent | |
241 | gnutls | |
242 | postgresql | |
243 | zlib | |
244 | net-snmp | |
245 | curl))) | |
ead46692 OP |
246 | (synopsis "Distributed monitoring solution (server-side)") |
247 | (description "This package provides a distributed monitoring | |
248 | solution (server-side)"))) | |
249 | ||
d9a7727d MB |
250 | (define-public zabbix-cli |
251 | (package | |
252 | (name "zabbix-cli") | |
253 | (version "2.2.1") | |
254 | (source (origin | |
255 | (method git-fetch) | |
256 | (uri (git-reference | |
257 | (url "https://github.com/unioslo/zabbix-cli") | |
258 | (commit version))) | |
259 | (file-name (git-file-name name version)) | |
260 | (sha256 | |
261 | (base32 | |
262 | "0wzmrn8p09ksqhhgawr179c4az7p2liqr0l4q2dra62bxliawyqz")))) | |
263 | (build-system python-build-system) | |
264 | (arguments | |
265 | '(#:phases (modify-phases %standard-phases | |
266 | (add-after 'unpack 'use-absolute-ncurses | |
267 | (lambda _ | |
268 | (substitute* "bin/zabbix-cli" | |
269 | (("'clear'") | |
270 | (string-append "'" (which "clear") "'"))))) | |
271 | (add-after 'unpack 'patch-setup.py | |
272 | (lambda _ | |
273 | ;; Install data_files to $out/share instead of /usr/share. | |
274 | (substitute* "setup.py" | |
275 | (("/usr/") ""))))))) | |
276 | (inputs | |
277 | `(("clear" ,ncurses) | |
278 | ("python-requests" ,python-requests))) | |
279 | (home-page "https://github.com/unioslo/zabbix-cli") | |
280 | (synopsis "Command-line interface to Zabbix") | |
281 | (description | |
282 | "@command{zabbix-cli} is a command-line client for the Zabbix | |
283 | monitoring system. It can configure and display various aspects of Zabbix | |
284 | through a text-based interface.") | |
285 | (license license:gpl3+))) | |
286 | ||
8bde37b0 MB |
287 | (define-public python-pyzabbix |
288 | (package | |
289 | (name "python-pyzabbix") | |
290 | (version "0.8.2") | |
c17e6604 | 291 | (home-page "https://github.com/lukecyca/pyzabbix") |
8bde37b0 MB |
292 | ;; No tests on PyPI, use the git checkout. |
293 | (source | |
294 | (origin | |
295 | (method git-fetch) | |
296 | (uri (git-reference (url home-page) (commit version))) | |
297 | (file-name (git-file-name name version)) | |
298 | (sha256 | |
299 | (base32 | |
300 | "15rrnpkv94wx6748hh4sd120v6x25rkbd6vlz6hfrhvjwxz5lgjl")))) | |
301 | (build-system python-build-system) | |
302 | (arguments | |
303 | '(#:phases (modify-phases %standard-phases | |
304 | (add-after 'unpack 'patch | |
305 | (lambda _ | |
306 | ;; Permit newer versions of httpretty. | |
307 | (substitute* "setup.py" | |
308 | (("httpretty<0\\.8\\.7") | |
309 | "httpretty")))) | |
310 | (replace 'check | |
311 | (lambda* (#:key tests? #:allow-other-keys) | |
312 | (if tests? | |
313 | (invoke "python" "setup.py" "nosetests") | |
314 | (format #t "test suite not run~"))))))) | |
315 | (native-inputs | |
8394619b LC |
316 | (list ;; For tests. |
317 | python-httpretty python-nose)) | |
8bde37b0 | 318 | (propagated-inputs |
8394619b | 319 | (list python-requests)) |
8bde37b0 MB |
320 | (synopsis "Python interface to the Zabbix API") |
321 | (description | |
322 | "@code{pyzabbix} is a Python module for working with the Zabbix API.") | |
323 | (license license:lgpl2.1+))) | |
324 | ||
c8cee2ef SB |
325 | (define-public darkstat |
326 | (package | |
327 | (name "darkstat") | |
328 | (version "3.0.719") | |
329 | (source (origin | |
330 | (method url-fetch) | |
331 | (uri (string-append "https://unix4lyfe.org/darkstat/darkstat-" | |
332 | version ".tar.bz2")) | |
333 | (sha256 | |
334 | (base32 | |
335 | "1mzddlim6dhd7jhr4smh0n2fa511nvyjhlx76b03vx7phnar1bxf")))) | |
336 | (build-system gnu-build-system) | |
337 | (arguments '(#:tests? #f)) ; no tests | |
338 | (inputs | |
8394619b | 339 | (list libpcap zlib)) |
c8cee2ef SB |
340 | (home-page "https://unix4lyfe.org/darkstat/") |
341 | (synopsis "Network statistics gatherer") | |
342 | (description | |
343 | "@command{darkstat} is a packet sniffer that runs as a background process, | |
344 | gathers all sorts of statistics about network usage, and serves them over | |
345 | HTTP. Features: | |
346 | ||
347 | @itemize | |
348 | @item Traffic graphs, reports per host, shows ports for each host. | |
349 | @item Embedded web-server with deflate compression. | |
350 | @item Asynchronous reverse DNS resolution using a child process. | |
351 | @item Small. Portable. Single-threaded. Efficient. | |
352 | @item Supports IPv6. | |
353 | @end itemize") | |
354 | (license license:gpl2))) | |
4d92c210 RW |
355 | |
356 | (define-public python-whisper | |
357 | (package | |
358 | (name "python-whisper") | |
a2584a08 | 359 | (version "1.1.8") |
4d92c210 RW |
360 | (source |
361 | (origin | |
362 | (method url-fetch) | |
363 | (uri (pypi-uri "whisper" version)) | |
364 | (sha256 | |
365 | (base32 | |
a2584a08 | 366 | "1bk29w09zcpsv8hp0g0al7nwrxa07z0ycls3mbh83wfavk83aprl")))) |
4d92c210 | 367 | (build-system python-build-system) |
a2584a08 | 368 | (native-inputs (list python-six)) |
4d92c210 RW |
369 | (home-page "http://graphiteapp.org/") |
370 | (synopsis "Fixed size round-robin style database for Graphite") | |
371 | (description "Whisper is one of three components within the Graphite | |
372 | project. Whisper is a fixed-size database, similar in design and purpose to | |
373 | RRD (round-robin-database). It provides fast, reliable storage of numeric | |
374 | data over time. Whisper allows for higher resolution (seconds per point) of | |
375 | recent data to degrade into lower resolutions for long-term retention of | |
376 | historical data.") | |
377 | (license license:asl2.0))) | |
378 | ||
7816a81a | 379 | (define-public python-carbon |
a15181bb | 380 | (package |
7816a81a MC |
381 | (name "python-carbon") |
382 | (version "1.1.8") | |
a15181bb RW |
383 | (source |
384 | (origin | |
385 | (method url-fetch) | |
386 | (uri (pypi-uri "carbon" version)) | |
387 | (sha256 | |
388 | (base32 | |
7816a81a | 389 | "1wb91fipk1niciffq5xwqbh8g7rl7ghdam4m97cjbig12i5qr4cm")))) |
a15181bb RW |
390 | (build-system python-build-system) |
391 | (arguments | |
7816a81a | 392 | `(#:phases |
a15181bb RW |
393 | (modify-phases %standard-phases |
394 | ;; Don't install to /opt | |
395 | (add-after 'unpack 'do-not-install-to-/opt | |
396 | (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1") #t))))) | |
397 | (propagated-inputs | |
8394619b | 398 | (list python-cachetools python-txamqp python-urllib3 python-whisper)) |
a15181bb RW |
399 | (home-page "http://graphiteapp.org/") |
400 | (synopsis "Backend data caching and persistence daemon for Graphite") | |
401 | (description "Carbon is a backend data caching and persistence daemon for | |
402 | Graphite. Carbon is responsible for receiving metrics over the network, | |
403 | caching them in memory for \"hot queries\" from the Graphite-Web application, | |
404 | and persisting them to disk using the Whisper time-series library.") | |
405 | (license license:asl2.0))) | |
e7a30ded | 406 | |
94e7335e | 407 | (define-public graphite-web |
e7a30ded | 408 | (package |
94e7335e MB |
409 | (name "graphite-web") |
410 | (version "1.1.7") | |
e7a30ded RW |
411 | (source |
412 | (origin | |
413 | (method url-fetch) | |
414 | (uri (pypi-uri "graphite-web" version)) | |
415 | (sha256 | |
416 | (base32 | |
94e7335e | 417 | "1l5a5rry9cakqxamvlx4xq63jifmncb6815bg9vy7fg1zyd3pjxk")))) |
e7a30ded RW |
418 | (build-system python-build-system) |
419 | (arguments | |
94e7335e | 420 | `(#:tests? #f ;XXX: not in PyPI release & requires database |
e7a30ded RW |
421 | #:phases |
422 | (modify-phases %standard-phases | |
423 | (add-after 'unpack 'relax-requirements | |
424 | (lambda _ | |
425 | (substitute* "setup.py" | |
94e7335e MB |
426 | ;; Allow newer versions of django-tagging. |
427 | (("django-tagging==") | |
428 | "django-tagging>=")) | |
e7a30ded RW |
429 | #t)) |
430 | ;; Don't install to /opt | |
431 | (add-after 'unpack 'do-not-install-to-/opt | |
432 | (lambda _ (setenv "GRAPHITE_NO_PREFIX" "1") #t))))) | |
433 | (propagated-inputs | |
8394619b LC |
434 | (list python-cairocffi |
435 | python-pytz | |
436 | python-whisper | |
437 | python-django-2.2 | |
438 | python-django-tagging | |
439 | python-scandir | |
440 | python-urllib3 | |
441 | python-pyparsing | |
442 | python-txamqp)) | |
94e7335e | 443 | (home-page "https://graphiteapp.org/") |
e7a30ded RW |
444 | (synopsis "Scalable realtime graphing system") |
445 | (description "Graphite is a scalable real-time graphing system that does | |
446 | two things: store numeric time-series data, and render graphs of this data on | |
447 | demand.") | |
448 | (license license:asl2.0))) | |
fb6f35ba CB |
449 | |
450 | (define-public python-prometheus-client | |
451 | (package | |
452 | (name "python-prometheus-client") | |
1518b4bc | 453 | (version "0.7.1") |
fb6f35ba CB |
454 | (source |
455 | (origin | |
456 | (method url-fetch) | |
457 | (uri (pypi-uri "prometheus_client" version)) | |
458 | (sha256 | |
1518b4bc | 459 | (base32 "1ni2yv4ixwz32nz39ckia76lvggi7m19y5f702w5qczbnfi29kbi")))) |
fb6f35ba CB |
460 | (build-system python-build-system) |
461 | (arguments | |
462 | '(;; No included tests. | |
463 | #:tests? #f)) | |
05b4b3ea | 464 | (propagated-inputs |
8394619b | 465 | (list python-twisted)) |
fb6f35ba CB |
466 | (home-page |
467 | "https://github.com/prometheus/client_python") | |
468 | (synopsis "Python client for the Prometheus monitoring system") | |
469 | (description | |
470 | "The @code{prometheus_client} package supports exposing metrics from | |
471 | software written in Python, so that they can be scraped by a Prometheus | |
472 | service. | |
473 | ||
474 | Metrics can be exposed through a standalone web server, or through Twisted, | |
475 | WSGI and the node exporter textfile collector.") | |
476 | (license license:asl2.0))) | |
477 | ||
780205a0 | 478 | (define-public go-github-com-prometheus-node-exporter |
412622ad GB |
479 | (package |
480 | (name "go-github-com-prometheus-node-exporter") | |
481 | (version "0.18.1") | |
482 | (source (origin | |
483 | (method git-fetch) | |
484 | (uri (git-reference | |
b0e7b699 | 485 | (url "https://github.com/prometheus/node_exporter") |
412622ad GB |
486 | (commit (string-append "v" version)))) |
487 | (file-name (git-file-name name version)) | |
488 | (sha256 | |
489 | (base32 | |
490 | "0s3sp1gj86p7npxl38hkgs6ymd3wjjmc5hydyg1b5wh0x3yvpx07")))) | |
491 | (build-system go-build-system) | |
492 | (arguments | |
493 | '(#:import-path "github.com/prometheus/node_exporter")) | |
494 | (synopsis "Prometheus exporter for hardware and OS metrics") | |
495 | (description "Prometheus exporter for metrics exposed by *NIX kernels, | |
780205a0 | 496 | written in Go with pluggable metric collectors.") |
412622ad GB |
497 | (home-page "https://github.com/prometheus/node_exporter") |
498 | (license license:asl2.0))) | |
64eb038e | 499 | |
5c7874ad CB |
500 | (define-public temper-exporter |
501 | (let ((commit "a87bbab19c05609d62d9e4c7941178700c1ef84d") | |
502 | (revision "0")) | |
503 | (package | |
504 | (name "temper-exporter") | |
505 | (version (git-version "0" revision commit)) | |
506 | (source (origin | |
507 | (method git-fetch) | |
508 | (uri (git-reference | |
509 | (url "https://github.com/yrro/temper-exporter") | |
510 | (commit commit))) | |
511 | (file-name (git-file-name name version)) | |
512 | (sha256 | |
513 | (base32 | |
514 | "0jk3ydi8s14q5kyl9j3gm2zrnwlb1jwjqpg5vqrgkbm9jrldrabc")))) | |
515 | (build-system python-build-system) | |
516 | (arguments | |
517 | '(#:tests? #f ; One test failure: | |
518 | ; test/test_exporter.py:33: | |
519 | ; AssertionError | |
520 | #:phases | |
521 | (modify-phases %standard-phases | |
522 | (add-after 'unpack 'patch-setup.py | |
523 | (lambda _ | |
524 | (substitute* "setup.py" | |
525 | (("git_ref = .*\n") "git_ref = ''\n")) | |
526 | #t)) | |
527 | (add-after 'install 'install-udev-rules | |
528 | (lambda* (#:key outputs #:allow-other-keys) | |
529 | (install-file "debian/prometheus-temper-exporter.udev" | |
530 | (string-append (assoc-ref outputs "out") | |
531 | "/lib/udev/rules.d")) | |
532 | #t))))) | |
533 | (inputs | |
8394619b | 534 | (list python-prometheus-client python-pyudev)) |
5c7874ad | 535 | (native-inputs |
8394619b | 536 | (list python-pytest python-pytest-mock python-pytest-runner)) |
5c7874ad CB |
537 | (home-page "https://github.com/yrro/temper-exporter") |
538 | (synopsis "Prometheus exporter for PCSensor TEMPer sensor devices") | |
539 | (description | |
540 | "This package contains a Prometheus exporter for the TEMPer sensor | |
541 | devices.") | |
542 | (license license:expat)))) | |
543 | ||
64eb038e DM |
544 | (define-public fswatch |
545 | (package | |
546 | (name "fswatch") | |
b6d2e601 | 547 | (version "1.15.0") |
64eb038e DM |
548 | (source (origin |
549 | (method git-fetch) | |
550 | (uri (git-reference | |
b0e7b699 | 551 | (url "https://github.com/emcrisostomo/fswatch") |
64eb038e | 552 | (commit version))) |
63968297 | 553 | (file-name (git-file-name name version)) |
64eb038e DM |
554 | (sha256 |
555 | (base32 | |
b6d2e601 | 556 | "1yz65jsbgdx4cmy16x24wz5di352lvyi7fp6jm90bhgl1vpzxlsx")))) |
64eb038e DM |
557 | (build-system gnu-build-system) |
558 | (native-inputs | |
e3196755 | 559 | (list autoconf automake gettext-minimal libtool)) |
64eb038e DM |
560 | (synopsis "File system monitor") |
561 | (description "This package provides a file system monitor.") | |
562 | (home-page "https://github.com/emcrisostomo/fswatch") | |
563 | (license license:gpl3+))) | |
bc2529cb LDB |
564 | |
565 | (define-public collectd | |
566 | (package | |
567 | (name "collectd") | |
1b52adf0 | 568 | (version "5.12.0") |
bc2529cb LDB |
569 | (source (origin |
570 | (method url-fetch) | |
571 | (uri (string-append | |
572 | "https://storage.googleapis.com/collectd-tarballs/collectd-" | |
573 | version | |
574 | ".tar.bz2")) | |
575 | (sha256 | |
576 | (base32 | |
1b52adf0 | 577 | "1mh97afgq6qgmpvpr84zngh58m0sl1b4wimqgvvk376188q09bjv")) |
bc2529cb LDB |
578 | (patches (search-patches "collectd-5.11.0-noinstallvar.patch")))) |
579 | (build-system gnu-build-system) | |
580 | (arguments | |
581 | `(#:configure-flags (list "--localstatedir=/var" "--sysconfdir=/etc") | |
582 | #:phases (modify-phases %standard-phases | |
583 | (add-before 'configure 'autoreconf | |
584 | (lambda _ | |
585 | ;; Required because of patched sources. | |
586 | (invoke "autoreconf" "-vfi")))))) | |
587 | (inputs | |
8394619b | 588 | (list rrdtool curl libyajl)) |
bc2529cb | 589 | (native-inputs |
8394619b | 590 | (list autoconf automake libtool pkg-config)) |
bc2529cb LDB |
591 | (home-page "https://collectd.org/") |
592 | (synopsis "Collect system and application performance metrics periodically") | |
593 | (description | |
594 | "collectd gathers metrics from various sources such as the operating system, | |
595 | applications, log files and external devices, and stores this information or | |
596 | makes it available over the network. Those statistics can be used to monitor | |
597 | systems, find performance bottlenecks (i.e., performance analysis) and predict | |
598 | future system load (i.e., capacity planning).") | |
599 | ;; license:expat for the daemon in src/daemon/ and some plugins, | |
600 | ;; license:gpl2 for other plugins | |
601 | (license (list license:expat license:gpl2)))) | |
602 | ||
803be097 SR |
603 | (define-public hostscope |
604 | (package | |
605 | (name "hostscope") | |
606 | (version "8.0") | |
607 | (source (origin | |
608 | (method url-fetch) | |
609 | (uri (string-append | |
610 | "http://www.maier-komor.de/hostscope/hostscope-V" | |
611 | version ".tgz")) | |
612 | (sha256 | |
613 | (base32 | |
614 | "0jw6yij8va0f292g4xkf9lp9sxkzfgv67ajw49g3vq42q47ld7cv")))) | |
615 | (build-system gnu-build-system) | |
8394619b | 616 | (inputs (list ncurses)) |
803be097 SR |
617 | (arguments '(#:tests? #f)) ;; No included tests. |
618 | (home-page "http://www.maier-komor.de/hostscope.html") | |
ca1caf9c | 619 | (properties `((release-monitoring-url . ,home-page))) |
803be097 SR |
620 | (synopsis |
621 | "System monitoring tool for multiple hosts") | |
622 | (description | |
623 | "HostScope displays key system metrics of Linux hosts, such as detailed | |
624 | CPU load, speed and temperature, I/O rates of network interfaces, I/O rates of | |
625 | disks, and user process summary information. All metrics are multicast on the | |
626 | LAN, if wanted, and clients can switch between multiple hosts on the network. | |
627 | Hostscope features a bridge to Influx DB. So Grafana can be used to visualize | |
628 | the recorded data over time.") | |
629 | (license license:gpl3+))) | |
45bb3470 RM |
630 | |
631 | (define-public fatrace | |
632 | (package | |
633 | (name "fatrace") | |
634 | (version "0.16.3") | |
635 | (source (origin | |
636 | (method git-fetch) | |
637 | (uri (git-reference | |
638 | (url "https://github.com/martinpitt/fatrace") | |
639 | (commit version))) | |
640 | (file-name (git-file-name name version)) | |
641 | (sha256 | |
642 | (base32 | |
643 | "1bxz6v1z0icp716jnv3knjyqp8bv6xnkz8gqd8z3g2b6yxj5xff3")))) | |
644 | (build-system gnu-build-system) | |
645 | (arguments | |
646 | `(#:phases | |
647 | (modify-phases %standard-phases | |
648 | (delete 'configure) | |
649 | ;; tests need root to run as root, | |
650 | ;; and there is no make target for them: | |
651 | (delete 'check)) | |
652 | #:make-flags | |
653 | (list (string-append "CC=" ,(cc-for-target)) | |
654 | (string-append "PREFIX=" %output)))) | |
655 | (synopsis "File access events monitor") | |
656 | (description "This package provides a utility to report system wide file | |
657 | access events from all running processes. Its main purpose is to find | |
658 | processes which keep waking up the disk unnecessarily and thus prevent some | |
659 | power saving.") | |
660 | (home-page "https://github.com/martinpitt/fatrace") | |
661 | (license license:gpl3+))) |