GNU logs - #40738, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#40738] Prometheus (and Alertmanager)
Resent-From: Christopher Baines <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 20 Apr 2020 21:12:02 +0000
Resent-Message-ID: <handler.40738.B.15874170749536 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 40738
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: 
To: 40738 <at> debbugs.gnu.org
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.15874170749536
          (code B ref -1); Mon, 20 Apr 2020 21:12:02 +0000
Received: (at submit) by debbugs.gnu.org; 20 Apr 2020 21:11:14 +0000
Received: from localhost ([127.0.0.1]:48519 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQdhC-0002Tk-8L
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:11:14 -0400
Received: from lists.gnu.org ([209.51.188.17]:52837)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1jQdhA-0002Tb-3Z
 for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:11:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40714)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <mail@HIDDEN>) id 1jQdh9-0002zX-OS
 for guix-patches@HIDDEN; Mon, 20 Apr 2020 17:11:12 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,
 SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no
 version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <mail@HIDDEN>) id 1jQdh8-00017B-08
 for guix-patches@HIDDEN; Mon, 20 Apr 2020 17:11:10 -0400
Received: from mira.cbaines.net ([212.71.252.8]:60310)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <mail@HIDDEN>) id 1jQdh7-000124-GV
 for guix-patches@HIDDEN; Mon, 20 Apr 2020 17:11:09 -0400
Received: from localhost (unknown [46.237.173.52])
 by mira.cbaines.net (Postfix) with ESMTPSA id EFC4527BBE1
 for <guix-patches@HIDDEN>; Mon, 20 Apr 2020 22:11:07 +0100 (BST)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id 61ae5528
 for <guix-patches@HIDDEN>; Mon, 20 Apr 2020 21:11:05 +0000 (UTC)
User-agent: mu4e 1.2.0; emacs 26.3
From: Christopher Baines <mail@HIDDEN>
Date: Mon, 20 Apr 2020 22:11:03 +0100
Message-ID: <87v9lt50d4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@HIDDEN;
 helo=mira.cbaines.net
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/20 17:11:08
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From: 212.71.252.8
X-Spam-Score: 0.3 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--=-=-=
Content-Type: text/plain

I've had a go at packaging Prometheus and Alertmanager, as well as
writing Guix services for both of them.

The packages build, but still need quite a bit of work. They're both
written in Go, so the Git repositories not only include the relevant
source code, but the source code of the entire dependency tree (hence
the packages have no inputs). That'll need addressing.

I've tested the Prometheus service, and it seems to work, although there
isn't any record types for the Prometheus configuration yet. I haven't
yet tested the Alertmanager service and the system test doesn't pass, I
believe more configuration is required than Prometheus.

Having a Prometheus service would be a good complement for the existing
Prometheus Node exporter service in Guix.

I'll send the patches following this email.

Thanks,

