Merge pull request #247319 from DDoSolitary/patch-netdata-ipc
netdata: set NETDATA_PIPENAME to /run/netdata/ipc
This commit is contained in:
commit
ea07a9a98e
|
@ -216,6 +216,7 @@ in {
|
||||||
PYTHONPATH = "${cfg.package}/libexec/netdata/python.d/python_modules";
|
PYTHONPATH = "${cfg.package}/libexec/netdata/python.d/python_modules";
|
||||||
} // lib.optionalAttrs (!cfg.enableAnalyticsReporting) {
|
} // lib.optionalAttrs (!cfg.enableAnalyticsReporting) {
|
||||||
DO_NOT_TRACK = "1";
|
DO_NOT_TRACK = "1";
|
||||||
|
NETDATA_PIPENAME = "/run/netdata/ipc";
|
||||||
};
|
};
|
||||||
restartTriggers = [
|
restartTriggers = [
|
||||||
config.environment.etc."netdata/netdata.conf".source
|
config.environment.etc."netdata/netdata.conf".source
|
||||||
|
|
|
@ -10,7 +10,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
netdata =
|
netdata =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [ curl jq ];
|
environment.systemPackages = with pkgs; [ curl jq netdata ];
|
||||||
services.netdata.enable = true;
|
services.netdata.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,5 +34,8 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
filter = '[.data[range(10)][.labels | indices("root")[0]]] | add | . > 0'
|
filter = '[.data[range(10)][.labels | indices("root")[0]]] | add | . > 0'
|
||||||
cmd = f"curl -s {url} | jq -e '{filter}'"
|
cmd = f"curl -s {url} | jq -e '{filter}'"
|
||||||
netdata.wait_until_succeeds(cmd)
|
netdata.wait_until_succeeds(cmd)
|
||||||
|
|
||||||
|
# check if the control socket is available
|
||||||
|
netdata.succeed("sudo netdatacli ping")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -103,6 +103,7 @@ stdenv.mkDerivation rec {
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapProgram $out/bin/netdata-claim.sh --prefix PATH : ${lib.makeBinPath [ openssl ]}
|
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/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;
|
enableParallelBuild = true;
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/daemon/commands.h b/daemon/commands.h
|
|
||||||
index bd4aabfe1cbe4..ce7eb3c730228 100644
|
|
||||||
--- a/daemon/commands.h
|
|
||||||
+++ b/daemon/commands.h
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
#ifdef _WIN32
|
|
||||||
# define PIPENAME "\\\\?\\pipe\\netdata-cli"
|
|
||||||
#else
|
|
||||||
-# define PIPENAME "/tmp/netdata-ipc"
|
|
||||||
+# define PIPENAME "/run/netdata/ipc"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_COMMAND_LENGTH 4096
|
|
Loading…
Reference in a new issue