1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2025-03-25 20:20:05 +01:00
parent 817ec5b6b8
commit 7061c52ef6
No known key found for this signature in database
6 changed files with 230 additions and 204 deletions

View file

@ -1,29 +1,30 @@
{config, ...}: {
services.prometheus = {
enable = true;
port = 3020;
exporters = {
node = {
enable = true;
listenAddress = "127.0.0.1";
port = 3021;
enabledCollectors = ["systemd"];
};
};
scrapeConfigs = [
{
job_name = "nodes";
static_configs = [
{
targets = let
host = config.services.prometheus.exporters.node.listenAddress;
port = builtins.toString config.services.prometheus.exporters.node.port;
in ["${host}:${port}"];
}
];
}
];
};
}
# {config, ...}: {
# services.prometheus = {
# enable = true;
# port = 3020;
#
# exporters = {
# node = {
# enable = true;
# listenAddress = "127.0.0.1";
# port = 3021;
# enabledCollectors = ["systemd"];
# };
# };
#
# scrapeConfigs = [
# {
# job_name = "nodes";
# static_configs = [
# {
# targets = let
# host = config.services.prometheus.exporters.node.listenAddress;
# port = builtins.toString config.services.prometheus.exporters.node.port;
# in ["${host}:${port}"];
# }
# ];
# }
# ];
# };
# }
{}