Loading nixos/modules/services/monitoring/netdata.nix +2 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,8 @@ in { ++ lib.optional cfg.python.enable (pkgs.python3.withPackages cfg.python.extraPackages) ++ lib.optional config.virtualisation.libvirtd.enable config.virtualisation.libvirtd.package ++ lib.optional config.virtualisation.docker.enable config.virtualisation.docker.package ++ lib.optionals config.virtualisation.podman.enable [ pkgs.jq config.virtualisation.podman.package ]; ++ lib.optionals config.virtualisation.podman.enable [ pkgs.jq config.virtualisation.podman.package ] ++ lib.optional config.boot.zfs.enabled config.boot.zfs.package; environment = { PYTHONPATH = "${cfg.package}/libexec/netdata/python.d/python_modules"; NETDATA_PIPENAME = "/run/netdata/ipc"; Loading pkgs/tools/system/netdata/dashboard-v2-removal.patch 0 → 100644 +25 −0 Original line number Diff line number Diff line # Original: https://github.com/netdata/netdata/pull/17240 diff --git a/CMakeLists.txt b/CMakeLists.txt index f37cbd18a..6db4c9f52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,7 @@ mark_as_advanced(DEFAULT_FEATURE_STATE) # High-level features option(ENABLE_ACLK "Enable Netdata Cloud support (ACLK)" ${DEFAULT_FEATURE_STATE}) option(ENABLE_CLOUD "Enable Netdata Cloud by default at runtime" ${DEFAULT_FEATURE_STATE}) +option(ENABLE_DASHBOARD_V2 "enable dashboard v2" True) option(ENABLE_ML "Enable machine learning features" ${DEFAULT_FEATURE_STATE}) option(ENABLE_DBENGINE "Enable dbengine metrics storage" True) @@ -2946,7 +2947,9 @@ endif() # include(src/web/gui/v1/dashboard_v1.cmake) -include(src/web/gui/v2/dashboard_v2.cmake) +if(ENABLE_DASHBOARD_V2) + include(src/web/gui/v2/dashboard_v2.cmake) +endif() include(src/web/gui/gui.cmake) function(cat IN_FILE OUT_FILE) No newline at end of file pkgs/tools/system/netdata/default.nix +10 −16 Original line number Diff line number Diff line { lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, makeWrapper { lib, stdenv, fetchFromGitHub, cmake, pkg-config, makeWrapper , CoreFoundation, IOKit, libossp_uuid , nixosTests , bash, curl, jemalloc, json_c, libuv, zlib, libyaml, libelf, libbpf Loading @@ -20,7 +20,7 @@ }: stdenv.mkDerivation rec { version = "1.45.4"; version = "1.46.1"; pname = "netdata"; src = fetchFromGitHub { Loading @@ -28,9 +28,9 @@ stdenv.mkDerivation rec { repo = "netdata"; rev = "v${version}"; hash = if withCloudUi then "sha256-g/wxKtpNsDw/ZaUokdip39enQHMysJE6pYGsApuL4po=" then "sha256-tFjczhJ7bIEUDZx3MxYBu4tGkJhoQn5V79D4sLV2o8U=" # we delete the v2 GUI after fetching else "sha256-Mkrmvdr19sWzFOkdpt46mcsbA3CNpXy4w8um95xaWlo="; else "sha256-uW3jRiJjFIFSfmmavM3KVF985F8nMKa+lQAgNBZvKyE="; fetchSubmodules = true; # Remove v2 dashboard distributed under NCUL1. Make sure an empty Loading Loading @@ -60,18 +60,12 @@ stdenv.mkDerivation rec { ++ lib.optionals withSsl [ openssl ]; patches = [ # Allow ndsudo to use non-hardcoded `PATH` # See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868 # https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93 ./ndsudo-fix-path.patch # Allow building without non-free v2 dashboard. (fetchpatch { url = "https://github.com/netdata/netdata/pull/17240/commits/b108df72281633234b731b223d99ec99f1d36adf.patch"; hash = "sha256-tgsnbNY0pxFU3bz1J1qPaAeVsozsk2bpHV2mNy8A9is="; }) # Allow for go.d plugins to access the right directory. # Can be removed once > v1.45.4 is released # https://github.com/netdata/netdata/pull/17661 (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/netdata/netdata/pull/17661.patch"; sha256 = "sha256-j+mrwkibQio2KO8UnV7sxzCoHmkcsalHNzP+YvrRz74="; }) ./dashboard-v2-removal.patch ]; # Guard against unused buld-time development inputs in closure. Without Loading Loading @@ -186,7 +180,7 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/src/go/collectors/go.d.plugin"; vendorHash = "sha256-KO+xMk6fpZCYRyxxKrsGfOHJ2bwjBaSmkgz1jIUHaZs="; vendorHash = "sha256-fK6pboXgJom77iakb+CJvNuweQjLIrpS7suWRNY/KM4="; doCheck = false; proxyVendor = true; Loading pkgs/tools/system/netdata/ndsudo-fix-path.patch 0 → 100644 +16 −0 Original line number Diff line number Diff line # See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868 # https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93 diff --git a/src/collectors/plugins.d/ndsudo.c b/src/collectors/plugins.d/ndsudo.c index 8b4d76f46..68fa52d38 100644 --- a/src/collectors/plugins.d/ndsudo.c +++ b/src/collectors/plugins.d/ndsudo.c @@ -357,9 +357,6 @@ int main(int argc, char *argv[]) { return 3; } - char new_path[] = "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"; - putenv(new_path); - bool found = false; char filename[FILENAME_MAX]; No newline at end of file Loading
nixos/modules/services/monitoring/netdata.nix +2 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,8 @@ in { ++ lib.optional cfg.python.enable (pkgs.python3.withPackages cfg.python.extraPackages) ++ lib.optional config.virtualisation.libvirtd.enable config.virtualisation.libvirtd.package ++ lib.optional config.virtualisation.docker.enable config.virtualisation.docker.package ++ lib.optionals config.virtualisation.podman.enable [ pkgs.jq config.virtualisation.podman.package ]; ++ lib.optionals config.virtualisation.podman.enable [ pkgs.jq config.virtualisation.podman.package ] ++ lib.optional config.boot.zfs.enabled config.boot.zfs.package; environment = { PYTHONPATH = "${cfg.package}/libexec/netdata/python.d/python_modules"; NETDATA_PIPENAME = "/run/netdata/ipc"; Loading
pkgs/tools/system/netdata/dashboard-v2-removal.patch 0 → 100644 +25 −0 Original line number Diff line number Diff line # Original: https://github.com/netdata/netdata/pull/17240 diff --git a/CMakeLists.txt b/CMakeLists.txt index f37cbd18a..6db4c9f52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,7 @@ mark_as_advanced(DEFAULT_FEATURE_STATE) # High-level features option(ENABLE_ACLK "Enable Netdata Cloud support (ACLK)" ${DEFAULT_FEATURE_STATE}) option(ENABLE_CLOUD "Enable Netdata Cloud by default at runtime" ${DEFAULT_FEATURE_STATE}) +option(ENABLE_DASHBOARD_V2 "enable dashboard v2" True) option(ENABLE_ML "Enable machine learning features" ${DEFAULT_FEATURE_STATE}) option(ENABLE_DBENGINE "Enable dbengine metrics storage" True) @@ -2946,7 +2947,9 @@ endif() # include(src/web/gui/v1/dashboard_v1.cmake) -include(src/web/gui/v2/dashboard_v2.cmake) +if(ENABLE_DASHBOARD_V2) + include(src/web/gui/v2/dashboard_v2.cmake) +endif() include(src/web/gui/gui.cmake) function(cat IN_FILE OUT_FILE) No newline at end of file
pkgs/tools/system/netdata/default.nix +10 −16 Original line number Diff line number Diff line { lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, makeWrapper { lib, stdenv, fetchFromGitHub, cmake, pkg-config, makeWrapper , CoreFoundation, IOKit, libossp_uuid , nixosTests , bash, curl, jemalloc, json_c, libuv, zlib, libyaml, libelf, libbpf Loading @@ -20,7 +20,7 @@ }: stdenv.mkDerivation rec { version = "1.45.4"; version = "1.46.1"; pname = "netdata"; src = fetchFromGitHub { Loading @@ -28,9 +28,9 @@ stdenv.mkDerivation rec { repo = "netdata"; rev = "v${version}"; hash = if withCloudUi then "sha256-g/wxKtpNsDw/ZaUokdip39enQHMysJE6pYGsApuL4po=" then "sha256-tFjczhJ7bIEUDZx3MxYBu4tGkJhoQn5V79D4sLV2o8U=" # we delete the v2 GUI after fetching else "sha256-Mkrmvdr19sWzFOkdpt46mcsbA3CNpXy4w8um95xaWlo="; else "sha256-uW3jRiJjFIFSfmmavM3KVF985F8nMKa+lQAgNBZvKyE="; fetchSubmodules = true; # Remove v2 dashboard distributed under NCUL1. Make sure an empty Loading Loading @@ -60,18 +60,12 @@ stdenv.mkDerivation rec { ++ lib.optionals withSsl [ openssl ]; patches = [ # Allow ndsudo to use non-hardcoded `PATH` # See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868 # https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93 ./ndsudo-fix-path.patch # Allow building without non-free v2 dashboard. (fetchpatch { url = "https://github.com/netdata/netdata/pull/17240/commits/b108df72281633234b731b223d99ec99f1d36adf.patch"; hash = "sha256-tgsnbNY0pxFU3bz1J1qPaAeVsozsk2bpHV2mNy8A9is="; }) # Allow for go.d plugins to access the right directory. # Can be removed once > v1.45.4 is released # https://github.com/netdata/netdata/pull/17661 (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/netdata/netdata/pull/17661.patch"; sha256 = "sha256-j+mrwkibQio2KO8UnV7sxzCoHmkcsalHNzP+YvrRz74="; }) ./dashboard-v2-removal.patch ]; # Guard against unused buld-time development inputs in closure. Without Loading Loading @@ -186,7 +180,7 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/src/go/collectors/go.d.plugin"; vendorHash = "sha256-KO+xMk6fpZCYRyxxKrsGfOHJ2bwjBaSmkgz1jIUHaZs="; vendorHash = "sha256-fK6pboXgJom77iakb+CJvNuweQjLIrpS7suWRNY/KM4="; doCheck = false; proxyVendor = true; Loading
pkgs/tools/system/netdata/ndsudo-fix-path.patch 0 → 100644 +16 −0 Original line number Diff line number Diff line # See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868 # https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93 diff --git a/src/collectors/plugins.d/ndsudo.c b/src/collectors/plugins.d/ndsudo.c index 8b4d76f46..68fa52d38 100644 --- a/src/collectors/plugins.d/ndsudo.c +++ b/src/collectors/plugins.d/ndsudo.c @@ -357,9 +357,6 @@ int main(int argc, char *argv[]) { return 3; } - char new_path[] = "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"; - putenv(new_path); - bool found = false; char filename[FILENAME_MAX]; No newline at end of file