add grafana

This commit is contained in:
cy 2024-12-15 18:42:50 -05:00
parent 0337509664
commit ec1e45408f
3 changed files with 46 additions and 0 deletions

31
hosts/chunk/grafana.nix Normal file
View file

@ -0,0 +1,31 @@
{config,...}: {
services.grafana = {
enable = true;
settings.server = {
http_addr = "127.0.0.1";
http_port = 8088;
enforce_domain = true;
enable_gzip = true;
domain = "grafana.cything.io";
};
settings.analytics.reporting_enabled = false;
};
services.prometheus = {
enable = true;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
};
};
scrapeConfigs = [
{
job_name = "chrysalis";
static_configs = [{
targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"];
}];
}
];
};
}