summaryrefslogtreecommitdiffstats
path: root/registry
diff options
context:
space:
mode:
authorChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-01-15 12:49:28 +0100
committerGitHub <noreply@github.com>2019-01-15 12:49:28 +0100
commit08649bec373555144878b4314e87c9a8eb38c82e (patch)
tree23c9246e606f948944af8bc33f976085fa455848 /registry
parent67834f184ff3d67f6c8b6005ac68b568d7573118 (diff)
Port ACLs, Management API and Health commands (#4969)
##### Summary fixes #2673 fixes #2149 fixes #5017 fixes #3830 fixes #3187 fixes #5154 Implements a command API for health which will accept commands via a socket to selectively suppress health checks. Allows different ports to accept different request types (streaming, dashboard, api, registry, netdata.conf, badges, management) Removes support for multi-threaded and single-threaded web servers. ##### Component Name health, daemon
Diffstat (limited to 'registry')
-rw-r--r--registry/README.md4
-rw-r--r--registry/registry.h1
-rw-r--r--registry/registry_person.c2
-rw-r--r--registry/registry_url.c2
4 files changed, 5 insertions, 4 deletions
diff --git a/registry/README.md b/registry/README.md
index 589a77fd05..5a9a2b3bbc 100644
--- a/registry/README.md
+++ b/registry/README.md
@@ -36,11 +36,11 @@ The registry keeps track of 3 entities:
For each netdata installation (each `machine_guid`) the registry keeps track of the different URLs it is accessed.
-1. **persons**: i.e. the web browsers accessing the netdata installations (a random GUID generated by the registry the first time it sees a new web browser; we call this **person_guid**)
+2. **persons**: i.e. the web browsers accessing the netdata installations (a random GUID generated by the registry the first time it sees a new web browser; we call this **person_guid**)
For each person, the registry keeps track of the netdata installations it has accessed and their URLs.
-1. **URLs** of netdata installations (as seen by the web browsers)
+3. **URLs** of netdata installations (as seen by the web browsers)
For each URL, the registry keeps the URL and nothing more. Each URL is linked to *persons* and *machines*. The only way to find a URL is to know its **machine_guid** or have a **person_guid** it is linked to it.
diff --git a/registry/registry.h b/registry/registry.h
index ab36de014f..ca74300e06 100644
--- a/registry/registry.h
+++ b/registry/registry.h
@@ -72,6 +72,7 @@ extern int registry_request_hello_json(RRDHOST *host, struct web_client *w);
extern void registry_statistics(void);
extern char *registry_get_this_machine_guid(void);
+extern char *registry_get_mgmt_api_key(void);
extern char *registry_get_this_machine_hostname(void);
extern int regenerate_guid(const char *guid, char *result);
diff --git a/registry/registry_person.c b/registry/registry_person.c
index 53e3f47f42..268b0bd136 100644
--- a/registry/registry_person.c
+++ b/registry/registry_person.c
@@ -79,7 +79,7 @@ REGISTRY_PERSON_URL *registry_person_url_allocate(REGISTRY_PERSON *p, REGISTRY_M
REGISTRY_PERSON_URL *tpu = registry_person_url_index_add(p, pu);
if(tpu != pu) {
error("Registry: Attempted to add duplicate person url '%s' with name '%s' to person '%s'", u->url, name, p->guid);
- free(pu);
+ freez(pu);
pu = tpu;
}
else
diff --git a/registry/registry_url.c b/registry/registry_url.c
index 6a71064588..9ac3ce10c5 100644
--- a/registry/registry_url.c
+++ b/registry/registry_url.c
@@ -51,7 +51,7 @@ REGISTRY_URL *registry_url_get(const char *url, size_t urllen) {
n = registry_url_index_add(u);
if(n != u) {
error("INTERNAL ERROR: registry_url_get(): url '%s' already exists in the registry as '%s'", u->url, n->url);
- free(u);
+ freez(u);
u = n;
}
else