hackens(monitoring): fping critical domains

This commit is contained in:
HackENS milieu 2021-11-02 21:04:24 +01:00
parent 348d33493b
commit afcb1aead2

View file

@ -1,7 +1,12 @@
{ pkgs, ... }:
{ pkgs, config, ... }:
{
# Monitoring
services.netdata.enable = true;
systemd.services.netdata.restartTriggers = map (name: config.environment.etc."netdata/${name}.conf".source) [
"health_alarm_notify"
"stream"
"fping"
];
environment.etc."netdata/stream.conf" = {
user = "netdata";
group = "netdata";
@ -40,16 +45,28 @@
IRC_REALNAME="hackENS netdata monitoring"
'';
};
environment.etc."netdata/fping.conf" = {
user = "netdata";
group = "netdata";
mode = "0600";
text = ''
fping="${pkgs.fping}/bin/fping"
hosts="hackens.org hack.ens.fr sas.eleves.ens.fr argonaut.ens.wtf clipper.ens.fr merle.eleves.ens.fr"
'';
};
services.smartd.enable = true;
services.smartd.extraOptions = [ "-A /var/log/smartd/" ]; # For netdata.
# MQTT for every usage, notably OctoPrint events.
services.mosquitto = {
enable = true;
host = "192.168.1.118";
users = {};
listeners = [
{
address = "192.168.1.118";
}
];
settings = {
allow_anonymous = true;
# allow_anonymous = true;
};
};
}