about summary refs log tree commit diff
path: root/modules/services/metrics-exporter
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-06 12:49:53 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-06 12:49:53 -0700
commitf61e0fe45e4f237828df01ee3bacf4bae78fdcf0 (patch)
tree986fcf274ee755313a35431781acc0a646fe0700 /modules/services/metrics-exporter
parentrefactor traefik (diff)
downloadworld-f61e0fe45e4f237828df01ee3bacf4bae78fdcf0.tar.gz
refactor transmission and metrics-exporter
Diffstat (limited to 'modules/services/metrics-exporter')
-rw-r--r--modules/services/metrics-exporter/default.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/services/metrics-exporter/default.nix b/modules/services/metrics-exporter/default.nix
new file mode 100644
index 0000000..b461bd2
--- /dev/null
+++ b/modules/services/metrics-exporter/default.nix
@@ -0,0 +1,18 @@
+{ config, pkgs, lib, ... }:
+let cfg = config.my.services.metrics-exporter;
+in {
+  options.my.services.metrics-exporter = with lib; {
+    enable = mkEnableOption "Prometheus metrics exporter";
+  };
+
+  config = lib.mkIf cfg.enable {
+    services.prometheus = {
+      exporters = {
+        node = {
+          enable = true;
+          enabledCollectors = [ "tcpstat" "systemd" "interrupts" ];
+        };
+      };
+    };
+  };
+}