Skip to content
Snippets Groups Projects
Commit dbc3d999 authored by Tom Prince's avatar Tom Prince
Browse files

share config for textfiles-directory

parent da0bd067
No related branches found
No related tags found
2 merge requests!274merge develop into production,!262Miscellaneous changes
Pipeline #1840 failed
......@@ -15,6 +15,11 @@ let
in {
config.services.prometheus.exporters.node = {
textfiles-directory = lib.mkOption {
type = lib.types.str;
description = "Directory used by the textfiles collector.";
default = "/run/prometheus-node-exporter/tahoe.prom";
};
enable = true;
openFirewall = true;
firewallFilter = "-i monitoringvpn -p tcp -m tcp --dport 9100";
......@@ -36,7 +41,7 @@ in {
"stat"
"systemd"
"textfile"
"textfile.directory /run/prometheus-node-exporter"
"textfile.directory ${cfg.textfiles-directory}"
#"thermal_zone" # not in nixpkgs 19.09
"time"
#"udp_queues" # not in nixpkgs 19.09
......
......@@ -11,6 +11,7 @@
let
cfg = config.services.private-storage.monitoring.tahoe;
inherit (config.services.private-storage.monitoring.node) textfiles-directory;
in {
options.services.private-storage.monitoring.tahoe = {
......@@ -23,7 +24,7 @@ in {
outFile = lib.mkOption {
type = lib.types.str;
description = "Where to store the temporary file for node exporter to scrape?";
default = "/run/prometheus-node-exporter/tahoe.prom";
default = "${textfiles-directory}/tahoe.prom";
};
interval = lib.mkOption {
type = lib.types.str;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment