aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/monitoring.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-11-28 11:03:19 +0000
committerChristopher Baines <mail@cbaines.net>2020-11-28 12:00:25 +0000
commit633a6906431777dc2d66970583b139d7c476a2f3 (patch)
tree41d98dbddb472362ab46bd913caf22f32a3c0975 /gnu/services/monitoring.scm
parent891f3670fd9bffc6dfa8ad46ed53e62a408f9564 (diff)
downloadguix-prometheus-node-exporter-enhancements.tar
guix-prometheus-node-exporter-enhancements.tar.gz
monitoring: Support extra options for the Prometheus node exporter.prometheus-node-exporter-enhancements
There are plenty of options supported that the Guix configuration record doesn't help you with, so add this field to allow users to do their own thing. * gnu/services/monitoring.scm (<prometheus-node-exporter-configuration>): Add extra-options field. (prometheus-node-exporter-shepherd-service): Handle the extra options. * doc/guix.texi (Prometheus Node Exporter Service): Document this.
Diffstat (limited to 'gnu/services/monitoring.scm')
-rw-r--r--gnu/services/monitoring.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm
index c4bae229b8..4b6f8ed623 100644
--- a/gnu/services/monitoring.scm
+++ b/gnu/services/monitoring.scm
@@ -128,7 +128,9 @@ HTTP.")
(web-listen-address prometheus-node-exporter-web-listen-address
(default ":9100"))
(textfile-directory prometheus-node-exporter-textfile-directory
- (default "/var/lib/prometheus/node-exporter")))
+ (default "/var/lib/prometheus/node-exporter"))
+ (extra-options prometheus-node-exporter-extra-options
+ (default '())))
(define %prometheus-node-exporter-accounts
(list (user-account
@@ -145,7 +147,7 @@ HTTP.")
(define prometheus-node-exporter-shepherd-service
(match-lambda
(( $ <prometheus-node-exporter-configuration>
- package web-listen-address textfile-directory)
+ package web-listen-address textfile-directory extra-options)
(list
(shepherd-service
(documentation "Prometheus node exporter.")
@@ -157,7 +159,8 @@ HTTP.")
#$@(if textfile-directory
(list "--collector.textfile.directory"
textfile-directory)
- '()))
+ '())
+ #$@extra-options)
#:user "prometheus-node-exporter"
#:group "prometheus-node-exporter"
#:log-file "/var/log/prometheus-node-exporter.log"))