[PATCH] Add collectd

  • Done
  • quality assurance status badge
Details
2 participants
  • Lars-Dominik Braun
  • Ludovic Courtès
Owner
unassigned
Submitted by
Lars-Dominik Braun
Severity
normal
L
L
Lars-Dominik Braun wrote on 28 Apr 2020 10:57
(address . guix-patches@gnu.org)
20200428085719.GA3395@zpidnp36
Hi,

the attached patch adds the monitoring software “collectd”. Its configuration
is quite minimal right now. A lot of plugins are not enabled, because they
introduce many external dependencies. I’m sure that can be fixed easily if
there’s demand though.

I’ve been running the package in production for a week now without any problems
(via systemd on a foreign distribution, thus no herd service).

Cheers,
Lars
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl6n7+sACgkQQhN3ARo3
hEZ65Av/adGsMX28YmCrKFZgexCAvcuPBwyiRelGiVztVTHh0B/idip0S+cBHP0Y
GoE6pyPKOWc6EELgbSvrWhUVGC7zQXVaTAablN/9oBFu+J2egbxpneYv2ujLIqdw
iWZ/iZLBVdCDRWBpwvHmL4Q0OK0sbNpAEzxBkXsO/4iW+NGQXc2dseCuOprtBg/K
889AC5ZroTHV5iCzTL8z8lZvwM3XSK67cb8ptCaGwlcQpOC6TdP8s9CUe3gZRKVj
+9jCfF5TUoE8TJBJ1z4mfaEUKuE7+jSGfUrUeqtvSG4Wl6TDL0wQPgjTuzhMFGgX
uO6LYU3ED+OGyfzf5gTtQ7twUs82sypX1tXGq3qx08dNW4XpYj+W4n0vSy6KY0ql
VS69awldJUwxUknqv76RuAZ4dWs5FjPdUU+4PWlQuyV/ntarW0sp91OduvHkx18z
nncSbaQkjdQ9nTF2ztobzSXdgNbcV3rhKCDg9LXPXnahLyU6eU9lVvFGXZzc6e9U
JPC0Z1A4
=eaZL
-----END PGP SIGNATURE-----


L
L
Lars-Dominik Braun wrote on 28 Apr 2020 11:29
(address . 40925@debbugs.gnu.org)
20200428092938.GB3395@zpidnp36
Hi,

totally forgot to attach the patch. Here it is.

