From 506e09994516c55a0910be5e994954f51187a1c9 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Fri, 5 Aug 2022 18:52:06 +0200 Subject: [PATCH] monitoring: move to tiered dbengine with netdata nightly --- machines/core-services-01/monitoring.nix | 35 +++++++++++++++++++----- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/machines/core-services-01/monitoring.nix b/machines/core-services-01/monitoring.nix index 3aa17e9..2a8ac5f 100644 --- a/machines/core-services-01/monitoring.nix +++ b/machines/core-services-01/monitoring.nix @@ -34,7 +34,19 @@ let }; in { - services.netdata.enable = true; + services.netdata = { + enable = true; + package = pkgs.netdata.overrideAttrs (old: { + version = "1.35.0-nightly"; + src = pkgs.fetchFromGitHub { + owner = "netdata"; + repo = "netdata"; + rev = "955d1a7c61f4eab802648d563f84d978ebeb8fc4"; + sha256 = "sha256-gN44Df+k384NummsHls2JY1CinBaFK3cpdmmdZMbA44="; + fetchSubmodules = true; + }; + }); + }; # Allow WireGuard VPN networking.firewall.allowedUDPPorts = [ 51820 ]; @@ -70,9 +82,18 @@ in group = "netdata"; mode = "0600"; text = '' - [global] - page cache size = 32 - dbengine multihost disk space = 23058 + [db] + mode = dbengine + storage tiers = 3 + update every = 1 + dbengine multihost disk space MB = 23000 + dbengine page cache size MB = 384 + dbengine tier 1 update every iterations = 60 + dbengine tier 1 multihost disk space MB = 10000 + dbengine tier 1 page cache size MB = 384 + dbengine tier 2 update every iterations = 3600 + dbengine tier 2 multihost disk space MB = 5000 + dbengine tier 2 page cache size MB = 384 ''; }; @@ -150,9 +171,9 @@ in proxyPass = "http://localhost:19999"; extraConfig = '' # For large authentication-authorization headers - proxy_buffer_size 256k; - proxy_buffers 4 512k; - proxy_busy_buffers_size 512k; + proxy_buffer_size 128k; + proxy_buffers 4 256k; + proxy_busy_buffers_size 256k; ''; }; };