feat(storage01): Deploy VictoriaMetrics and VictoriaLogs on the VPN

This commit is contained in:
Tom Hubrecht 2025-02-08 19:21:35 +01:00
parent 50a97b42ec
commit 358b5a6497
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
6 changed files with 51 additions and 22 deletions

View file

@ -23,6 +23,8 @@ lib.extra.mkConfig {
"peertube"
"prometheus"
"redirections"
"victorialogs"
"victoriametrics"
];
extraConfig = {

View file

@ -1,20 +0,0 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
let
host = "victoria-metrics.dgnum.eu";
port = 9099;
in
{
services.victoriametrics = {
enable = true;
listenAddress = "127.0.0.1:${builtins.toString port}";
};
dgn-web.simpleProxies.victoria-metrics = {
inherit host port;
};
}

View file

@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ meta, name, ... }:
let
port = 9428;
in
{
services.victorialogs = {
enable = true;
flags = {
retentionPeriod = "4w";
httpListenAddr = "${meta.network.${name}.netbirdIp}:${builtins.toString port}";
};
};
networking.firewall.interfaces.wt0.allowedTCPPorts = [ port ];
}

View file

@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ meta, name, ... }:
let
port = 8428;
in
{
services.victoriametrics = {
enable = true;
flags = {
# INFO: We keep the data for 2 years (24 months)
retentionPeriod = "24";
httpListenAddr = "${meta.network.${name}.netbirdIp}:${builtins.toString port}";
};
};
networking.firewall.interfaces.wt0.allowedTCPPorts = [ port ];
}

View file

@ -48,6 +48,8 @@
"services/forgejo-nix-runners"
"services/reaction"
"services/systemd-notify"
"services/victorialogs"
"services/victoriametrics"
]
++ nodeMeta.nix-modules
));

View file

@ -248,9 +248,9 @@
"url": "https://git.hubrecht.ovh/hubrecht/nix-modules"
},
"branch": "dgnum",
"revision": "494cd6ff8f798ed5084a61987f3b7c3a02ad4e48",
"revision": "3ecb220edde27cd3251f4f7574ba192d2e124015",
"url": null,
"hash": "1apyzbass3hafqjc8hbnp0dwi7bm8fg0ly2kynmk96z80kwczlsc"
"hash": "1qsczzvsgis48hh7cs8wh7v396yj6nbpg6nrfmyhn742x8ka6ac2"
},
"nix-pkgs": {
"type": "Git",