40 lines
780 B
Nix
40 lines
780 B
Nix
{config, ...}: {
|
|
services.prometheus = {
|
|
enable = true;
|
|
port = 9100;
|
|
globalConfig.scrape_interval = "1m";
|
|
scrapeConfigs = [
|
|
{
|
|
job_name = "node";
|
|
static_configs = [
|
|
{
|
|
targets = [
|
|
"localhost:${
|
|
toString
|
|
config.services.prometheus.exporters.node.port
|
|
}"
|
|
];
|
|
}
|
|
];
|
|
}
|
|
];
|
|
|
|
exporters = {
|
|
node = {
|
|
enable = true;
|
|
port = 9101;
|
|
enabledCollectors = [
|
|
"ethtool"
|
|
"softirqs"
|
|
"systemd"
|
|
"tcpstat"
|
|
"wifi"
|
|
];
|
|
extraFlags = [
|
|
"--collector.ntp.protocol-version=4"
|
|
"--no-collector.mdadm"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|