GNU bug report logs - #43239
[PATCH] gnu: Add guile-prometheus.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sun, 6 Sep 2020 12:08:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43239 in the body.
You can then email your comments to 43239 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#43239; Package guix-patches. (Sun, 06 Sep 2020 12:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 06 Sep 2020 12:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add guile-prometheus.
Date: Sun,  6 Sep 2020 13:07:44 +0100
* gnu/packages/guile-xyz.scm (guile-prometheus): New variable.
---
 gnu/packages/guile-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index fa6855f43d..532a8008e5 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -853,6 +853,36 @@ Vicare Scheme and IronScheme.  Right now it contains:
 @end itemize\n")
     (license license:bsd-3)))
 
+(define-public guile-prometheus
+  (let ((commit "cbc6e1b03512443a03d66414c426adb8470b5f2b")
+        (revision "0"))
+    (package
+    (name "guile-prometheus")
+    (version (string-append "0-" revision "." (string-take commit 7)))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.cbaines.net/git/guile/prometheus")
+                    (commit commit)))
+              (sha256
+               (base32
+                "1k1qg4ia87w2ipnf8cpikdc67lxi5bmahkhgk2x0i9ibdyvqb7np"))
+              (file-name (string-append name "-" version "-checkout"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)))
+    (inputs
+     `(("guile" ,guile-3.0)))
+    (home-page "https://git.cbaines.net/guile/prometheus")
+    (synopsis "Prometheus client library for Guile")
+    (description
+     "This Guile library provides instrumentation code intended to be used
+with the Prometheus time series service.  Counter, gauge and histogram metric
+types are supported.")
+    (license license:gpl3+))))
+
 (define-public guile2.2-pfds
   (package
     (inherit guile-pfds)
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#43239; Package guix-patches. (Sun, 06 Sep 2020 13:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 43239 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 43239 <at> debbugs.gnu.org
Subject: Re: [bug#43239] [PATCH] gnu: Add guile-prometheus.
Date: Sun, 06 Sep 2020 15:28:13 +0200
Hello Christopher,

> +    (name "guile-prometheus")
> +    (version (string-append "0-" revision "." (string-take commit 7)))

I think that the usual pattern is something like:

--8<---------------cut here---------------start------------->8---
      (version (git-version "0.0.1" revision commit))
--8<---------------cut here---------------end--------------->8---

> +    (inputs
> +     `(("guile" ,guile-3.0)))
> +    (home-page "https://git.cbaines.net/guile/prometheus")

The linter reports that this URL is not reachable.

> +    (synopsis "Prometheus client library for Guile")
> +    (description
> +     "This Guile library provides instrumentation code intended to be used
> +with the Prometheus time series service.  Counter, gauge and histogram metric
> +types are supported.")
> +    (license license:gpl3+))))

Otherwise, looks fine! Turns out I'm currently working on adding some
metrics to Cuirass[1]. With commit 154232b, we should be able to add the
two metrics proposed in the bug report. The next step is to actually
compute, save and display those metrics.

I'm just discovering this prometheus but may it could be a good
candidate? Do you happen to have a server running prometheus?

Thanks,

Mathieu

[1]: https://issues.guix.gnu.org/32548.




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Sun, 06 Sep 2020 18:26:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Sun, 06 Sep 2020 18:26:02 GMT) Full text and rfc822 format available.

Message #13 received at 43239-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 43239-done <at> debbugs.gnu.org
Subject: Re: [bug#43239] [PATCH] gnu: Add guile-prometheus.
Date: Sun, 06 Sep 2020 19:25:15 +0100
[Message part 1 (text/plain, inline)]
Mathieu Othacehe <othacehe <at> gnu.org> writes:

> Hello Christopher,
>
>> +    (name "guile-prometheus")
>> +    (version (string-append "0-" revision "." (string-take commit 7)))
>
> I think that the usual pattern is something like:
>
> --8<---------------cut here---------------start------------->8---
>       (version (git-version "0.0.1" revision commit))
> --8<---------------cut here---------------end--------------->8---

Ah, yeah, I copied from a package definition not using that.

>> +    (inputs
>> +     `(("guile" ,guile-3.0)))
>> +    (home-page "https://git.cbaines.net/guile/prometheus")
>
> The linter reports that this URL is not reachable.

I think it's actually the source URL (with the /git bit in it ) that it
complains about:

gnu/packages/guile-xyz.scm:862:12: guile-prometheus <at> 0-0.cbc6e1b: URI https://git.cbaines.net/git/guile/prometheus not reachable: 404 ("Not Found")

While the home page URL definitely works, that URL does 404, however it
seems to work just fine for cloning the repository, so I'm not quite
sure what if anything to do with this lint warning.

>> +    (synopsis "Prometheus client library for Guile")
>> +    (description
>> +     "This Guile library provides instrumentation code intended to be used
>> +with the Prometheus time series service.  Counter, gauge and histogram metric
>> +types are supported.")
>> +    (license license:gpl3+))))
>
> Otherwise, looks fine! Turns out I'm currently working on adding some
> metrics to Cuirass[1]. With commit 154232b, we should be able to add the
> two metrics proposed in the bug report. The next step is to actually
> compute, save and display those metrics.
>
> I'm just discovering this prometheus but may it could be a good
> candidate? Do you happen to have a server running prometheus?

I've with the version change, I've gone ahead and pushed. Thanks for
taking a look!

As for Cuirass metrics, that sounds exciting. I do happen to have a
Prometheus instance [1] which I've been using to monitor machines and
the Guix Build Coordinator that I run for the guix.cbaines.net build
farm.

1: http://mago.cbaines.net:9090/

While Prometheus can generate graphs, I've been using Grafana [2] to
build dashboards to visualise the Prometheus data.

2: http://mago.cbaines.net:3000/

This [4] is the dashboard I have for the guix.cbaines.net stuff, which
pulls together data from the node exporter service on the various
machines as well as the Guix Build Coordinator coordinator service
itself [5].

4: http://mago.cbaines.net:3000/d/gMq2pj3Wk/guix-cbaines-net
5: https://coordinator.guix.cbaines.net/metrics

Today, I've just started getting the Guix Data Service to export some
metrics [6] as I want to try and understand how the size of different
tables and indexes in the database change over time. There's a Grafana
dashboard for that too [7].

6: https://data.guix-patches.cbaines.net/metrics
7: http://mago.cbaines.net:3000/d/w7YijfvGz/guix-data-service

Additionally, I'm also running Alertmanager [8] which can send out
emails, for example when a machine is low on disk space.

8: http://mago.cbaines.net:9093/

Anyway, if you decide to have Cuirass export metrics in the Prometheus
style, just let me know and I can get the Prometheus instance I'm
running to scrape them. I can also give you access to Grafana so you can
create dashboards.

Thanks again,

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43239; Package guix-patches. (Thu, 10 Sep 2020 13:24:02 GMT) Full text and rfc822 format available.

Message #16 received at 43239-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 43239-done <at> debbugs.gnu.org
Subject: Re: [bug#43239] [PATCH] gnu: Add guile-prometheus.
Date: Thu, 10 Sep 2020 15:23:40 +0200
Hello Chris,

> Anyway, if you decide to have Cuirass export metrics in the Prometheus
> style, just let me know and I can get the Prometheus instance I'm
> running to scrape them. I can also give you access to Grafana so you can
> create dashboards.

Thanks a lot for all the inputs. For now I've decided to store metrics
in a dedicated Cuirass table. Then, I'll display some of them directly
in the web UI while making other available through the JSON API.

I'll see in a second time if I can also export those metrics to your
Prometheus servers.

Mathieu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 Oct 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 313 days ago.

Previous Next


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