Skip to content

Commit

Permalink
Merge pull request NixOS#247319 from DDoSolitary/patch-netdata-ipc
Browse files Browse the repository at this point in the history
netdata: set NETDATA_PIPENAME to /run/netdata/ipc
  • Loading branch information
wmertens authored Aug 7, 2023
2 parents ad54f05 + 060a47e commit ea07a9a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/netdata.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ in {
PYTHONPATH = "${cfg.package}/libexec/netdata/python.d/python_modules";
} // lib.optionalAttrs (!cfg.enableAnalyticsReporting) {
DO_NOT_TRACK = "1";
NETDATA_PIPENAME = "/run/netdata/ipc";
};
restartTriggers = [
config.environment.etc."netdata/netdata.conf".source
Expand Down
5 changes: 4 additions & 1 deletion nixos/tests/netdata.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
netdata =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ curl jq ];
environment.systemPackages = with pkgs; [ curl jq netdata ];
services.netdata.enable = true;
};
};
Expand All @@ -34,5 +34,8 @@ import ./make-test-python.nix ({ pkgs, ...} : {
filter = '[.data[range(10)][.labels | indices("root")[0]]] | add | . > 0'
cmd = f"curl -s {url} | jq -e '{filter}'"
netdata.wait_until_succeeds(cmd)
# check if the control socket is available
netdata.succeed("sudo netdatacli ping")
'';
})
1 change: 1 addition & 0 deletions pkgs/tools/system/netdata/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ stdenv.mkDerivation rec {
postFixup = ''
wrapProgram $out/bin/netdata-claim.sh --prefix PATH : ${lib.makeBinPath [ openssl ]}
wrapProgram $out/libexec/netdata/plugins.d/cgroup-network-helper.sh --prefix PATH : ${lib.makeBinPath [ bash ]}
wrapProgram $out/bin/netdatacli --set NETDATA_PIPENAME /run/netdata/ipc
'';

enableParallelBuild = true;
Expand Down
13 changes: 0 additions & 13 deletions pkgs/tools/system/netdata/ipc-socket-in-run.patch

This file was deleted.

0 comments on commit ea07a9a

Please sign in to comment.