lol

Merge pull request #264234 from guiguid/guiguid-patch-netdata-systemd-journal

netdata: 1.43.0 -> 1.43.2 and add systemd-journal plugin

authored by

Ryan Lahfa and committed by
GitHub
bc2b72df 408ed815

+25 -7
+11 -1
nixos/modules/services/monitoring/netdata.nix
··· 12 12 ln -s /run/wrappers/bin/perf.plugin $out/libexec/netdata/plugins.d/perf.plugin 13 13 ln -s /run/wrappers/bin/slabinfo.plugin $out/libexec/netdata/plugins.d/slabinfo.plugin 14 14 ln -s /run/wrappers/bin/freeipmi.plugin $out/libexec/netdata/plugins.d/freeipmi.plugin 15 + ln -s /run/wrappers/bin/systemd-journal.plugin $out/libexec/netdata/plugins.d/systemd-journal.plugin 15 16 ''; 16 17 17 18 plugins = [ ··· 254 255 # Capabilities 255 256 CapabilityBoundingSet = [ 256 257 "CAP_DAC_OVERRIDE" # is required for freeipmi and slabinfo plugins 257 - "CAP_DAC_READ_SEARCH" # is required for apps plugin 258 + "CAP_DAC_READ_SEARCH" # is required for apps and systemd-journal plugin 258 259 "CAP_FOWNER" # is required for freeipmi plugin 259 260 "CAP_SETPCAP" # is required for apps, perf and slabinfo plugins 260 261 "CAP_SYS_ADMIN" # is required for perf plugin ··· 263 264 "CAP_NET_RAW" # is required for fping app 264 265 "CAP_SYS_CHROOT" # is required for cgroups plugin 265 266 "CAP_SETUID" # is required for cgroups and cgroups-network plugins 267 + "CAP_SYSLOG" # is required for systemd-journal plugin 266 268 ]; 267 269 # Sandboxing 268 270 ProtectSystem = "full"; ··· 313 315 "perf.plugin" = { 314 316 source = "${cfg.package}/libexec/netdata/plugins.d/perf.plugin.org"; 315 317 capabilities = "cap_sys_admin+ep"; 318 + owner = cfg.user; 319 + group = cfg.group; 320 + permissions = "u+rx,g+x,o-rwx"; 321 + }; 322 + 323 + "systemd-journal.plugin" = { 324 + source = "${cfg.package}/libexec/netdata/plugins.d/systemd-journal.plugin.org"; 325 + capabilities = "cap_dac_read_search,cap_syslog+ep"; 316 326 owner = cfg.user; 317 327 group = cfg.group; 318 328 permissions = "u+rx,g+x,o-rwx";
+11 -3
pkgs/tools/system/netdata/default.nix
··· 13 13 , withConnPubSub ? false, google-cloud-cpp, grpc 14 14 , withConnPrometheus ? false, snappy 15 15 , withSsl ? true, openssl 16 + , withSystemdJournal ? (!stdenv.isDarwin), systemd 16 17 , withDebug ? false 17 18 }: 18 19 19 20 stdenv.mkDerivation rec { 20 21 # Don't forget to update go.d.plugin.nix as well 21 - version = "1.43.0"; 22 + version = "1.43.2"; 22 23 pname = "netdata"; 23 24 24 25 src = fetchFromGitHub { ··· 26 27 repo = "netdata"; 27 28 rev = "v${version}"; 28 29 hash = if withCloudUi 29 - then "sha256-hrwuJLO9/K5QT3j8d5RYHcpBHChpKvwajaCoUfikw88=" 30 - else "sha256-+bX6pVpW6N1ms04k63sJg0E9XMOai5K9IjEQPeVCzs8="; 30 + then "sha256-ZhSuU2VTJPFJ3ja5eHx5uTuR19LleoID8Efr9FTyg74=" 31 + else "sha256-t2awo118mYbuoNiKiAxM5xpRmQSha+/NR5G+shsotek="; 31 32 fetchSubmodules = true; 32 33 33 34 # Remove v2 dashboard distributed under NCUL1. Make sure an empty ··· 52 53 ++ lib.optionals withConnPubSub [ google-cloud-cpp grpc ] 53 54 ++ lib.optionals withConnPrometheus [ snappy ] 54 55 ++ lib.optionals (withCloud || withConnPrometheus) [ protobuf ] 56 + ++ lib.optionals withSystemdJournal [ systemd ] 55 57 ++ lib.optionals withSsl [ openssl ]; 56 58 57 59 patches = [ ··· 93 95 $out/libexec/netdata/plugins.d/perf.plugin.org 94 96 mv $out/libexec/netdata/plugins.d/slabinfo.plugin \ 95 97 $out/libexec/netdata/plugins.d/slabinfo.plugin.org 98 + ${lib.optionalString withSystemdJournal '' 99 + mv $out/libexec/netdata/plugins.d/systemd-journal.plugin \ 100 + $out/libexec/netdata/plugins.d/systemd-journal.plugin.org 101 + ''} 96 102 ${lib.optionalString withIpmi '' 97 103 mv $out/libexec/netdata/plugins.d/freeipmi.plugin \ 98 104 $out/libexec/netdata/plugins.d/freeipmi.plugin.org ··· 109 115 "--sysconfdir=/etc" 110 116 "--disable-ebpf" 111 117 "--with-jemalloc=${jemalloc}" 118 + ] ++ lib.optionals (withSystemdJournal) [ 119 + "--enable-plugin-systemd-journal" 112 120 ] ++ lib.optionals (!withDBengine) [ 113 121 "--disable-dbengine" 114 122 ] ++ lib.optionals (!withCloud) [
+3 -3
pkgs/tools/system/netdata/go.d.plugin.nix
··· 2 2 3 3 buildGo121Module rec { 4 4 pname = "netdata-go-plugins"; 5 - version = "0.56.3"; 5 + version = "0.56.4"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = "netdata"; 9 9 repo = "go.d.plugin"; 10 10 rev = "v${version}"; 11 - hash = "sha256-T7UB7qrcMTqIFRzBxbXmSqtcEFgZd0/z4EYuH/ydVi4="; 11 + hash = "sha256-7dR1TL2Ycb+7yHoFklrKdXXxIG4Tx+fAG5ScAAtbVRw="; 12 12 }; 13 13 14 - vendorHash = "sha256-N0p03urHC3d17VQ4TIs7mAemW9ZSpQw20EwwD6lSLLc="; 14 + vendorHash = "sha256-Faa+7tT3sPxlT6eQEmFotOJnt9b49ffDPEHt5V7tQa0="; 15 15 16 16 doCheck = false; 17 17