delft: set up and scrape prometheus-zfs-exporter
The hope is that we gain more insight into ZFS dataset usage over time.
Martin Weinelt committed
Jun 15, 2024 at 23:54 UTC
6d38a50970a7991dc6e93165e25703fb58a42e33
3 files changed
+21
delft/pluto/prometheus/default.nix
+1
@@ -20,6 +20,7 @@
20
./exporters/postgresql.nix
21
./exporters/r13y.nix
22
./exporters/rfc39.nix
23
+ ./exporters/zfs.nix
24
];
25
26
networking.extraHosts = ''
delft/pluto/prometheus/exporters/zfs.nix
new
+14
@@ -0,0 +1,14 @@
1
+{
2
+ services.prometheus = {
3
+ scrapeConfigs = [ {
4
+ job_name = "zfs";
5
+ static_configs = [ {
6
+ targets = [
7
+ "rhea:9134"
8
+ "haumea:9134"
9
+ "pluto:9134"
10
+ ];
11
+ } ];
12
+ } ];
13
+ };
14
+}
modules/prometheus/default.nix
+6
@@ -33,4 +33,10 @@ in
33
ExecStart = "${prometheus-nixos-exporter}/bin/prometheus-nixos-exporter";
34
};
35
};
36
+
37
+ services.prometheus.exporters.zfs = {
38
+ enable = true;
39
+ listenAddress = "[::]";
40
+ openFirewall = true;
41
+ };
42
}