mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-06-16 09:39:14 +02:00
{ildkule/loki,base/fluentbit}: send data over https
This commit is contained in:
@@ -62,8 +62,10 @@ in
|
|||||||
name = "loki";
|
name = "loki";
|
||||||
match = "*";
|
match = "*";
|
||||||
|
|
||||||
host = "ildkule.pvv.ntnu.no";
|
host = "loki.pvv.ntnu.no";
|
||||||
port = 3100;
|
port = 443;
|
||||||
|
tls = "on";
|
||||||
|
"tls.verify" = "on";
|
||||||
uri = "/loki/api/v1/push";
|
uri = "/loki/api/v1/push";
|
||||||
compress = "gzip";
|
compress = "gzip";
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
let
|
let
|
||||||
cfg = config.services.loki;
|
cfg = config.services.loki;
|
||||||
stateDir = "/data/monitoring/loki";
|
stateDir = "/data/monitoring/loki";
|
||||||
# internalPort = 83100;
|
|
||||||
in {
|
in {
|
||||||
services.loki = {
|
services.loki = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -82,21 +81,16 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."loki-internal" = {
|
services.nginx.virtualHosts."loki.pvv.ntnu.no" = {
|
||||||
listen = [{
|
forceSSL = true;
|
||||||
addr = "0.0.0.0";
|
enableACME = true;
|
||||||
port = 3100;
|
kTLS = true;
|
||||||
ssl = false;
|
|
||||||
}];
|
|
||||||
locations = {
|
|
||||||
"/loki/api/v1/push" = {
|
|
||||||
proxyPass = "http://${cfg.configuration.server.http_listen_address}:${toString cfg.configuration.server.http_listen_port}";
|
|
||||||
};
|
|
||||||
"/" = {
|
|
||||||
return = "403";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 3100 ];
|
locations = {
|
||||||
|
"/".return = "403";
|
||||||
|
"/loki/api/v1/push" = {
|
||||||
|
proxyPass = "http://${cfg.configuration.server.http_listen_address}:${toString cfg.configuration.server.http_listen_port}/loki/api/v1/push";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user