This commit is contained in:
John Lancaster
2024-12-09 19:50:42 -06:00
parent 76dbeeeff1
commit 75d9d5a76e
5 changed files with 79 additions and 96 deletions

View File

@@ -1,12 +1,13 @@
{ pkgs, config, ... }:
let
lokiPort = config.services.loki.configuration.server.http_listen_port;
in
{
networking.firewall.allowedTCPPorts = [
config.services.loki.configuration.server.http_listen_port
];
networking.firewall.allowedTCPPorts = [ lokiPort ];
environment.systemPackages = with pkgs; [
(pkgs.writeShellScriptBin "loki-check" ''
curl http://localhost:${config.services.loki.configuration.server.http_listen_port}/ready
curl http://localhost:${builtins.toString lokiPort}/ready
'')
(pkgs.writeShellScriptBin "loki-logs" "journalctl -b -u loki.service -n 10")
];