Some fixes to logging config after file separation

This commit is contained in:
Random936 2025-09-02 20:09:07 -07:00
parent 6e3ff222ad
commit 05e7664925
2 changed files with 27 additions and 5 deletions

View File

@ -21,15 +21,37 @@
services.grafana = { services.grafana = {
enable = true; enable = true;
settings.server = { settings.server = {
http_addr = "0.0.0.0"; http_addr = "127.0.0.1";
http_port = 3000; http_port = 3000;
domain = "logging.randomctf.local"; domain = "grafana.randomctf.local";
}; };
}; };
services.nginx = { services.nginx = {
# Grafana enable = true;
virtualHosts = {
# Grafana
"grafana.randomctf.local" = {
extraConfig = ''
access_log /var/log/nginx/access.grafana.log;
'';
locations."/".extraConfig = ''
proxy_set_header Host grafana.randomctf.local;
proxy_pass http://localhost:3000/;
'';
};
# Prometheus
"prometheus.randomctf.local" = {
extraConfig = ''
access_log /var/log/nginx/access.prometheus.log;
'';
locations."/".extraConfig = ''
proxy_pass http://localhost:9090/;
'';
};
};
}; };
} }

View File

@ -7,7 +7,7 @@
services.prometheus = { services.prometheus = {
enable = true; enable = true;
port = 9001; port = 9090;
globalConfig.scrape_interval = "10s"; globalConfig.scrape_interval = "10s";
scrapeConfigs = let scrapeConfigs = let
node_port = toString config.services.prometheus.exporters.node.port; node_port = toString config.services.prometheus.exporters.node.port;