42 lines
882 B
Nix
42 lines
882 B
Nix
|
{config, ...}: {
|
||
|
services.nginx.virtualHosts."grafana.vulpecula.zone" = {
|
||
|
addSSL = true;
|
||
|
enableACME = true;
|
||
|
locations."/".proxyPass = "http://localhost:${toString config.services.grafana.settings.server.http_port}";
|
||
|
};
|
||
|
|
||
|
services.grafana = {
|
||
|
enable = false;
|
||
|
settings.server = {
|
||
|
domain = "grafana.vulpecula.zone";
|
||
|
http_port = 62102;
|
||
|
http_addr = "0.0.0.0";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services.prometheus = {
|
||
|
enable = false;
|
||
|
port = 62103;
|
||
|
retentionTime = "60d";
|
||
|
|
||
|
exporters = {
|
||
|
node = {
|
||
|
enable = false;
|
||
|
enabledCollectors = ["systemd"];
|
||
|
port = 62104;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
scrapeConfigs = [
|
||
|
{
|
||
|
job_name = "vulpecula";
|
||
|
static_configs = [
|
||
|
{
|
||
|
targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"];
|
||
|
}
|
||
|
];
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
}
|