netdata: monitor pve01, alert #réseau over IRC, store more metrics (~2GiB)

This commit is contained in:
Raito Bezarius 2021-07-28 23:10:45 +02:00
parent 6509fe0f36
commit 6b7f3d32ff

View file

@ -6,6 +6,54 @@ in
{ {
services.netdata.enable = true; services.netdata.enable = true;
systemd.services.netdata.restartTriggers = map (v: config.environment.etc."netdata/${v}.conf".source) [
"netdata"
"stream"
"health_alarm_notify"
];
environment.etc."netdata/netdata.conf" = {
user = "netdata";
group = "netdata";
mode = "0600";
text = ''
[global]
page cache size = 32
dbengine multihost disk space = 2048
'';
};
environment.etc."netdata/stream.conf" = {
user = "netdata";
group = "netdata";
mode = "0600";
text = ''
[e245097d-bf52-4f66-9c10-984e8d5ee178]
enabled = yes
default history = 5000
default memory mode = dbengine
health enabled by default = auto
allow from = 10.1.1.10
'';
};
environment.etc."netdata/health_alarm_notify.conf" = {
user = "netdata";
group = "netdata";
mode = "0600";
text = ''
# External tools
nc="${pkgs.netcat}/bin/nc"
# IRC configuration
SEND_IRC="YES"
DEFAULT_RECIPIENT_IRC="#réseau"
IRC_NETWORK="ens.wtf"
IRC_NICKNAME="core-services-01"
IRC_REALNAME="KlubRZ Core Services 01"
'';
};
services.oauth2_proxy = { services.oauth2_proxy = {
enable = true; enable = true;
keyFile = config.age.secrets.oauth2ProxyKeyFile.path; keyFile = config.age.secrets.oauth2ProxyKeyFile.path;