2023-11-23 08:40:32 +00:00
|
|
|
{ ... }: {
|
|
|
|
imports = [ ./caddy.nix ];
|
2023-10-21 17:55:11 +01:00
|
|
|
services.grafana = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
http_addr = "127.0.0.1";
|
2023-10-27 08:57:48 +01:00
|
|
|
http_port = 3000;
|
2023-10-21 17:55:11 +01:00
|
|
|
domain = "grafana.xenia.me.uk";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-11-26 08:48:53 +00:00
|
|
|
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}" ]; }];
|
|
|
|
}];
|
|
|
|
};
|
2023-11-23 08:40:32 +00:00
|
|
|
services.caddy.virtualHosts."grafana.xenia.me.uk".extraConfig =
|
|
|
|
"reverse_proxy http://localhost:3000";
|
2023-10-21 17:55:11 +01:00
|
|
|
}
|