From: Ismaƫl Bouya Date: Tue, 3 Oct 2023 23:41:17 +0000 (+0200) Subject: Remove netdata that became unfree X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=9ffdbe82759987114353ed01d28126af94ffeea1;p=perso%2FImmae%2FConfig%2FNix.git Remove netdata that became unfree --- diff --git a/systems/eldiron/base.nix b/systems/eldiron/base.nix index cda518e..1f894a5 100644 --- a/systems/eldiron/base.nix +++ b/systems/eldiron/base.nix @@ -165,12 +165,6 @@ }; }; - services.netdata.enable = true; - services.netdata.config.global."memory mode" = "none"; - services.netdata.config.health."enabled" = "no"; - services.netdata.config.web.mode = "none"; - users.users."${config.services.netdata.user}".extraGroups = [ "keys" ]; - services.netdata.configDir."stream.conf" = config.secrets.fullPaths."netdata-stream.conf"; secrets.keys = { "ldap/pam_pgsql" = { user = "root"; @@ -188,17 +182,6 @@ ''; }; - "netdata-stream.conf" = { - user = config.services.netdata.user; - group = config.services.netdata.group; - permissions = "0400"; - text = '' - [stream] - enabled = yes - destination = ${config.myEnv.monitoring.netdata_aggregator} - api key = ${config.myEnv.monitoring.netdata_keys.eldiron} - ''; - }; "zrepl_backup/identity" = { user = "root"; group = "root"; diff --git a/systems/monitoring-1/base.nix b/systems/monitoring-1/base.nix index 8bfacc1..2d8139e 100644 --- a/systems/monitoring-1/base.nix +++ b/systems/monitoring-1/base.nix @@ -42,30 +42,6 @@ }) ]; - services.netdata.enable = true; - services.netdata.configDir."stream.conf" = config.secrets.fullPaths."netdata-stream.conf"; - services.netdata.config.web."allow dashboard from" = "localhost"; - services.netdata.config.web."allow badges from" = "*"; - services.netdata.config.web."allow streaming from" = "*"; - services.netdata.config.web."allow netdata.conf from" = "fd*"; - services.netdata.config.web."allow management from" = "fd*"; - networking.firewall.allowedTCPPorts = [ 19999 ]; - - secrets.keys = { - "netdata-stream.conf" = { - user = config.services.netdata.user; - group = config.services.netdata.group; - permissions = "0400"; - text = builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (_: key: '' - [${key}] - enabled = yes - default history = 3600 - default memory = ram - health enabled by default = auto - '') config.myEnv.monitoring.netdata_keys); - }; - }; - users.users."${config.services.netdata.user}".extraGroups = [ "keys" ]; # This value determines the NixOS release with which your system is # to be compatible, in order to avoid breaking some software such as # database servers. You should change this only after NixOS release diff --git a/systems/monitoring-1/status.nix b/systems/monitoring-1/status.nix index 8b6615f..e3b4962 100644 --- a/systems/monitoring-1/status.nix +++ b/systems/monitoring-1/status.nix @@ -25,34 +25,11 @@ recommendedOptimisation = true; recommendedGzipSettings = true; recommendedProxySettings = true; - upstreams."netdata".servers = { "127.0.0.1:19999" = {}; }; - upstreams."netdata".extraConfig = '' - keepalive 64; - ''; virtualHosts."status.immae.eu" = { acmeRoot = config.security.acme.defaults.webroot; useACMEHost = name; forceSSL = true; locations."/".proxyPass = "http://unix:/run/naemon-status/socket.sock:/"; - - locations."= /netdata".return = "301 /netdata/"; - locations."~ /netdata/(?.*)".extraConfig = '' - proxy_redirect off; - proxy_set_header Host $host; - - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Server $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_http_version 1.1; - proxy_pass_request_headers on; - proxy_set_header Connection "keep-alive"; - proxy_store off; - proxy_pass http://netdata/$ndpath$is_args$args; - - gzip on; - gzip_proxied any; - gzip_types *; - ''; }; }; security.acme.certs."${name}" = {