infrastructure/machines/nixos/vault01/monitoring/victorialogs.nix

38 lines
734 B
Nix
Raw Normal View History

# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ meta, ... }:
let
port = 9428;
in
{
services = {
nginx = {
enable = true;
streamConfig = ''
server {
listen 10.0.253.1:${toString port};
listen ${meta.network.vault01.netbirdIp}:${toString port};
proxy_pass 127.0.0.1:${toString port};
}
'';
};
victorialogs = {
enable = true;
flags = {
retentionPeriod = "52w";
httpListenAddr = "127.0.0.1:${builtins.toString port}";
};
};
};
networking.firewall.interfaces = {
wt0.allowedTCPPorts = [ port ];
vlan-admin-ap.allowedTCPPorts = [ port ];
};
}