feat(vault01): Deploy victorialogs to prepare the collect of the AP logs #305
1 changed files with 23 additions and 8 deletions
|
@ -2,21 +2,36 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: EUPL-1.2
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
|
{ meta, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
port = 9428;
|
port = 9428;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
services.victorialogs = {
|
services = {
|
||||||
enable = true;
|
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 = {
|
flags = {
|
||||||
retentionPeriod = "52w";
|
retentionPeriod = "52w";
|
||||||
# FIXME: We need to listen so that we are available for both the APs and the grafana
|
httpListenAddr = "127.0.0.1:${builtins.toString port}";
|
||||||
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 = {
|
||||||
networking.firewall.interfaces.wt0.allowedTCPPorts = [ port ];
|
wt0.allowedTCPPorts = [ port ];
|
||||||
|
vlan-admin-ap.allowedTCPPorts = [ port ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue