-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitoring.nix
48 lines (48 loc) · 1022 Bytes
/
monitoring.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
config,
lib,
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
ipmitool
lm_sensors
];
networking.firewall.allowedTCPPorts = [
config.services.prometheus.exporters.node.port
config.services.prometheus.exporters.zfs.port
config.services.prometheus.exporters.smartctl.port
config.services.prometheus.exporters.ipmi.port
config.services.prometheus.exporters.nut.port
];
services.prometheus = {
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
disabledCollectors = [ "textfile" ];
port = 9001;
};
zfs = {
enable = true;
port = 9002;
};
smartctl = {
enable = true;
port = 9003;
};
ipmi = {
enable = true;
port = 9004;
};
nut = {
enable = true;
port = 9005;
nutUser = "admin";
group = "nut";
passwordPath = config.age.secrets.upsAdminPassword.path;
};
};
};
}