Chris

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6eD+dfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XdmgBAArT9rLKl4NX8hZCBq4mD8/S4IhbNi4cBswFedk+sJetXvkRJcbd4Gk46u
NWEQawFBugmj6P30hhd53l6iIAu5GalDrt1VvX9UyQ+2YG0H+afSttAe8k0IgFKa
IBVCWBbNefAJHbClTw/VpmTVYG/hrS/Pgaq6wlkmvtFTL5APkDkOAV1IHgXsATAN
j5WlBbVu5Yf5vBg+tBXN809iRlDwBiuh4pCx41c92ccg8Fy5qwLHx38tAgqJVb48
V9tll+e6vHHLddGGYx0Bo/aJICzNsa/Y3ygbsnIAqYuZEzE7uPjjjdCGcFkyWC7I
N96nFq2ls4dtWzX8RzMuzsPHRmWoyKI8lPgl5JtEeyU71OjiWBQgReIM8ITqs+BV
6uR7eGbFAsIPEaDY94ThbxFCcCd3wavlROq0aWIkU4R0Mp6BaySr1olehY2YJte6
MBONPaijN8fAebmtqC8Sr99/x8EuAcMHpYuo03LaazKfP9SAr1ZaPwn4jsfkvZhH
QizF5IXH/fbUF/r765lPmic94BXi5ryTx9Oq/iAebV4vWFz5wacrWxMeNxEtcVV1
hrMvU2KMqm5wQ4/0IpiutmwYa8K3w52AcrUYPKgFkSVkywe38hkRPl6mFO/WCRpZ
+X69CkRHR37++OyGiLbbsOtT1w++OEAdyD9sQRtiSkzMVa0EeOE=
=qpP+
-----END PGP SIGNATURE-----
--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Christopher Baines <mail@HIDDEN>
Subject: bug#40738: Acknowledgement (Prometheus (and Alertmanager))
Message-ID: <handler.40738.B.15874170749536.ack <at> debbugs.gnu.org>
References: <87v9lt50d4.fsf@HIDDEN>
X-Gnu-PR-Message: ack 40738
X-Gnu-PR-Package: guix-patches
Reply-To: 40738 <at> debbugs.gnu.org
Date: Mon, 20 Apr 2020 21:12:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 40738 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
40738: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D40738
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 20 Apr 2020 21:15:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 20 17:15:38 2020
Received: from localhost ([127.0.0.1]:48524 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQdlR-0002ae-PA
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:15:38 -0400
Received: from mira.cbaines.net ([212.71.252.8]:33666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1jQdlP-0002aV-Mm
 for control <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:15:36 -0400
Received: from localhost (unknown [46.237.173.52])
 by mira.cbaines.net (Postfix) with ESMTPSA id C92C127BBE1
 for <control <at> debbugs.gnu.org>; Mon, 20 Apr 2020 22:15:34 +0100 (BST)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id 5dc0f09e
 for <control <at> debbugs.gnu.org>; Mon, 20 Apr 2020 21:15:32 +0000 (UTC)
User-agent: mu4e 1.2.0; emacs 26.3
From: Christopher Baines <mail@HIDDEN>
To: control <at> debbugs.gnu.org
Subject: 
Date: Mon, 20 Apr 2020 22:15:32 +0100
Message-ID: <87tv1d505n.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  tag 40738 moreinfo thanks 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 UNPARSEABLE_RELAY      Informational: message has unparseable relay
 lines 2.0 BLANK_SUBJECT          Subject is present but empty
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

--=-=-=
Content-Type: text/plain

tag 40738 moreinfo
thanks

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6eEPRfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XeIyBAAjqhb3FOowSE1QVHAA+mDNoqy0lUCu8aG5YP86zF5YApkY9be3kTwIOA4
mQ46/at/HGUGMxEUK/pRq2R1i6JblzWvEUTtcvAdYA5ZE/k8988vQV5hMz/C+OB7
qFDB43cHOc8nsy4hyL1GhFnKTjpJrcuiv99YA6JlPgGg5SW20fl6AnBiSP9AObUe
/BxQWf/NTlfeUo2sDf/XOJcq9DBlhMGCY9FTJv/iB6GejocKKlw+qgVPC92fFK9K
/pmvLfXnpcmO7LNe/7x/oCNEr7U4fYAPmS3kDN0QVtthJxcXI5UtQBc1UohcCRVA
AT+CicUh3BudkdDQG1k1izMXl2dzYtv4P7OLjlmNU9zvk0uCG2u6+c5/0Mx8WbuD
bbj6MZjS6yBFMx8p4Es4pKafbaQdVQdR2NPkLRkeemv2JJnDth3VuHjWFAUCplHu
SOKkL8N+gOQ9wvSVF+y4BQxDDXGlQ0CjbUMeHxxAtoeaFAX6vRyj5dW0tGYevxKo
Yk4ze8Cca+VlZ3tiyOD+a7hXkWSJyRteBp7XPm9AHjtQGEmnAM3zfodvNE23h65X
Ni6AEaYM9iJCNBa/UFgcjVU/hOE3UsFnLNAt0hfsTAVY3XhmKW3olT038/JY7k2f
HR2ZSbP9oYImee7UtFFSpiSxYNsf47L1atGfyIUQURZxs5kVTvo=
=M7+a
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#40738] [PATCH 1/4] gnu: Add prometheus.
Resent-From: Christopher Baines <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 20 Apr 2020 21:18:01 +0000
Resent-Message-ID: <handler.40738.B40738.158741746710220 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 40738
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: moreinfo
To: 40738 <at> debbugs.gnu.org
Received: via spool by 40738-submit <at> debbugs.gnu.org id=B40738.158741746710220
          (code B ref 40738); Mon, 20 Apr 2020 21:18:01 +0000
Received: (at 40738) by debbugs.gnu.org; 20 Apr 2020 21:17:47 +0000
Received: from localhost ([127.0.0.1]:48532 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQdnX-0002ef-7y
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:17:47 -0400
Received: from mira.cbaines.net ([212.71.252.8]:33670)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1jQdnW-0002eJ-7Y
 for 40738 <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:17:46 -0400
Received: from localhost (unknown [46.237.173.52])
 by mira.cbaines.net (Postfix) with ESMTPSA id A354E27BBE1
 for <40738 <at> debbugs.gnu.org>; Mon, 20 Apr 2020 22:17:45 +0100 (BST)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id 8b41547d
 for <40738 <at> debbugs.gnu.org>; Mon, 20 Apr 2020 21:17:43 +0000 (UTC)
From: Christopher Baines <mail@HIDDEN>
Date: Mon, 20 Apr 2020 22:17:40 +0100
Message-Id: <20200420211743.23476-1-mail@HIDDEN>
X-Mailer: git-send-email 2.26.0
In-Reply-To: <87v9lt50d4.fsf@HIDDEN>
References: <87v9lt50d4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/monitoring.scm (prometheus): New variable.
---
 gnu/packages/monitoring.scm | 49 +++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm
index 8da31d6a84..345c2c16c5 100644
--- a/gnu/packages/monitoring.scm
+++ b/gnu/packages/monitoring.scm
@@ -422,6 +422,55 @@ written in Go with pluggable metric collectors.")
     (home-page "https://github.com/prometheus/node_exporter")
     (license license:asl2.0)))
 
+(define-public prometheus
+  (package
+    (name "prometheus")
+    (version "2.17.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/prometheus/prometheus.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1r7zpq6647lrm7cmid6nnf2xnljqh1i9g0fxvs0qrfd2sxxgj0c7"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:unpack-path "github.com/prometheus/prometheus"
+       #:import-path "github.com/prometheus/prometheus/cmd/prometheus"
+       #:install-source? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (assets-prefix
+                     (string-append out "/var/lib/prometheus/assets")))
+               (substitute* "src/github.com/prometheus/prometheus/web/ui/ui.go"
+                 (("var assetsPrefix string")
+                  (string-append "var assetsPrefix string = \""
+                                 assets-prefix
+                                 "\""))))
+             #t))
+         (add-after 'install 'install-assets
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (assets-prefix
+                     (string-append out "/var/lib/prometheus/assets")))
+               (for-each (lambda (directory)
+                           (copy-recursively
+                            (string-append "src/github.com/prometheus/prometheus"
+                                           "/web/ui/" directory)
+                            (string-append assets-prefix
+                                           "/" directory)))
+                         '("static" "templates")))
+             #t)))))
+    (home-page "https://prometheus.io/")
+    (synopsis "")
+    (description "")
+    (license "")))
+
 (define-public fswatch
   (package
     (name "fswatch")
-- 
2.26.0





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#40738] [PATCH 2/4] services: Add a Prometheus service.
Resent-From: Christopher Baines <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 20 Apr 2020 21:18:01 +0000
Resent-Message-ID: <handler.40738.B40738.158741746810226 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 40738
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: moreinfo
To: 40738 <at> debbugs.gnu.org
Received: via spool by 40738-submit <at> debbugs.gnu.org id=B40738.158741746810226
          (code B ref 40738); Mon, 20 Apr 2020 21:18:01 +0000
Received: (at 40738) by debbugs.gnu.org; 20 Apr 2020 21:17:48 +0000
Received: from localhost ([127.0.0.1]:48534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQdnX-0002en-Ri
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:17:48 -0400
Received: from mira.cbaines.net ([212.71.252.8]:33672)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1jQdnW-0002eK-81
 for 40738 <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:17:46 -0400
Received: from localhost (unknown [46.237.173.52])
 by mira.cbaines.net (Postfix) with ESMTPSA id B9D0727BBE4
 for <40738 <at> debbugs.gnu.org>; Mon, 20 Apr 2020 22:17:45 +0100 (BST)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id 95aadcd5
 for <40738 <at> debbugs.gnu.org>; Mon, 20 Apr 2020 21:17:43 +0000 (UTC)
From: Christopher Baines <mail@HIDDEN>
Date: Mon, 20 Apr 2020 22:17:41 +0100
Message-Id: <20200420211743.23476-2-mail@HIDDEN>
X-Mailer: git-send-email 2.26.0
In-Reply-To: <20200420211743.23476-1-mail@HIDDEN>
References: <87v9lt50d4.fsf@HIDDEN>
 <20200420211743.23476-1-mail@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 gnu/services/monitoring.scm | 82 +++++++++++++++++++++++++++++++++++++
 gnu/tests/monitoring.scm    | 73 ++++++++++++++++++++++++++++++++-
 2 files changed, 154 insertions(+), 1 deletion(-)

diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm
index 511f4fb2fe..a37dfd80d8 100644
--- a/gnu/services/monitoring.scm
+++ b/gnu/services/monitoring.scm
@@ -40,6 +40,17 @@
             darkstat-service-type
             prometheus-node-exporter-service-type
 
+            prometheus-service-type
+            <prometheus-configuration>
+            prometheus-configuration
+            prometheus-configuration-package
+            prometheus-configuration-user
+            prometheus-configuration-group
+            prometheus-configuration-config-file
+            prometheus-configuration-web-listen-address
+            prometheus-configuration-storage-tsdb-path
+            prometheus-configuration-extra-options
+
             zabbix-server-configuration
             zabbix-server-service-type
             zabbix-agent-configuration
@@ -110,6 +121,77 @@ HTTP.")
           (service-extension shepherd-root-service-type
                              (compose list darkstat-shepherd-service))))))
 
+
+;;;
+;;; Prometheus
+;;;
+
+(define-record-type* <prometheus-configuration>
+  prometheus-configuration
+  make-prometheus-configuration
+  prometheus-configuration?
+  (package            prometheus-configuration-package
+                      (default prometheus))
+  (user               prometheus-configuration-user
+                      (default "prometheus"))
+  (group              prometheusconfiguration-group
+                      (default "prometheus"))
+  (config-file        prometheus-config-file
+                      (default (plain-file "prometheus.yml" "")))
+  (web-listen-address prometheus-web-listen-address
+                      (default "0.0.0.0:9090"))
+  (storage-tsdb-path  prometheus-storage-tsdb-path
+                      (default "/var/lib/prometheus/data/"))
+  (extra-options      prometheus-configuration-extra-options
+                      (default '())))
+
+(define prometheus-shepherd-service
+  (match-lambda
+    (($ <prometheus-configuration> package user group
+                                   config-file web-listen-address
+                                   storage-tsdb-path extra-options)
+     (shepherd-service
+      (documentation "Prometheus monitoring system and time series database.")
+      (provision '(prometheus))
+      (requirement '(networking))
+      (start #~(make-forkexec-constructor
+                (list #$(file-append package "/bin/prometheus")
+                      "--config.file" #$config-file
+                      "--web.listen-address" #$web-listen-address
+                      "--storage.tsdb.path" #$storage-tsdb-path
+                      #$@extra-options)
+                #:user #$user
+                #:group #$group
+                #:log-file "/var/log/prometheus.log"))
+      (stop #~(make-kill-destructor))))))
+
+(define (prometheus-account config)
+  (match-record config <prometheus-configuration>
+    (user group)
+    (list (user-group
+           (name group)
+           (system? #t))
+          (user-account
+           (name user)
+           (group group)
+           (system? #t)
+           (comment "Prometheus user")
+           (home-directory "/var/lib/prometheus")
+           (shell (file-append shadow "/sbin/nologin"))))))
+
+(define prometheus-service-type
+  (service-type
+   (name 'prometheus)
+   (description
+    "Run @command{prometheus} to scrape targets for mertrics and provide the
+web interface.")
+   (extensions
+    (list (service-extension shepherd-root-service-type
+                             (compose list prometheus-shepherd-service))
+          (service-extension account-service-type
+                             prometheus-account)))
+   (default-value (prometheus-configuration))))
+
 (define-record-type* <prometheus-node-exporter-configuration>
   prometheus-node-exporter-configuration
   make-prometheus-node-exporter-configuration
diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm
index 732fbc54d7..e8c0847229 100644
--- a/gnu/tests/monitoring.scm
+++ b/gnu/tests/monitoring.scm
@@ -31,9 +31,80 @@
   #:use-module (gnu system)
   #:use-module (gnu tests)
   #:use-module (guix gexp)
-  #:export (%test-prometheus-node-exporter
+  #:export (%test-prometheus
+            %test-prometheus-node-exporter
             %test-zabbix))
 
+
+;;;
+;;; Prometheus
+;;;
+
+(define* (run-prometheus-test name test-os)
+  "Run tests in %TEST-OS, which has Prometheus running."
+  (define os
+    (marionette-operating-system
+     test-os
+     #:imported-modules '((gnu services herd))))
+
+  (define vm
+    (virtual-machine
+     (operating-system os)
+     (port-forwardings '((8080 . 9090)))))
+
+  (define test
+    (with-imported-modules '((gnu build marionette))
+      #~(begin
+          (use-modules (srfi srfi-11)
+                       (srfi srfi-64)
+                       (gnu build marionette)
+                       (web client)
+                       (web response))
+
+          (define marionette
+            (make-marionette (list #$vm)))
+
+          (mkdir #$output)
+          (chdir #$output)
+
+          (test-begin #$name)
+
+          (test-assert "prometheus running"
+            (marionette-eval
+             '(begin
+                (use-modules (gnu services herd))
+                (match (start-service 'prometheus)
+                  (#f #f)
+                  (('service response-parts ...)
+                   (match (assq-ref response-parts 'running)
+                     ((pid) (number? pid))))))
+             marionette))
+
+          (test-equal "prometheus healthy"
+            200
+            (begin
+              (wait-for-tcp-port 9090 marionette)
+              (let-values (((response text)
+                            (http-get "http://localhost:8080/-/healthy")))
+                (response-code response))))
+
+          (test-end)
+          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+
+  (gexp->derivation (string-append name "-test") test))
+
+(define %prometheus-test-os
+  (simple-operating-system
+   (service dhcp-client-service-type)
+   (service prometheus-service-type)))
+
+(define %test-prometheus
+  (system-test
+   (name "prometheus")
+   (description "Connect to a running Prometheus service.")
+   (value (run-prometheus-test name
+                               %prometheus-test-os))))
+
 
 ;;;
 ;;; Prometheus Node Exporter
-- 
2.26.0





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#40738] [PATCH 3/4] gnu: Add alertmanager.
Resent-From: Christopher Baines <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 20 Apr 2020 21:18:02 +0000
Resent-Message-ID: <handler.40738.B40738.158741747110240 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 40738
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: moreinfo
To: 40738 <at> debbugs.gnu.org
Received: via spool by 40738-submit <at> debbugs.gnu.org id=B40738.158741747110240
          (code B ref 40738); Mon, 20 Apr 2020 21:18:02 +0000
Received: (at 40738) by debbugs.gnu.org; 20 Apr 2020 21:17:51 +0000
Received: from localhost ([127.0.0.1]:48536 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQdnb-0002f5-8j
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:17:51 -0400
Received: from mira.cbaines.net ([212.71.252.8]:33674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1jQdnW-0002eL-9i
 for 40738 <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:17:47 -0400
Received: from localhost (unknown [46.237.173.52])
 by mira.cbaines.net (Postfix) with ESMTPSA id D5F9127BBEA
 for <40738 <at> debbugs.gnu.org>; Mon, 20 Apr 2020 22:17:45 +0100 (BST)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id 66be6fc9
 for <40738 <at> debbugs.gnu.org>; Mon, 20 Apr 2020 21:17:43 +0000 (UTC)
From: Christopher Baines <mail@HIDDEN>
Date: Mon, 20 Apr 2020 22:17:42 +0100
Message-Id: <20200420211743.23476-3-mail@HIDDEN>
X-Mailer: git-send-email 2.26.0
In-Reply-To: <20200420211743.23476-1-mail@HIDDEN>
References: <87v9lt50d4.fsf@HIDDEN>
 <20200420211743.23476-1-mail@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/monitoring.scm (alertmanager): New variable.
---
 gnu/packages/monitoring.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm
index 345c2c16c5..e0e345d259 100644
--- a/gnu/packages/monitoring.scm
+++ b/gnu/packages/monitoring.scm
@@ -471,6 +471,29 @@ written in Go with pluggable metric collectors.")
     (description "")
     (license "")))
 
+(define-public alertmanager
+  (package
+    (name "alertmanager")
+    (version "0.20.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/prometheus/alertmanager.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1bq6vbpy25k7apvs2ga3fbp1cbnv9j0y1g1khvz2qgz6a2zvhgg3"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:unpack-path "github.com/prometheus/alertmanager"
+       #:import-path "github.com/prometheus/alertmanager/cmd/alertmanager"
+       #:install-source? #f))
+    (home-page "https://prometheus.io/")
+    (synopsis "")
+    (description "")
+    (license "")))
+
 (define-public fswatch
   (package
     (name "fswatch")
-- 
2.26.0





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#40738] [PATCH 4/4] services: Add a service for Alertmanager.
Resent-From: Christopher Baines <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 20 Apr 2020 21:18:02 +0000
Resent-Message-ID: <handler.40738.B40738.158741747110246 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 40738
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: moreinfo
To: 40738 <at> debbugs.gnu.org
Received: via spool by 40738-submit <at> debbugs.gnu.org id=B40738.158741747110246
          (code B ref 40738); Mon, 20 Apr 2020 21:18:02 +0000
Received: (at 40738) by debbugs.gnu.org; 20 Apr 2020 21:17:51 +0000
Received: from localhost ([127.0.0.1]:48538 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQdnb-0002f7-FB
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:17:51 -0400
Received: from mira.cbaines.net ([212.71.252.8]:33676)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1jQdnW-0002eM-DG
 for 40738 <at> debbugs.gnu.org; Mon, 20 Apr 2020 17:17:47 -0400
Received: from localhost (unknown [46.237.173.52])
 by mira.cbaines.net (Postfix) with ESMTPSA id F0D3927BBEB
 for <40738 <at> debbugs.gnu.org>; Mon, 20 Apr 2020 22:17:45 +0100 (BST)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id a4197032
 for <40738 <at> debbugs.gnu.org>; Mon, 20 Apr 2020 21:17:43 +0000 (UTC)
From: Christopher Baines <mail@HIDDEN>
Date: Mon, 20 Apr 2020 22:17:43 +0100
Message-Id: <20200420211743.23476-4-mail@HIDDEN>
X-Mailer: git-send-email 2.26.0
In-Reply-To: <20200420211743.23476-1-mail@HIDDEN>
References: <87v9lt50d4.fsf@HIDDEN>
 <20200420211743.23476-1-mail@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 gnu/services/monitoring.scm | 82 +++++++++++++++++++++++++++++++++++++
 gnu/tests/monitoring.scm    | 71 ++++++++++++++++++++++++++++++++
 2 files changed, 153 insertions(+)

diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm
index a37dfd80d8..50a4b7302c 100644
--- a/gnu/services/monitoring.scm
+++ b/gnu/services/monitoring.scm
@@ -51,6 +51,17 @@
             prometheus-configuration-storage-tsdb-path
             prometheus-configuration-extra-options
 
+            alertmanager-service-type
+            <alertmanager-configuration>
+            alertmanager-configuration
+            alertmanager-configuration-package
+            alertmanager-configuration-user
+            alertmanager-configuration-group
+            alertmanager-configuration-config-file
+            alertmanager-configuration-web-listen-address
+            alertmanager-configuration-storage-path
+            alertmanager-configuration-extra-options
+
             zabbix-server-configuration
             zabbix-server-service-type
             zabbix-agent-configuration
@@ -226,6 +237,77 @@ prometheus.")
            (compose list prometheus-node-exporter-shepherd-service))))
    (default-value (prometheus-node-exporter-configuration))))
 
+
+;;;
+;;; Alertmanager
+;;;
+
+(define-record-type* <alertmanager-configuration>
+  alertmanager-configuration
+  make-alertmanager-configuration
+  alertmanager-configuration?
+  (package            alertmanager-configuration-package
+                      (default alertmanager))
+  (user               alertmanager-configuration-user
+                      (default "alertmanager"))
+  (group              alertmanagerconfiguration-group
+                      (default "alertmanager"))
+  (config-file        alertmanager-config-file
+                      (default (plain-file "alertmanager.yml" "")))
+  (web-listen-address alertmanager-web-listen-address
+                      (default ":9093"))
+  (storage-tsdb-path  alertmanager-storage-tsdb-path
+                      (default "/var/lib/alertmanager/data/"))
+  (extra-options      alertmanager-configuration-extra-options
+                      (default '())))
+
+(define alertmanager-shepherd-service
+  (match-lambda
+    (($ <alertmanager-configuration> package user group
+                                   config-file web-listen-address
+                                   storage-tsdb-path extra-options)
+     (shepherd-service
+      (documentation "Alertmanager monitoring system and time series database.")
+      (provision '(alertmanager))
+      (requirement '(networking))
+      (start #~(make-forkexec-constructor
+                (list #$(file-append package "/bin/alertmanager")
+                      "--config.file" #$config-file
+                      "--web.listen-address" #$web-listen-address
+                      "--storage.path" #$storage-tsdb-path
+                      #$@extra-options)
+                #:user #$user
+                #:group #$group
+                #:log-file "/var/log/alertmanager.log"))
+      (stop #~(make-kill-destructor))))))
+
+(define (alertmanager-account config)
+  (match-record config <alertmanager-configuration>
+    (user group)
+    (list (user-group
+           (name group)
+           (system? #t))
+          (user-account
+           (name user)
+           (group group)
+           (system? #t)
+           (comment "Alertmanager user")
+           (home-directory "/var/lib/alertmanager")
+           (shell (file-append shadow "/sbin/nologin"))))))
+
+(define alertmanager-service-type
+  (service-type
+   (name 'alertmanager)
+   (description
+    "Run @command{alertmanager} to scrape targets for mertrics and provide the
+web interface.")
+   (extensions
+    (list (service-extension shepherd-root-service-type
+                             (compose list alertmanager-shepherd-service))
+          (service-extension account-service-type
+                             alertmanager-account)))
+   (default-value (alertmanager-configuration))))
+
 
 ;;;
 ;;; Zabbix server
diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm
index e8c0847229..b77b654abc 100644
--- a/gnu/tests/monitoring.scm
+++ b/gnu/tests/monitoring.scm
@@ -33,6 +33,7 @@
   #:use-module (guix gexp)
   #:export (%test-prometheus
             %test-prometheus-node-exporter
+            %test-alertmanager
             %test-zabbix))
 
 
@@ -176,6 +177,76 @@
    (value (run-prometheus-node-exporter-server-test
            name %prometheus-node-exporter-os))))
 
+
+;;;
+;;; Alertmanager
+;;;
+
+(define* (run-alertmanager-test name test-os)
+  "Run tests in %TEST-OS, which has Alertmanager running."
+  (define os
+    (marionette-operating-system
+     test-os
+     #:imported-modules '((gnu services herd))))
+
+  (define vm
+    (virtual-machine
+     (operating-system os)
+     (port-forwardings '((8080 . 9093)))))
+
+  (define test
+    (with-imported-modules '((gnu build marionette))
+      #~(begin
+          (use-modules (srfi srfi-11)
+                       (srfi srfi-64)
+                       (gnu build marionette)
+                       (web client)
+                       (web response))
+
+          (define marionette
+            (make-marionette (list #$vm)))
+
+          (mkdir #$output)
+          (chdir #$output)
+
+          (test-begin #$name)
+
+          (test-assert "alertmanager running"
+            (marionette-eval
+             '(begin
+                (use-modules (gnu services herd))
+                (match (start-service 'alertmanager)
+                  (#f #f)
+                  (('service response-parts ...)
+                   (match (assq-ref response-parts 'running)
+                     ((pid) (number? pid))))))
+             marionette))
+
+          (test-equal "alertmanager healthy"
+            200
+            (begin
+              (wait-for-tcp-port 9090 marionette)
+              (let-values (((response text)
+                            (http-get "http://localhost:8080/-/healthy")))
+                (response-code response))))
+
+          (test-end)
+          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+
+  (gexp->derivation (string-append name "-test") test))
+
+(define %alertmanager-test-os
+  (simple-operating-system
+   (service dhcp-client-service-type)
+   (service alertmanager-service-type)))
+
+(define %test-alertmanager
+  (system-test
+   (name "alertmanager")
+   (description "Connect to a running Alertmanager service.")
+   (value (run-alertmanager-test name
+                               %alertmanager-test-os))))
+
 
 ;;;
 ;;; Zabbix
-- 
2.26.0





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#40738] Prometheus (and Alertmanager)
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sun, 03 May 2020 10:57:02 +0000
Resent-Message-ID: <handler.40738.B40738.15885033911505 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 40738
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: moreinfo
To: Christopher Baines <mail@HIDDEN>
Cc: 40738 <at> debbugs.gnu.org
Received: via spool by 40738-submit <at> debbugs.gnu.org id=B40738.15885033911505
          (code B ref 40738); Sun, 03 May 2020 10:57:02 +0000
Received: (at 40738) by debbugs.gnu.org; 3 May 2020 10:56:31 +0000
Received: from localhost ([127.0.0.1]:54769 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jVCIQ-0000OC-T2
	for submit <at> debbugs.gnu.org; Sun, 03 May 2020 06:56:31 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38544)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jVCIP-0000O0-Qd
 for 40738 <at> debbugs.gnu.org; Sun, 03 May 2020 06:56:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50711)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jVCIK-0004nX-86; Sun, 03 May 2020 06:56:24 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49126 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jVCIH-0008VI-BG; Sun, 03 May 2020 06:56:21 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <87v9lt50d4.fsf@HIDDEN>
Date: Sun, 03 May 2020 12:56:19 +0200
In-Reply-To: <87v9lt50d4.fsf@HIDDEN> (Christopher Baines's message of
 "Mon, 20 Apr 2020 22:11:03 +0100")
Message-ID: <87d07l1e3w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello!

Christopher Baines <mail@HIDDEN> skribis:

> I've had a go at packaging Prometheus and Alertmanager, as well as
> writing Guix services for both of them.

Nice!  I=E2=80=99m not an expert, but it sounds like it could advantageously
replace Zabbix on berlin.

> The packages build, but still need quite a bit of work. They're both
> written in Go, so the Git repositories not only include the relevant
> source code, but the source code of the entire dependency tree (hence
> the packages have no inputs). That'll need addressing.

Would the gopkg importer at
<https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00310.html> be
of any help?  (I think I posted an updated version later on but I can=E2=80=
=99t
find it.)

> I've tested the Prometheus service, and it seems to work, although there
> isn't any record types for the Prometheus configuration yet. I haven't
> yet tested the Alertmanager service and the system test doesn't pass, I
> believe more configuration is required than Prometheus.
>
> Having a Prometheus service would be a good complement for the existing
> Prometheus Node exporter service in Guix.

Yup!

Thanks,
Ludo=E2=80=99.




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#40738] Prometheus (and Alertmanager)
Resent-From: Christopher Baines <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sun, 03 May 2020 11:19:01 +0000
Resent-Message-ID: <handler.40738.B40738.15885046813842 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 40738
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 40738 <at> debbugs.gnu.org
Received: via spool by 40738-submit <at> debbugs.gnu.org id=B40738.15885046813842
          (code B ref 40738); Sun, 03 May 2020 11:19:01 +0000
Received: (at 40738) by debbugs.gnu.org; 3 May 2020 11:18:01 +0000
Received: from localhost ([127.0.0.1]:54811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jVCdF-0000zr-34
	for submit <at> debbugs.gnu.org; Sun, 03 May 2020 07:18:01 -0400
Received: from mira.cbaines.net ([212.71.252.8]:55866)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1jVCdD-0000zd-Aw
 for 40738 <at> debbugs.gnu.org; Sun, 03 May 2020 07:18:00 -0400
Received: from localhost (unknown [46.237.174.129])
 by mira.cbaines.net (Postfix) with ESMTPSA id 6B0FD27BBE1;
 Sun,  3 May 2020 12:17:58 +0100 (BST)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id b7a75cd7;
 Sun, 3 May 2020 11:17:56 +0000 (UTC)
References: <87v9lt50d4.fsf@HIDDEN> <87d07l1e3w.fsf@HIDDEN>
User-agent: mu4e 1.2.0; emacs 26.3
From: Christopher Baines <mail@HIDDEN>
In-reply-to: <87d07l1e3w.fsf@HIDDEN>
Date: Sun, 03 May 2020 12:17:55 +0100
Message-ID: <874ksxmfmk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

>> The packages build, but still need quite a bit of work. They're both
>> written in Go, so the Git repositories not only include the relevant
>> source code, but the source code of the entire dependency tree (hence
>> the packages have no inputs). That'll need addressing.
>
> Would the gopkg importer at
> <https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00310.html> be
> of any help?  (I think I posted an updated version later on but I can=E2=
=80=99t
> find it.)

Yeah, I think getting a working importer is going to be the way to
address this.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6uqGNfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xeu+w/+PYEZRUQ8vhNNxb9xsVpH10ZnjLvnU8W7hCgPaMBXYyvxVXa99VWl811T
W7ZVjX1smgNEoUb3Yq81o3ib7DkkkH8n2T+GSnQNhw2n9LCo5hRa+cWB0W0qY23N
Tyu7alCiPpZOUI1aMbidpHULZlcyTVGMDda8croyy0Md+u0Yzh0Rr9SZ0G8yJGx7
w/m4jNOCm+K6JYVSSb+1NyNXENxZ3/4DbSZLNKjWnEOxQ4zNCNLLTaIxeralh1OG
fxmEeFAa7ZwNcA8bMA3Irvoxi+4lpeAL3G9I4QO7EEiMGC/fc+A2MM6PlcnkT/1E
rdoRK0vPJGoSI7GvmQzmbx06d/WY1HfEvDyDyM9t87YZGWkCJ6A7DmsCd87McnfD
JagWBIYx9PrdqHDkcs4pbjTQfpicGjjy59pEoab3AFlXLjJC4LtwJ5dqssZDC45e
rxjENCaSe51BGoXsU+1Iawi4VPuSyIePraV+WrqNeWrVUhGA7/HBQ98OiNH7I3wg
3+7KtJM6To+FpW7HDuxYhqzXVAi4cEOCmHngza9eKNxqZ6+xS+yTxr2ySUgMWWzE
y5AQcEobG3IEenBI0ckUt70+iQaonipaSIAv46tmO6S04Pto9N7ihDoeIcsYDc9T
zmrfCLWL7e0k5L/9Lkk839CeNIJ03JrofIRnpYLp8qqoU6ewMKc=
=cbv7
-----END PGP SIGNATURE-----
--=-=-=--





Last modified: Sun, 3 May 2020 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.