feat(vault01): Deploy victorialogs to prepare the collect of the AP logs

This commit is contained in:
Tom Hubrecht 2025-02-19 21:45:01 +01:00 committed by thubrecht
parent 3dd4619aa7
commit 9e4dec4fc0
3 changed files with 32 additions and 0 deletions

View file

@ -12,6 +12,7 @@ lib.extra.mkConfig {
enabledServices = [
# List of services to enable
"k-radius"
"monitoring"
"networking"
"ups"
"ulogd"

View file

@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
imports = [
./victorialogs.nix
];
}

View file

@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
let
port = 9428;
in
{
services.victorialogs = {
enable = true;
flags = {
retentionPeriod = "52w";
# FIXME: We need to listen so that we are available for both the APs and the grafana
httpListenAddr = "0.0.0.0:${builtins.toString port}";
};
};
# FIXME: @catvayor please do a nft rule to open the firewall on the AP-facing interfaces
networking.firewall.interfaces.wt0.allowedTCPPorts = [ port ];
}