ninurta: monitoring with munin
This commit is contained in:
parent
c66a0f847c
commit
0b874cf252
4 changed files with 47 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
28
nixos/ninurta/monitoring.nix
Normal file
28
nixos/ninurta/monitoring.nix
Normal 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;
|
||||
}
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue