1{ config, ... }:
2{
3 services.prometheus = {
4 enable = true;
5 port = 6999;
6 exporters = {
7 node = {
8 enable = true;
9 enabledCollectors = [ "systemd" ];
10 port = 6998;
11 };
12 };
13 scrapeConfigs = [
14 {
15 job_name = "marvin";
16 static_configs = [
17 { targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; }
18 ];
19 }
20 {
21 job_name = "prometheus";
22 static_configs = [ { targets = [ "127.0.0.1:6999" ]; } ];
23 }
24 ];
25 };
26}