aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-07 20:52:45 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-07 20:52:45 +0000
commitb8870e13f1672e3583347351cc442c03d98d8162 (patch)
tree382420865ccb5bafd99b13422aba31d278c60913 /scripts
parent2d424e7549e6154640e201bb3e45a4eaa644b47b (diff)
downloadbuild-coordinator-b8870e13f1672e3583347351cc442c03d98d8162.tar
build-coordinator-b8870e13f1672e3583347351cc442c03d98d8162.tar.gz
Start using Prometheus metrics with the agent
Rather than having the agent run a webserver, use the textfile collector from the node exporter.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator-agent.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/guix-build-coordinator-agent.in b/scripts/guix-build-coordinator-agent.in
index 7b00dbf..55e8e92 100644
--- a/scripts/guix-build-coordinator-agent.in
+++ b/scripts/guix-build-coordinator-agent.in
@@ -77,12 +77,19 @@
(cons arg
(or (assq-ref result 'systems)
'()))
- (alist-delete 'systems result))))))
+ (alist-delete 'systems result))))
+ (option '("metrics-file") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'metrics-file
+ arg
+ result)))))
(define %option-defaults
`((coordinator . "http://localhost:8745")
(max-parallel-builds . 1)
- (systems . (,guix-config:%system))))
+ (systems . (,guix-config:%system))
+ (metrics-file
+ . "/var/lib/prometheus/node-exporter/guix-build-coordinator-agent.prom")))
(define (parse-options options defaults args)
(args-fold
@@ -107,4 +114,5 @@
(or (assq-ref opts 'derivation-substitute-urls)
(assq-ref opts 'substitute-urls))
(or (assq-ref opts 'non-derivation-substitute-urls)
- (assq-ref opts 'substitute-urls))))
+ (assq-ref opts 'substitute-urls))
+ (assq-ref opts 'metrics-file)))