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 ...@@ -15,6 +15,11 @@ let
in { in {
config.services.prometheus.exporters.node = { 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; enable = true;
openFirewall = true; openFirewall = true;
firewallFilter = "-i monitoringvpn -p tcp -m tcp --dport 9100"; firewallFilter = "-i monitoringvpn -p tcp -m tcp --dport 9100";
...@@ -36,7 +41,7 @@ in { ...@@ -36,7 +41,7 @@ in {
"stat" "stat"
"systemd" "systemd"
"textfile" "textfile"
"textfile.directory /run/prometheus-node-exporter" "textfile.directory ${cfg.textfiles-directory}"
#"thermal_zone" # not in nixpkgs 19.09 #"thermal_zone" # not in nixpkgs 19.09
"time" "time"
#"udp_queues" # not in nixpkgs 19.09 #"udp_queues" # not in nixpkgs 19.09
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
let let
cfg = config.services.private-storage.monitoring.tahoe; cfg = config.services.private-storage.monitoring.tahoe;
inherit (config.services.private-storage.monitoring.node) textfiles-directory;
in { in {
options.services.private-storage.monitoring.tahoe = { options.services.private-storage.monitoring.tahoe = {
...@@ -23,7 +24,7 @@ in { ...@@ -23,7 +24,7 @@ in {
outFile = lib.mkOption { outFile = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Where to store the temporary file for node exporter to scrape?"; 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 { interval = lib.mkOption {
type = lib.types.str; 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