feat: Add Netdata client configuration systems

- Create new file `os-mods/netdata/client.nix` with Netdata service configuration
- Update nixos-desk & nixos-fw16 to include Netdata client configuration
This commit is contained in:
Tristan D. 2024-11-17 21:41:27 +01:00
parent 4d550fbfcb
commit 598480a0bb
Signed by: tristan
SSH key fingerprint: SHA256:9oFM1J63hYWJjCnLG6C0fxBS15rwNcWwdQNMOHYKJ/4
3 changed files with 60 additions and 1 deletions

View file

@ -0,0 +1,58 @@
{ config
, lib
, pkgs
, modulesPath
, system
, inputs
, ...
}: {
services.netdata = {
enable = true;
package = pkgs.netdata;
python = {
enable = true;
extraPackages = ps: [
ps.psycopg2
ps.docker
ps.dnspython
];
};
configDir = {
"stream.conf" = pkgs.writeText "stream.conf" ''
[stream]
enabled = yes
api key = 31de92c9-d863-4c39-af37-72a5c6e0796b
destination = 100.64.0.13:19999
'';
};
config = {
global = {
# uncomment to reduce memory to 32 MB
"page cache size" = 32;
# update interval
"update every" = 2;
};
db = {
"update every" = 2;
"storage tiers" = 3;
"dbengine multihost disk space MB" = 256;
"dbengine tier 1 multihost disk space MB" = 256;
"dbengine tier 2 multihost disk space MB" = 256;
"cleanup obsolete charts after secs" = 600;
};
plugins = {
"go.d" = "yes";
};
web = {
"mode" = "none";
};
ml = {
# enable machine learning
"enabled" = "no";
};
};
};
}

View file

@ -20,7 +20,7 @@
../../os-mods/desktop/audio.nix ../../os-mods/desktop/audio.nix
../../os-mods/desktop/gaming.nix ../../os-mods/desktop/gaming.nix
../../os-mods/desktop/printing.nix ../../os-mods/desktop/printing.nix
../../os-mods/netdata ../../os-mods/netdata/client.nix
../../os-mods/network ../../os-mods/network
../../os-mods/virt ../../os-mods/virt
../../users ../../users

View file

@ -19,6 +19,7 @@
../../os-mods/desktop/audio.nix ../../os-mods/desktop/audio.nix
../../os-mods/desktop/gaming.nix ../../os-mods/desktop/gaming.nix
../../os-mods/desktop/printing.nix ../../os-mods/desktop/printing.nix
../../os-mods/netdata/client.nix
../../os-mods/network ../../os-mods/network
# ../../os-mods/ryzenapu # ../../os-mods/ryzenapu
../../os-mods/virt ../../os-mods/virt