2022-12-19 22:56:42 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2022-12-20 21:44:22 +01:00
|
|
|
let
|
|
|
|
cfg = config.services.prometheus;
|
|
|
|
in {
|
2022-12-19 22:56:42 +01:00
|
|
|
services.prometheus = {
|
|
|
|
enable = true;
|
2022-12-20 00:26:29 +01:00
|
|
|
listenAddress = "127.0.0.1";
|
2022-12-19 22:56:42 +01:00
|
|
|
port = 9001;
|
|
|
|
|
|
|
|
scrapeConfigs = [
|
|
|
|
{
|
|
|
|
job_name = "node";
|
|
|
|
static_configs = [
|
|
|
|
{
|
|
|
|
targets = [
|
2022-12-20 21:44:22 +01:00
|
|
|
"ildkule.pvv.ntnu.no:${toString cfg.exporters.node.port}"
|
2022-12-19 22:56:42 +01:00
|
|
|
"microbel.pvv.ntnu.no:9100"
|
|
|
|
"knakelibrak.pvv.ntnu.no:9100"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|