about summary refs log tree commit diff
path: root/modules/services/metrics-exporter
diff options
context:
space:
mode:
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" ];
+        };
+      };
+    };
+  };
+}