{ildkule/loki,base/fluentbit}: send data over https

This commit is contained in:
h7x4
2026-06-13 03:22:18 +09:00
parent d8d2ed1a8f
commit cd54eabe47
2 changed files with 11 additions and 15 deletions
+4 -2
View File
@@ -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";
+7 -13
View File
@@ -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 = { locations = {
"/".return = "403";
"/loki/api/v1/push" = { "/loki/api/v1/push" = {
proxyPass = "http://${cfg.configuration.server.http_listen_address}:${toString cfg.configuration.server.http_listen_port}"; proxyPass = "http://${cfg.configuration.server.http_listen_address}:${toString cfg.configuration.server.http_listen_port}/loki/api/v1/push";
};
"/" = {
return = "403";
}; };
}; };
}; };
networking.firewall.allowedTCPPorts = [ 3100 ];
} }