From b812d23e32c858e5ef9cb1b4965e49aee8a97a74 Mon Sep 17 00:00:00 2001 From: Paul Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com> Date: Tue, 5 Mar 2019 10:10:09 +0000 Subject: Minor fixes around plugin_directories initialization (#5536) * Daemon minor cleanups: 1) pull in plugin directories logic, inside the pluginsd where it belongs and call a method from the daemon to do so, 2) Magic numbers are evil, give a meaningful definition for that plugin directories retrieval * Rename netdata_configured_plugins_dir -> netdata_configured_primary_plugins_dir. We allow multiple plugin directories and this is actually the primary (or stock?) directory, just make it clear to avoid confusion * In this new wrapper, just return whatever the string splitter would return * Reduce the scope - consider moving this to somewhere else in a common place if needed by other modules later --- collectors/cgroups.plugin/sys_fs_cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'collectors/cgroups.plugin') diff --git a/collectors/cgroups.plugin/sys_fs_cgroup.c b/collectors/cgroups.plugin/sys_fs_cgroup.c index 41a5af31eb..1d42f7292c 100644 --- a/collectors/cgroups.plugin/sys_fs_cgroup.c +++ b/collectors/cgroups.plugin/sys_fs_cgroup.c @@ -210,10 +210,10 @@ void read_cgroup_plugin_configuration() { " * " ), NULL, SIMPLE_PATTERN_EXACT); - snprintfz(filename, FILENAME_MAX, "%s/cgroup-name.sh", netdata_configured_plugins_dir); + snprintfz(filename, FILENAME_MAX, "%s/cgroup-name.sh", netdata_configured_primary_plugins_dir); cgroups_rename_script = config_get("plugin:cgroups", "script to get cgroup names", filename); - snprintfz(filename, FILENAME_MAX, "%s/cgroup-network", netdata_configured_plugins_dir); + snprintfz(filename, FILENAME_MAX, "%s/cgroup-network", netdata_configured_primary_plugins_dir); cgroups_network_interface_script = config_get("plugin:cgroups", "script to get cgroup network interfaces", filename); enabled_cgroup_renames = simple_pattern_create( -- cgit v1.2.3