ninurta: monitoring with munin

This commit is contained in:
Tim Schubert 2024-02-04 17:39:40 +01:00
parent c66a0f847c
commit 0b874cf252
Signed by: dadada
SSH key fingerprint: SHA256:bFAjFH3hR8zRBaJjzQDjc3o4jqoq5EZ87l+KXEjxIz0
4 changed files with 47 additions and 0 deletions

View file

@ -82,6 +82,14 @@
tcpdump
];
services.munin-node = {
enable = true;
extraConfig = ''
host_name ${config.networking.hostName}
cidr_allow 192.168.101.184/32
'';
};
# Running router VM. They have to be restarted in the right order, so network comes up cleanly. Not ideal.
system.autoUpgrade.allowReboot = false;

View file

@ -18,6 +18,7 @@ in
../modules/profiles/server.nix
./hardware-configuration.nix
./printing.nix
./monitoring.nix
];
services.soft-serve = {
@ -377,6 +378,7 @@ in
allowPing = true;
allowedTCPPorts = [
22 # SSH
80 # munin web
631 # Printing
3000 # Hydra
softServePort

View file

@ -0,0 +1,28 @@
{ config, ... }:
{
services.nginx.enable = true;
services.nginx.virtualHosts."ninurta.bs.dadada.li" = {
addSSL = false;
enableACME = false;
root = "/var/www/munin/";
locations = {
"/" = {
root = "/var/www/munin/";
};
};
};
services.munin-cron = {
enable = true;
hosts = ''
[${config.networking.hostName}]
address localhost
[surgat]
address 10.3.3.1
[agares]
address 192.168.101.1
'';
};
services.munin-node.enable = true;
}

View file

@ -123,6 +123,7 @@ in
22 # SSH
80
443 # HTTPS
4949 # munin-node
];
allowedUDPPorts = [
51234 # Wireguard
@ -150,5 +151,13 @@ in
services.postgresql.package = pkgs.postgresql_15;
services.munin-node = {
enable = true;
extraConfig = ''
host_name surgat
cidr_allow 10.3.3.3/32
'';
};
system.stateVersion = "23.05";
}