hosts/library: extract prometheus config

This commit is contained in:
2025-06-02 22:49:53 +01:00
parent b4ef349c9c
commit 06a48940a9
2 changed files with 36 additions and 29 deletions

View File

@ -4,6 +4,7 @@
imports = [
./hardware-configuration.nix
./grafana.nix
./prometheus.nix
../server.nix
];
@ -47,35 +48,6 @@
enable = true;
};
services.prometheus = {
enable = true;
port = 9001;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9002;
};
zfs = {
enable = true;
port = 9003;
};
};
scrapeConfigs = [
{
job_name = "node";
static_configs = [
{
targets = [
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
"127.0.0.1:${toString config.services.prometheus.exporters.zfs.port}"
];
}
];
}
];
};
systemd.services.vps1-tunnel = {
enable = true;
description = "vps1.mesh.vimium.net SSH tunnel";