summaryrefslogtreecommitdiffstats
path: root/src/registry.c
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
commit61aedf201c2c4bf0e5aa4db32e74f4d860b88593 (patch)
treebcf4f9a0cd8bc2daf38b2ff9f29bfcc1e5ed8968 /src/registry.c
parentNew upstream version 1.8.0+dfsg (diff)
downloadnetdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.tar.xz
netdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.zip
New upstream version 1.9.0+dfsgupstream/1.9.0+dfsg
Diffstat (limited to 'src/registry.c')
-rw-r--r--src/registry.c58
1 files changed, 45 insertions, 13 deletions
diff --git a/src/registry.c b/src/registry.c
index 76e3fa4d..9d382e86 100644
--- a/src/registry.c
+++ b/src/registry.c
@@ -323,11 +323,21 @@ void registry_statistics(void) {
static RRDSET *sts = NULL, *stc = NULL, *stm = NULL;
- if(!sts) sts = rrdset_find_localhost("netdata.registry_sessions");
- if(!sts) {
- sts = rrdset_create_localhost("netdata", "registry_sessions", NULL, "registry", NULL
- , "NetData Registry Sessions", "session", 131000, localhost->rrd_update_every
- , RRDSET_TYPE_LINE);
+ if(unlikely(!sts)) {
+ sts = rrdset_create_localhost(
+ "netdata"
+ , "registry_sessions"
+ , NULL
+ , "registry"
+ , NULL
+ , "NetData Registry Sessions"
+ , "session"
+ , "registry"
+ , "stats"
+ , 131000
+ , localhost->rrd_update_every
+ , RRDSET_TYPE_LINE
+ );
rrddim_add(sts, "sessions", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
}
@@ -338,10 +348,21 @@ void registry_statistics(void) {
// ------------------------------------------------------------------------
- if(!stc) stc = rrdset_find_localhost("netdata.registry_entries");
- if(!stc) {
- stc = rrdset_create_localhost("netdata", "registry_entries", NULL, "registry", NULL, "NetData Registry Entries"
- , "entries", 131100, localhost->rrd_update_every, RRDSET_TYPE_LINE);
+ if(unlikely(!stc)) {
+ stc = rrdset_create_localhost(
+ "netdata"
+ , "registry_entries"
+ , NULL
+ , "registry"
+ , NULL
+ , "NetData Registry Entries"
+ , "entries"
+ , "registry"
+ , "stats"
+ , 131100
+ , localhost->rrd_update_every
+ , RRDSET_TYPE_LINE
+ );
rrddim_add(stc, "persons", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rrddim_add(stc, "machines", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
@@ -360,10 +381,21 @@ void registry_statistics(void) {
// ------------------------------------------------------------------------
- if(!stm) stm = rrdset_find_localhost("netdata.registry_mem");
- if(!stm) {
- stm = rrdset_create_localhost("netdata", "registry_mem", NULL, "registry", NULL, "NetData Registry Memory", "KB"
- , 131300, localhost->rrd_update_every, RRDSET_TYPE_STACKED);
+ if(unlikely(!stm)) {
+ stm = rrdset_create_localhost(
+ "netdata"
+ , "registry_mem"
+ , NULL
+ , "registry"
+ , NULL
+ , "NetData Registry Memory"
+ , "KB"
+ , "registry"
+ , "stats"
+ , 131300
+ , localhost->rrd_update_every
+ , RRDSET_TYPE_STACKED
+ );
rrddim_add(stm, "persons", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE);
rrddim_add(stm, "machines", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE);