char filename[FILENAME_MAX + 1];
// registry enabled?
- registry.enabled = config_get_boolean("registry", "enabled", 0);
+ if(!default_rrdpush_exclusive) {
+ registry.enabled = config_get_boolean("registry", "enabled", 0);
+ }
+ else {
+ info("Registry is disabled - use the central netdata");
+ config_set_boolean("registry", "enabled", 0);
+ registry.enabled = 0;
+ }
// pathnames
- registry.pathname = config_get("registry", "registry db directory", VARLIB_DIR "/registry");
+ snprintfz(filename, FILENAME_MAX, "%s/registry", netdata_configured_varlib_dir);
+ registry.pathname = config_get("registry", "registry db directory", filename);
if(mkdir(registry.pathname, 0770) == -1 && errno != EEXIST)
fatal("Cannot create directory '%s'.", registry.pathname);
// filenames
snprintfz(filename, FILENAME_MAX, "%s/netdata.public.unique.id", registry.pathname);
registry.machine_guid_filename = config_get("registry", "netdata unique id file", filename);
- registry_get_this_machine_guid();
snprintfz(filename, FILENAME_MAX, "%s/registry.db", registry.pathname);
registry.db_filename = config_get("registry", "registry db file", filename);
registry.persons_expiration = config_get_number("registry", "registry expire idle persons days", 365) * 86400;
registry.registry_domain = config_get("registry", "registry domain", "");
registry.registry_to_announce = config_get("registry", "registry to announce", "https://registry.my-netdata.io");
- registry.hostname = config_get("registry", "registry hostname", config_get("global", "hostname", localhost.hostname));
+ registry.hostname = config_get("registry", "registry hostname", config_get("global", "hostname", "localhost"));
registry.verify_cookies_redirects = config_get_boolean("registry", "verify browser cookies support", 1);
setenv("NETDATA_REGISTRY_HOSTNAME", registry.hostname, 1);