Compare commits

...

2 Commits

Author SHA1 Message Date
b3ebe3a3b0
Monitor prometheus metrics
Some checks failed
Run nix flake check / flake-check (push) Failing after 6m24s
Periodic flake update / flake-update (push) Successful in 1m59s
2024-12-05 19:36:55 +01:00
02ef7e861b
Add qemu guest agent to all VMs 2024-12-05 18:35:06 +01:00
10 changed files with 77 additions and 28 deletions

6
common/vm/default.nix Normal file
View File

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./qemu-guest.nix
];
}

4
common/vm/qemu-guest.nix Normal file
View File

@ -0,0 +1,4 @@
{ ... }:
{
services.qemuGuest.enable = true;
}

View File

@ -8,6 +8,7 @@
../template/hardware-configuration.nix
../../system
../../common/vm
];
nixpkgs.config.allowUnfree = true;

View File

@ -1,12 +1,17 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports =
[
../template/hardware-configuration.nix
imports = [
../template/hardware-configuration.nix
../../system
];
../../system
../../common/vm
];
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
@ -39,7 +44,10 @@
};
time.timeZone = "Europe/Oslo";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.tarball-ttl = 0;
environment.systemPackages = with pkgs; [
vim
@ -67,4 +75,3 @@
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -8,6 +8,7 @@
../template/hardware-configuration.nix
../../system
../../common/vm
];
nixpkgs.config.allowUnfree = true;

View File

@ -8,6 +8,7 @@
../template/hardware-configuration.nix
../../system
../../common/vm
];
nixpkgs.config.allowUnfree = true;
@ -52,6 +53,8 @@
git
];
services.qemuGuest.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];

View File

@ -1,14 +1,19 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports =
[
../template/hardware-configuration.nix
imports = [
../template/hardware-configuration.nix
../../system
../../services/ns/master-authorative.nix
../../services/ns/resolver.nix
];
../../system
../../services/ns/master-authorative.nix
../../services/ns/resolver.nix
../../common/vm
];
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
@ -38,7 +43,10 @@
};
time.timeZone = "Europe/Oslo";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.tarball-ttl = 0;
environment.systemPackages = with pkgs; [
vim
@ -54,4 +62,3 @@
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -1,14 +1,19 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports =
[
../template/hardware-configuration.nix
imports = [
../template/hardware-configuration.nix
../../system
../../services/ns/secondary-authorative.nix
../../services/ns/resolver.nix
];
../../system
../../services/ns/secondary-authorative.nix
../../services/ns/resolver.nix
../../common/vm
];
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
@ -38,7 +43,10 @@
};
time.timeZone = "Europe/Oslo";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
environment.systemPackages = with pkgs; [
vim
wget
@ -53,4 +61,3 @@
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -36,6 +36,9 @@
];
}
];
globalConfig = {
scrape_interval = "15s";
};
rules = [
''
groups:
@ -124,6 +127,14 @@
}
];
}
{
job_name = "prometheus";
static_configs = [
{
targets = [ "localhost:9090" ];
}
];
}
{
job_name = "pve-exporter";
static_configs = [

View File

@ -5,6 +5,8 @@
enabledCollectors = [
"systemd"
"logind"
"cgroups"
"processes"
];
};
}