{ ... }: { imports = [ ../../templates/proxmox-lxc.nix ../../server.nix ../../features/dns-cache.nix ../../features/telemetry ]; networking.hostName = "monitoring"; system.stateVersion = "24.05"; nixpkgs.hostPlatform = "x86_64-linux"; services.grafana = { enable = true; settings = { server = { http_addr = "0.0.0.0"; http_port = 3000; domain = "monitoring.hoki-porgy.ts.net"; }; }; provision = { enable = true; datasources.settings.datasources = [ { url = "http://localhost:4000"; type = "prometheus"; name = "Prometheus"; } ]; }; }; services.prometheus = { enable = true; port = 4000; scrapeConfigs = let static = name: ports: { job_name = name; static_configs = [ { targets = map (port: "${name}.hoki-porgy.ts.net:${builtins.toString port}") ports; } ]; }; ports = { node = 14200; nginx = 14201; pve = 14210; }; in with ports; [ (static "aerial" [ node ]) (static "cider" [ node ]) (static "dis-sociat-ing" [ node ]) (static "exit-node" [ node ]) (static "git" [ node ]) (static "ingress-proxy" [ node nginx ]) (static "monitoring" [ node ]) (static "mumble" [ node ]) (static "nas0" [ node ]) (static "nextcloud" [ node ]) (static "pihole" [ node ]) (static "plex" [ node ]) (static "porcelain-doll-repair" [ node ]) (static "ps2live" [ node ]) (static "sapphic-engineer" [ node ]) (static "static-sites" [ node nginx ]) (static "ts3" [ node ]) { job_name = "pve_node"; static_configs = [ { targets = [ "10.69.0.1:${builtins.toString node}" ]; } ]; } { job_name = "pve_pve"; static_configs = [ { targets = [ "10.69.0.1:${builtins.toString pve}" ]; } ]; metrics_path = "/pve"; params = { module = ["default"]; cluster = ["1"]; node = ["1"]; }; } { job_name = "saerro"; static_configs = [ { targets = [ "saerro.ps2.live" ]; } ]; metrics_path = "/metrics/combined"; scheme = "https"; } { job_name = "porcelain-doll-repair-iceshrimp"; static_configs = [ { targets = [ "porcelain.doll.repair" ]; } ]; metrics_path = "/metrics"; scheme = "https"; } { job_name = "dis-sociat-ing-iceshrimp"; static_configs = [ { targets = [ "dis.sociat.ing" ]; } ]; metrics_path = "/metrics"; scheme = "https"; } { job_name = "plapkit"; static_configs = [ { targets = [ "i-pk.noe.sh" ]; } ]; metrics_path = "/metrics"; scheme = "https"; } ]; }; }