parent
80c49ec8a5
commit
250eea0c18
7 changed files with 15420 additions and 2 deletions
40
config/monitoring/prometheus.nix
Normal file
40
config/monitoring/prometheus.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue