1
0

Roll out monitoring

This commit is contained in:
clerie 2022-07-11 22:37:26 +02:00
parent f31aef9b20
commit 6712d8d9d8
2 changed files with 29 additions and 13 deletions

View File

@ -21,6 +21,10 @@
deployment.targetUser = null; deployment.targetUser = null;
}; };
monitoring = { config, pkgs, ... }: {
deployment.targetHost = "monitoring.bula22.de";
};
nixdeploy = {...}: { nixdeploy = {...}: {
deployment.targetHost = "nixdeploy.bula22.de"; deployment.targetHost = "nixdeploy.bula22.de";
deployment.allowLocalDeployment = true; deployment.allowLocalDeployment = true;

View File

@ -6,13 +6,18 @@ with lib;
[ [
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
boot.loader.grub.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.grub.version = 2; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.device = "/dev/sda";
networking.hostName = "monitoring"; networking.hostName = "monitoring";
networking.useDHCP = false; networking.useDHCP = false;
networking.interfaces.ens18.ipv4.addresses = [ { address = ""; prefixLength = 24; } ]; networking.interfaces.ens18.ipv4.addresses = [
networking.interfaces.ens18.ipv6.addresses = [ { address = ""; prefixLength = 64; } ]; {address = "10.42.10.7"; prefixLength = 24; }
];
networking.interfaces.ens18.ipv6.addresses = [
{address = "2a01:4f8:1c0c:8221::7"; prefixLength = 64; }
{address = "2a01:4f8:1c0c:8221::1984"; prefixLength = 64; }
];
networking.defaultGateway = { address = "10.42.10.1"; interface = "ens18"; }; networking.defaultGateway = { address = "10.42.10.1"; interface = "ens18"; };
networking.defaultGateway6 = { address = "2a01:4f8:1c0c:8221::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2a01:4f8:1c0c:8221::1"; interface = "ens18"; };
networking.nameservers = [ "2a01:4f8:1c0c:8221::1" "10.42.10.1" ]; networking.nameservers = [ "2a01:4f8:1c0c:8221::1" "10.42.10.1" ];
@ -21,7 +26,17 @@ with lib;
enable = true; enable = true;
listenAddress = "[::1]"; listenAddress = "[::1]";
port = 9093; port = 9093;
configuration = {}; configuration = {
route = {
receiver = "default";
group_by = [ "instance" ];
};
receivers = [
{
name = "default";
}
];
};
}; };
services.prometheus = { services.prometheus = {
enable = true; enable = true;
@ -60,7 +75,7 @@ with lib;
} ]; } ];
} }
]; ];
rules = [ (readFile ./rules.yml) ]; rules = [ (readFile ./alertmanager-rules.yml) ];
}; };
services.grafana = { services.grafana = {
enable = true; enable = true;
@ -79,11 +94,7 @@ with lib;
isDefault = true; isDefault = true;
} }
]; ];
dashboards = [ dashboards = [];
{
options.path = ./dashboards;
}
];
}; };
}; };
services.nginx = { services.nginx = {
@ -102,5 +113,6 @@ with lib;
}; };
}; };
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
system.stateVersion = "";
system.stateVersion = "22.05";
} }