feat(vault01): Deploy victorialogs to prepare the collect of the AP logs #305
3 changed files with 47 additions and 0 deletions
|
@ -12,6 +12,7 @@ lib.extra.mkConfig {
|
||||||
enabledServices = [
|
enabledServices = [
|
||||||
# List of services to enable
|
# List of services to enable
|
||||||
"k-radius"
|
"k-radius"
|
||||||
|
"monitoring"
|
||||||
"networking"
|
"networking"
|
||||||
"ups"
|
"ups"
|
||||||
"ulogd"
|
"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
|
||||||
|
|||||||
|
];
|
||||||
|
}
|
37
machines/nixos/vault01/monitoring/victorialogs.nix
Normal file
37
machines/nixos/vault01/monitoring/victorialogs.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# 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 ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue
ptet bouger ups & ulogd dans ce dossier ducoup ?
Je pense que je ferai dans une itération future