metrics lxc

This commit is contained in:
Robert Perce 2025-08-23 23:14:40 -05:00
parent 0559c57556
commit 02596b8624
7 changed files with 222 additions and 20 deletions

61
lxc-metrics.nix Normal file
View file

@ -0,0 +1,61 @@
{ config, inputs, pkgs, ... }:
{
imports = [
./lxc-base.nix
];
config = {
my.vm = {
name = "metrics01";
ip4 = "192.168.0.6";
};
# environment.systemPackages = with pkgs; [
# ]
networking.extraHosts = ''
192.168.0.2 xalicas
192.168.0.3 proxmox
192.168.0.4 craft01
192.168.0.5 lab01
192.168.0.6 metrics01
192.168.0.100 unifi
'';
networking.firewall.allowedTCPPorts = [ 3000 ];
services.grafana = {
enable = true;
settings = {
server = {
http_addr = "0.0.0.0";
http_port = 3000;
enable_gzip = true;
enforce_domain = false;
domain = "metrics.rperce.net";
};
};
};
services.prometheus = {
enable = true;
port = 9001;
scrapeConfigs = [
{ job_name = "nodes";
static_configs = [{
targets = [
"xalicas:9100"
"proxmox:9100"
"craft01:9100"
"lab01:9100"
"127.0.0.1:9100"
"unifi:9100"
];
}];
}
];
};
};
}