modules/nixos/monitoring: switch back to separate subdomains

reverts d4343f7ebe
This commit is contained in:
zowoq 2024-11-24 09:44:15 +10:00
parent d259ff73c1
commit 3483677fcc
5 changed files with 18 additions and 15 deletions
modules/nixos/monitoring

View file

@ -14,16 +14,19 @@
owner = "nginx";
};
services.nginx.virtualHosts."monitoring.nix-community.org" = {
locations."/".return = "302 https://nix-community.org/monitoring";
locations."/alertmanager/" = {
services.nginx.virtualHosts."alertmanager.nix-community.org" = {
locations."/" = {
basicAuthFile = config.age.secrets.nginx-basic-auth-file.path;
proxyPass = "http://localhost:9093/";
};
locations."/grafana/" = {
};
services.nginx.virtualHosts."grafana.nix-community.org" = {
locations."/" = {
proxyPass = "http://localhost:3000/";
proxyWebsockets = true;
};
locations."/prometheus/".proxyPass = "http://localhost:9090/";
};
services.nginx.virtualHosts."prometheus.nix-community.org" = {
locations."/".proxyPass = "http://localhost:9090/";
};
}

View file

@ -32,8 +32,8 @@
};
server = {
root_url = "https://monitoring.nix-community.org/grafana/";
domain = "monitoring.nix-community.org";
root_url = "https://grafana.nix-community.org/";
domain = "grafana.nix-community.org";
enforce_domain = true;
enable_gzip = true;
};

View file

@ -12,10 +12,9 @@
services.prometheus = {
enable = true;
checkConfig = true;
webExternalUrl = "https://monitoring.nix-community.org/prometheus/";
webExternalUrl = "https://prometheus.nix-community.org/";
extraFlags = [
"--storage.tsdb.retention.time=30d"
"--web.route-prefix=/"
];
scrapeConfigs = [
{
@ -46,11 +45,10 @@
services.prometheus.alertmanager = {
enable = true;
webExternalUrl = "https://monitoring.nix-community.org/alertmanager/";
webExternalUrl = "https://alertmanager.nix-community.org/";
listenAddress = "[::1]";
extraFlags = [
"--cluster.listen-address=''"
"--web.route-prefix=/"
];
configuration = {
route = {