nix/os-mods/netdata/default.nix

53 lines
1,014 B
Nix
Raw Permalink Normal View History

2025-02-24 17:26:11 +01:00
{ config
, lib
, pkgs
, modulesPath
, system
, inputs
, ...
}: {
# TODO allow primary/node config option to listen/send metrics to central location
services.netdata = {
enable = true;
package = pkgs.netdata;
python = {
enable = true;
extraPackages = ps: [
ps.psycopg2
ps.docker
ps.dnspython
];
};
config = {
global = {
# update interval
"update every" = 2;
};
db = {
"update every" = 2;
"storage tiers" = 3;
"dbengine multihost disk space MB" = 1024;
"dbengine tier 1 multihost disk space MB" = 1024;
"dbengine tier 2 multihost disk space MB" = 512;
"cleanup obsolete charts after secs" = 600;
};
plugins = {
"go.d" = "yes";
};
ml = {
# enable machine learning
"enabled" = "yes";
};
};
};
networking.firewall.allowedTCPPortRanges = [
{
from = 19999;
to = 19999;
} # netdata
];
}