Add prometheus and node_exporter to grafana
This commit is contained in:
parent
754c324f80
commit
5f65ab02ac
|
@ -10,6 +10,22 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
services.prometheus = rec {
|
||||
enable = true;
|
||||
port = 9001;
|
||||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
port = 9002;
|
||||
};
|
||||
};
|
||||
scrapeConfigs = [{
|
||||
job_name = "legion";
|
||||
static_configs =
|
||||
[{ targets = [ "127.0.0.1:${toString exporters.node.port}" ]; }];
|
||||
}];
|
||||
};
|
||||
services.caddy.virtualHosts."grafana.xenia.me.uk".extraConfig =
|
||||
"reverse_proxy http://localhost:3000";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue