global reformat with treefmt
This commit is contained in:
parent
97f849e454
commit
393e92fe14
17 changed files with 979 additions and 726 deletions
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
domaine = "nyanlout.re";
|
||||
|
@ -23,28 +28,44 @@ in
|
|||
enable = true;
|
||||
extraConfig = {
|
||||
inputs = {
|
||||
zfs = { poolMetrics = true; };
|
||||
net = { interfaces = [ "eno1" "eno2" "eno3" "eno4" ]; };
|
||||
netstat = {};
|
||||
cpu = { totalcpu = true; };
|
||||
kernel = {};
|
||||
mem = {};
|
||||
processes = {};
|
||||
system = {};
|
||||
disk = {};
|
||||
zfs = {
|
||||
poolMetrics = true;
|
||||
};
|
||||
net = {
|
||||
interfaces = [
|
||||
"eno1"
|
||||
"eno2"
|
||||
"eno3"
|
||||
"eno4"
|
||||
];
|
||||
};
|
||||
netstat = { };
|
||||
cpu = {
|
||||
totalcpu = true;
|
||||
};
|
||||
kernel = { };
|
||||
mem = { };
|
||||
processes = { };
|
||||
system = { };
|
||||
disk = { };
|
||||
cgroup = [
|
||||
{
|
||||
paths = [
|
||||
"/sys/fs/cgroup/system.slice/*"
|
||||
];
|
||||
files = ["memory.current" "cpu.stat"];
|
||||
files = [
|
||||
"memory.current"
|
||||
"cpu.stat"
|
||||
];
|
||||
}
|
||||
];
|
||||
ipmi_sensor = { path = "${pkgs.ipmitool}/bin/ipmitool"; };
|
||||
ipmi_sensor = {
|
||||
path = "${pkgs.ipmitool}/bin/ipmitool";
|
||||
};
|
||||
smart = {
|
||||
path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl";
|
||||
};
|
||||
exec= [
|
||||
exec = [
|
||||
{
|
||||
commands = [
|
||||
"${pkgs.python3}/bin/python ${pkgs.writeText "zpool.py" ''
|
||||
|
@ -76,7 +97,10 @@ in
|
|||
];
|
||||
};
|
||||
outputs = {
|
||||
influxdb = { database = "telegraf"; urls = [ "http://localhost:8086" ]; };
|
||||
influxdb = {
|
||||
database = "telegraf";
|
||||
urls = [ "http://localhost:8086" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -122,6 +146,14 @@ in
|
|||
};
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{ commands = [ { command = "${pkgs.smartmontools}/bin/smartctl"; options = [ "NOPASSWD" ]; } ]; users = [ "telegraf" ]; }
|
||||
{
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.smartmontools}/bin/smartctl";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
users = [ "telegraf" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue