This commit is contained in:
John Lancaster
2024-12-02 17:53:37 -06:00
parent 14b6a504e7
commit 92324773ff
2 changed files with 11 additions and 17 deletions

View File

@@ -1,9 +1,13 @@
{ pkgs, userName, ... }:
let
lokiPort = 3100;
in
{
networking.firewall.allowedTCPPorts = [ 3100 ];
networking.firewall.allowedTCPPorts = [ lokiPort ];
environment.systemPackages = with pkgs; [
(pkgs.writeShellScriptBin "loki-check" "curl http://127.0.0.1:3100/ready")
(pkgs.writeShellScriptBin "loki-check" "curl http://localhost:3100/ready")
(pkgs.writeShellScriptBin "loki-logs" "journalctl -b -u loki.service -n 25")
];
services.loki = {
@@ -11,8 +15,8 @@
user = "${userName}";
configuration = {
server.http_listen_port = 3100;
server.grpc_listen_port = 9096;
server.http_listen_port = lokiPort;
# server.grpc_listen_port = 9096;
auth_enabled = false;
ingester = {