Lars
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl6n938ACgkQQhN3ARo3
hEaLsgv9GEw/3pNRAqgA01KWS7qwDaEbLoOQtvcafAJOr4hacO5WiTAzEon4wi6H
inOkDrQgZ53n+QijEtUMUdwrYlXzM4m8od8J5cMO0BKmv35ke3ROODwXbqZwW/39
WI3HMaxF7CgfhJNHXZEvPfVObpT8+jFEiOMz37oT1RWnoc+7kMrSoUDiGdFH8OhD
1Vks/Gkdijq7EWD5Aif6PGrxpfl7EOgkuUyGDH3Cj+/nmk+Sa4u5U7wiFwolfxAE
dC2poLtHSfIFPiXLPyTTmyo3rAFO61fPn33bgyuXELr77a2oLKPzy5HOEPCh4hKK
RG+zFIUZDQ6ZfcQbCecZHni/KBGab13I+/vcdJpj4JnaB8c+wShXik1UYkO/TTYD
pj7q6OO760zwpTHvy9RPQmtG1Dmsx5g5cxKzK8ay23Xj9B2eIWQCWTtJbRhDxEU7
2PnOh5an5Ig7o4E6c4QTPDz80YZEDM1gFIKClZem4M0lrtqy8oAAglBoNKCEoOJm
ozgr3u8i
=M20o
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 1 May 2020 01:08
Re: [bug#40925] [PATCH] Add collectd
(name . Lars-Dominik Braun)(address . ldb@leibniz-psychology.org)(address . 40925@debbugs.gnu.org)
87wo5winax.fsf@gnu.org
Hi,

Lars-Dominik Braun <ldb@leibniz-psychology.org> skribis:

Toggle quote (9 lines)
> From 05110cd7f0af5f870daa48a1e32bff56efb2676a Mon Sep 17 00:00:00 2001
> From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
> Date: Tue, 28 Apr 2020 10:50:10 +0200
> Subject: [PATCH] gnu: Add collectd
>
> * gnu/packages/monitoring.scm (collectd): New variable
> * gnu/local.mk (dist_patch_DATA): Add new patch
> * gnu/packages/patches/collectd-5.11.0-noinstallvar.patch: New file

[...]

Toggle quote (8 lines)
> + (arguments
> + `(#:configure-flags (list "--localstatedir=/var" "--sysconfdir=/etc")
> + #:phases
> + (modify-phases %standard-phases
> + ;; Required because of patched sources.
> + (add-before 'configure 'autoreconf
> + (lambda _ (invoke "autoreconf" "-vfi") #t)))))

Another option is to patch Makefile.in to avoid the dependency on
Autoconf/Automake/Libool + this phase.

Toggle quote (2 lines)
> + (license '(licenses:expat licenses:gpl2))))

This is incorrect (see patch below, which also includes indentation
fixes and minor changes to the description to placate ‘guix lint’.)

Also, could you add a comment stating whether it’s dual-licensing or
just that there’s code in both licenses?

Toggle quote (6 lines)
> diff --git a/gnu/packages/patches/collectd-5.11.0-noinstallvar.patch b/gnu/packages/patches/collectd-5.11.0-noinstallvar.patch
> new file mode 100644
> index 0000000000..a8ca142147
> --- /dev/null
> +++ b/gnu/packages/patches/collectd-5.11.0-noinstallvar.patch

A one-line comment at the top explaining what it does would be great.

Otherwise LGTM. Could you send an updated patch?

Thanks in advance!

Ludo’.
L
L
Ludovic Courtès wrote on 1 May 2020 01:10
(name . Lars-Dominik Braun)(address . ldb@leibniz-psychology.org)(address . 40925@debbugs.gnu.org)
87sggkin8y.fsf@gnu.org
I too forgot the patch. :-)
Toggle diff (37 lines)
diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm
index 5a37b14328..7ee58f0d0c 100644
--- a/gnu/packages/monitoring.scm
+++ b/gnu/packages/monitoring.scm
@@ -467,11 +467,11 @@ written in Go with pluggable metric collectors.")
(build-system gnu-build-system)
(arguments
`(#:configure-flags (list "--localstatedir=/var" "--sysconfdir=/etc")
- #:phases
- (modify-phases %standard-phases
- ;; Required because of patched sources.
- (add-before 'configure 'autoreconf
- (lambda _ (invoke "autoreconf" "-vfi") #t)))))
+ #:phases (modify-phases %standard-phases
+ (add-before 'configure 'autoreconf
+ (lambda _
+ ;; Required because of patched sources.
+ (invoke "autoreconf" "-vfi"))))))
(inputs
`(("rrdtool" ,rrdtool)
("curl" ,curl)))
@@ -483,10 +483,10 @@ written in Go with pluggable metric collectors.")
(home-page "https://collectd.org/")
(synopsis "Collect system and application performance metrics periodically")
(description
- "collectd gathers metrics from various sources, e.g. the operating system,
-applications, logfiles and external devices, and stores this information or
-makes it available over the network. Those statistics can be used to monitor
-systems, find performance bottlenecks (i.e. performance analysis) and predict
-future system load (i.e. capacity planning).")
- (license '(licenses:expat licenses:gpl2))))
+ "collectd gathers metrics from various sources such as the operating system,
+applications, log files and external devices, and stores this information or
+makes it available over the network. Those statistics can be used to monitor
+systems, find performance bottlenecks (i.e., performance analysis) and predict
+future system load (i.e., capacity planning).")
+ (license (list license:expat license:gpl2))))
L
L
Lars-Dominik Braun wrote on 4 May 2020 08:06
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40925@debbugs.gnu.org)
20200504060629.GA3179@zpidnp36
Hi Ludo,

Toggle quote (2 lines)
> Another option is to patch Makefile.in to avoid the dependency on
> Autoconf/Automake/Libool + this phase.
it’s only a native-input, so should be fine?

Toggle quote (2 lines)
> This is incorrect (see patch below, which also includes indentation
> fixes and minor changes to the description to placate ‘guix lint’.)
My bad, forgot to run it :(

Toggle quote (2 lines)
> Also, could you add a comment stating whether it’s dual-licensing or
> just that there’s code in both licenses?
Done.

Toggle quote (1 lines)
> A one-line comment at the top explaining what it does would be great.
Done.

Toggle quote (1 lines)
> Otherwise LGTM. Could you send an updated patch?
See attachment. I’ve also enabled the plugin curl_json, which depends on
libyajl.

Cheers,
Lars
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl6vsOEACgkQQhN3ARo3
hEaoHwv/ZeGpGSFCY8alsX3AP8CjzW+iXP1TXd4etXSLiHES8X88oO3X8tDJuNPF
///t2U01vHiRiCv6F4yyn+FSUzQUrVBcfOHTOw7OHRmevKh6oBDPtVz37X9ZENYb
Ww2Dwwx18npr3BJ9xZjI4+zo0VVd5LmqRXEHit5p3MaDppuBGPep9Xbw7P5WsXgH
1MDHE3LzhlU3Curgoei60pzs0we4tZH5qDupNiHHbo41sriQedjGqVn1zId6YGTE
0ppWnQFCjEyDlc8KVgO9RakFvgtU6JR1SxBpDKG4/+RrAwMRghlGT4hx6kpjSBZP
yPfr0Dt4GTGcvjVLq7mf8if/kJ6Pl/6i4k4moCXP04QU9nzfOi19+8MUSE/GVC61
0WdKnrC/UZw7Zzp015x70bvV9oJmMqbS3rkSWiHXa0KagOkLN6XCcps36Z16wZHy
n6aZdM2Dn/tGCIO8WuBgXDADJO9JtbeOz9j4Ilaul/N4xa6oODx3P93OXvRXhMw1
P/5lvZuM
=WEb1
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 4 May 2020 11:52
(name . Lars-Dominik Braun)(address . ldb@leibniz-psychology.org)(address . 40925-done@debbugs.gnu.org)
87mu6orpqe.fsf@gnu.org
Hi,

Lars-Dominik Braun <ldb@leibniz-psychology.org> skribis:

Toggle quote (9 lines)
> From 4f7f52ff168ba63692cf0f73e344847ef1637566 Mon Sep 17 00:00:00 2001
> From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
> Date: Tue, 28 Apr 2020 10:50:10 +0200
> Subject: [PATCH] gnu: Add collectd
>
> * gnu/packages/monitoring.scm (collectd): New variable
> * gnu/local.mk (dist_patch_DATA): Add new patch
> * gnu/packages/patches/collectd-5.11.0-noinstallvar.patch: New file

Applied, thanks!

Ludo’.
Closed
?