feat(vault01): Deploy victorialogs to prepare the collect of the AP logs
This commit is contained in:
parent
3dd4619aa7
commit
9e4dec4fc0
3 changed files with 32 additions and 0 deletions
|
@ -12,6 +12,7 @@ lib.extra.mkConfig {
|
|||
enabledServices = [
|
||||
# List of services to enable
|
||||
"k-radius"
|
||||
"monitoring"
|
||||
"networking"
|
||||
"ups"
|
||||
"ulogd"
|
||||
|
|
9
machines/nixos/vault01/monitoring/default.nix
Normal file
9
machines/nixos/vault01/monitoring/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
{
|
||||
imports = [
|
||||
./victorialogs.nix
|
||||
];
|
||||
}
|
22
machines/nixos/vault01/monitoring/victorialogs.nix
Normal file
22
machines/nixos/vault01/monitoring/victorialogs.nix
Normal 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 ];
|
||||
}
|
Loading…
Add table
Reference in a new issue