2024-01-30 14:21:50 +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;
|
2024-01-30 14:21:50 +00:00
|
|
|
enabledCollectors = ["systemd"];
|
2023-11-26 08:48:53 +00:00
|
|
|
port = 9002;
|
|
|
|
};
|
|
|
|
};
|
2024-01-30 14:21:50 +00:00
|
|
|
scrapeConfigs = [
|
|
|
|
{
|
|
|
|
job_name = "legion";
|
|
|
|
static_configs = [{targets = ["127.0.0.1:${toString exporters.node.port}"];}];
|
|
|
|
}
|
2024-02-21 12:31:26 +00:00
|
|
|
# {
|
|
|
|
# job_name = "minecraft";
|
|
|
|
# static_configs = [{targets = ["127.0.0.1:8000"];}];
|
|
|
|
# }
|
2024-01-30 14:21:50 +00:00
|
|
|
];
|
2023-11-26 08:48:53 +00:00
|
|
|
};
|
2024-01-30 14:21:50 +00:00
|
|
|
services.caddy.virtualHosts."grafana.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:3000";
|
2023-10-21 17:55:11 +01:00
|
|
|
}
|