61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{ 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"
|
|
];
|
|
}];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|