1
0

Compare commits

...

2 Commits

Author SHA1 Message Date
Garionion
2ff4a27d5b monitoring: set retention time to 90d 2022-07-24 16:54:14 +02:00
Garionion
b5e87117aa monitoring: add snmp exporter 2022-07-24 16:52:54 +02:00
2 changed files with 31 additions and 5 deletions

View File

@ -21,13 +21,27 @@ with lib;
networking.defaultGateway = { address = "10.42.10.1"; interface = "ens18"; }; networking.defaultGateway = { address = "10.42.10.1"; interface = "ens18"; };
networking.defaultGateway6 = { address = "2a01:4f8:1c0c:8221::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2a01:4f8:1c0c:8221::1"; interface = "ens18"; };
environment = {
etc = {
"snmp-exporter/snmp.yml".source = ./snmp.yml;
};
};
services.influxdb2.enable = true; services.influxdb2.enable = true;
services.prometheus.exporters.blackbox = { services.prometheus.exporters = {
enable = true; blackbox = {
listenAddress = "[::1]"; enable = true;
port = 9115; listenAddress = "[::1]";
configFile = ./blackbox.yml; port = 9115;
configFile = ./blackbox.yml;
};
snmp = {
enable = true;
port= 9116;
listenAddress = "[::1]";
configurationPath = "/etc/snmp-exporter/snmp.yml";
};
}; };
services.prometheus.exporters.node.enable = true; services.prometheus.exporters.node.enable = true;
@ -60,6 +74,7 @@ with lib;
}; };
services.prometheus = { services.prometheus = {
enable = true; enable = true;
retentionTime = "90d";
listenAddress = "[::1]"; listenAddress = "[::1]";
scrapeConfigs = [ scrapeConfigs = [
{ {
@ -253,6 +268,17 @@ with lib;
} }
]; ];
} }
{
job_name = "snmp";
scrape_interval = "5m";
static_configs = [
{
targets = [
"[::1]:9116"
];
}
];
}
]; ];
alertmanagers = [ alertmanagers = [
{ {

View File