]> arthur.barton.de Git - netdata.git/commitdiff
multi-host rrdset and rrdfamily operations
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 17 Feb 2017 21:14:11 +0000 (23:14 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 17 Feb 2017 21:14:11 +0000 (23:14 +0200)
37 files changed:
src/backends.c
src/global_statistics.c
src/ipc.c
src/macos_fw.c
src/macos_mach_smi.c
src/macos_sysctl.c
src/plugin_checks.c
src/plugin_idlejitter.c
src/plugin_proc.c
src/plugin_proc_diskspace.c
src/plugin_tc.c
src/plugins_d.c
src/proc_diskstats.c
src/proc_interrupts.c
src/proc_loadavg.c
src/proc_meminfo.c
src/proc_net_dev.c
src/proc_net_ip_vs_stats.c
src/proc_net_netstat.c
src/proc_net_rpc_nfs.c
src/proc_net_rpc_nfsd.c
src/proc_net_snmp.c
src/proc_net_snmp6.c
src/proc_net_softnet_stat.c
src/proc_net_stat_conntrack.c
src/proc_net_stat_synproxy.c
src/proc_softirqs.c
src/proc_stat.c
src/proc_sys_kernel_random_entropy_avail.c
src/proc_uptime.c
src/registry.c
src/rrd.c
src/rrd.h
src/sys_devices_system_edac_mc.c
src/sys_fs_cgroup.c
src/sys_kernel_mm_ksm.c
src/web_client.c

index bdd876a28980916647cc492a3e85b79667a9cb03..e1c886dc7063bb8b43952d5301b4a039cb5a1932 100644 (file)
@@ -237,7 +237,7 @@ void *backends_main(void *ptr) {
             chart_backend_reconnects = 0,
             chart_backend_latency = 0;
 
-    RRDSET *chart_metrics = rrdset_find("netdata.backend_metrics");
+    RRDSET *chart_metrics = rrdset_find_localhost("netdata.backend_metrics");
     if(!chart_metrics) {
         chart_metrics = rrdset_create("netdata", "backend_metrics", NULL, "backend", NULL, "Netdata Buffered Metrics", "metrics", 130600, frequency, RRDSET_TYPE_LINE);
         rrddim_add(chart_metrics, "buffered", NULL,  1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
@@ -245,7 +245,7 @@ void *backends_main(void *ptr) {
         rrddim_add(chart_metrics, "sent",     NULL,  1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
     }
 
-    RRDSET *chart_bytes = rrdset_find("netdata.backend_bytes");
+    RRDSET *chart_bytes = rrdset_find_localhost("netdata.backend_bytes");
     if(!chart_bytes) {
         chart_bytes = rrdset_create("netdata", "backend_bytes", NULL, "backend", NULL, "Netdata Backend Data Size", "KB", 130610, frequency, RRDSET_TYPE_AREA);
         rrddim_add(chart_bytes, "buffered", NULL, 1, 1024, RRDDIM_ALGORITHM_ABSOLUTE);
@@ -254,7 +254,7 @@ void *backends_main(void *ptr) {
         rrddim_add(chart_bytes, "received", NULL, 1, 1024, RRDDIM_ALGORITHM_ABSOLUTE);
     }
 
-    RRDSET *chart_ops = rrdset_find("netdata.backend_ops");
+    RRDSET *chart_ops = rrdset_find_localhost("netdata.backend_ops");
     if(!chart_ops) {
         chart_ops = rrdset_create("netdata", "backend_ops", NULL, "backend", NULL, "Netdata Backend Operations", "operations", 130630, frequency, RRDSET_TYPE_LINE);
         rrddim_add(chart_ops, "write",     NULL, 1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
@@ -271,14 +271,14 @@ void *backends_main(void *ptr) {
      *
      * issue #1432 and https://www.softlab.ntua.gr/facilities/documentation/unix/unix-socket-faq/unix-socket-faq-2.html
      *
-    RRDSET *chart_latency = rrdset_find("netdata.backend_latency");
+    RRDSET *chart_latency = rrdset_find_localhost("netdata.backend_latency");
     if(!chart_latency) {
         chart_latency = rrdset_create("netdata", "backend_latency", NULL, "backend", NULL, "Netdata Backend Latency", "ms", 130620, frequency, RRDSET_TYPE_AREA);
         rrddim_add(chart_latency, "latency",   NULL,  1, 1000, RRDDIM_ALGORITHM_ABSOLUTE);
     }
     */
 
-    RRDSET *chart_rusage = rrdset_find("netdata.backend_thread_cpu");
+    RRDSET *chart_rusage = rrdset_find_localhost("netdata.backend_thread_cpu");
     if(!chart_rusage) {
         chart_rusage = rrdset_create("netdata", "backend_thread_cpu", NULL, "backend", NULL, "NetData Backend Thread CPU usage", "milliseconds/s", 130630, frequency, RRDSET_TYPE_STACKED);
         rrddim_add(chart_rusage, "user",   NULL, 1, 1000, RRDDIM_ALGORITHM_INCREMENTAL);
index 62fc766bf1cd5e2d90c4bcb1a11313049afc08bb..ea23b154578fd2aaf44b8300c2bb586874f91d1f 100644 (file)
@@ -129,7 +129,7 @@ void global_statistics_charts(void) {
     getrusage(RUSAGE_THREAD, &thread);
     getrusage(RUSAGE_SELF, &me);
 
-    if (!stcpu_thread) stcpu_thread = rrdset_find("netdata.plugin_proc_cpu");
+    if (!stcpu_thread) stcpu_thread = rrdset_find_localhost("netdata.plugin_proc_cpu");
     if (!stcpu_thread) {
         stcpu_thread = rrdset_create("netdata", "plugin_proc_cpu", NULL, "proc", NULL,
                                      "NetData Proc Plugin CPU usage", "milliseconds/s", 132000, rrd_update_every,
@@ -145,7 +145,7 @@ void global_statistics_charts(void) {
 
     // ----------------------------------------------------------------
 
-    if (!stcpu) stcpu = rrdset_find("netdata.server_cpu");
+    if (!stcpu) stcpu = rrdset_find_localhost("netdata.server_cpu");
     if (!stcpu) {
         stcpu = rrdset_create("netdata", "server_cpu", NULL, "netdata", NULL, "NetData CPU usage", "milliseconds/s",
                               130000, rrd_update_every, RRDSET_TYPE_STACKED);
@@ -160,7 +160,7 @@ void global_statistics_charts(void) {
 
     // ----------------------------------------------------------------
 
-    if (!stclients) stclients = rrdset_find("netdata.clients");
+    if (!stclients) stclients = rrdset_find_localhost("netdata.clients");
     if (!stclients) {
         stclients = rrdset_create("netdata", "clients", NULL, "netdata", NULL, "NetData Web Clients",
                                   "connected clients", 130200, rrd_update_every, RRDSET_TYPE_LINE);
@@ -173,7 +173,7 @@ void global_statistics_charts(void) {
 
     // ----------------------------------------------------------------
 
-    if (!streqs) streqs = rrdset_find("netdata.requests");
+    if (!streqs) streqs = rrdset_find_localhost("netdata.requests");
     if (!streqs) {
         streqs = rrdset_create("netdata", "requests", NULL, "netdata", NULL, "NetData Web Requests", "requests/s",
                                130300, rrd_update_every, RRDSET_TYPE_LINE);
@@ -186,7 +186,7 @@ void global_statistics_charts(void) {
 
     // ----------------------------------------------------------------
 
-    if (!stbytes) stbytes = rrdset_find("netdata.net");
+    if (!stbytes) stbytes = rrdset_find_localhost("netdata.net");
     if (!stbytes) {
         stbytes = rrdset_create("netdata", "net", NULL, "netdata", NULL, "NetData Network Traffic", "kilobits/s",
                                 130000, rrd_update_every, RRDSET_TYPE_AREA);
@@ -201,7 +201,7 @@ void global_statistics_charts(void) {
 
     // ----------------------------------------------------------------
 
-    if (!stduration) stduration = rrdset_find("netdata.response_time");
+    if (!stduration) stduration = rrdset_find_localhost("netdata.response_time");
     if (!stduration) {
         stduration = rrdset_create("netdata", "response_time", NULL, "netdata", NULL, "NetData API Response Time",
                                    "ms/request", 130400, rrd_update_every, RRDSET_TYPE_LINE);
@@ -232,7 +232,7 @@ void global_statistics_charts(void) {
 
     // ----------------------------------------------------------------
 
-    if (!stcompression) stcompression = rrdset_find("netdata.compression_ratio");
+    if (!stcompression) stcompression = rrdset_find_localhost("netdata.compression_ratio");
     if (!stcompression) {
         stcompression = rrdset_create("netdata", "compression_ratio", NULL, "netdata", NULL,
                                       "NetData API Responses Compression Savings Ratio", "percentage", 130500,
index 66df1e8b95d8abb881d3fb2666b6d2941c74d776..8714510e14125ba74851f26b5c45fbbcf12e0001 100644 (file)
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -191,13 +191,13 @@ int do_ipc(int update_every, usec_t dt) {
         if(semaphores_max) rrdvar_custom_host_variable_set(semaphores_max, limits.semmns);
 
         // create the charts
-        semaphores = rrdset_find("system.ipc_semaphores");
+        semaphores = rrdset_find_localhost("system.ipc_semaphores");
         if(!semaphores) {
             semaphores = rrdset_create("system", "ipc_semaphores", NULL, "ipc semaphores", NULL, "IPC Semaphores", "semaphores", 1000, rrd_update_every, RRDSET_TYPE_AREA);
             rrddim_add(semaphores, "semaphores", NULL, 1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
         }
 
-        arrays = rrdset_find("system.ipc_semaphore_arrays");
+        arrays = rrdset_find_localhost("system.ipc_semaphore_arrays");
         if(!arrays) {
             arrays = rrdset_create("system", "ipc_semaphore_arrays", NULL, "ipc semaphores", NULL, "IPC Semaphore Arrays", "arrays", 1000, rrd_update_every, RRDSET_TYPE_AREA);
             rrddim_add(arrays, "arrays", NULL, 1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
index 7ff255c8e065b8e27e17bfbc16a17636e02d7e51..7917855d3a292487edc78a906de0b435f7560762 100644 (file)
@@ -136,7 +136,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
                         total_disk_writes += diskstat.bytes_write;
                     }
 
-                    st = rrdset_find_bytype("disk", diskstat.name);
+                    st = rrdset_find_bytype_localhost("disk", diskstat.name);
                     if (unlikely(!st)) {
                         st = rrdset_create("disk", diskstat.name, NULL, diskstat.name, "disk.io", "Disk I/O Bandwidth", "kilobytes/s", 2000, update_every, RRDSET_TYPE_AREA);
 
@@ -161,7 +161,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
                         CFNumberGetValue(number, kCFNumberSInt64Type, &diskstat.writes);
                     }
 
-                    st = rrdset_find_bytype("disk_ops", diskstat.name);
+                    st = rrdset_find_bytype_localhost("disk_ops", diskstat.name);
                     if (unlikely(!st)) {
                         st = rrdset_create("disk_ops", diskstat.name, NULL, diskstat.name, "disk.ops", "Disk Completed I/O Operations", "operations/s", 2001, update_every, RRDSET_TYPE_LINE);
                         st->isdetail = 1;
@@ -187,7 +187,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
                         CFNumberGetValue(number, kCFNumberSInt64Type, &diskstat.time_write);
                     }
 
-                    st = rrdset_find_bytype("disk_util", diskstat.name);
+                    st = rrdset_find_bytype_localhost("disk_util", diskstat.name);
                     if (unlikely(!st)) {
                         st = rrdset_create("disk_util", diskstat.name, NULL, diskstat.name, "disk.util", "Disk Utilization Time", "% of time working", 2004, update_every, RRDSET_TYPE_AREA);
                         st->isdetail = 1;
@@ -212,7 +212,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
                         CFNumberGetValue(number, kCFNumberSInt64Type, &diskstat.latency_write);
                     }
 
-                    st = rrdset_find_bytype("disk_iotime", diskstat.name);
+                    st = rrdset_find_bytype_localhost("disk_iotime", diskstat.name);
                     if (unlikely(!st)) {
                         st = rrdset_create("disk_iotime", diskstat.name, NULL, diskstat.name, "disk.iotime", "Disk Total I/O Time", "milliseconds/s", 2022, update_every, RRDSET_TYPE_LINE);
                         st->isdetail = 1;
@@ -236,7 +236,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
 
                         // --------------------------------------------------------------------
 
-                        st = rrdset_find_bytype("disk_await", diskstat.name);
+                        st = rrdset_find_bytype_localhost("disk_await", diskstat.name);
                         if (unlikely(!st)) {
                             st = rrdset_create("disk_await", diskstat.name, NULL, diskstat.name, "disk.await", "Average Completed I/O Operation Time", "ms per operation", 2005, update_every, RRDSET_TYPE_LINE);
                             st->isdetail = 1;
@@ -254,7 +254,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
 
                         // --------------------------------------------------------------------
 
-                        st = rrdset_find_bytype("disk_avgsz", diskstat.name);
+                        st = rrdset_find_bytype_localhost("disk_avgsz", diskstat.name);
                         if (unlikely(!st)) {
                             st = rrdset_create("disk_avgsz", diskstat.name, NULL, diskstat.name, "disk.avgsz", "Average Completed I/O Operation Bandwidth", "kilobytes per operation", 2006, update_every, RRDSET_TYPE_AREA);
                             st->isdetail = 1;
@@ -272,7 +272,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
 
                         // --------------------------------------------------------------------
 
-                        st = rrdset_find_bytype("disk_svctm", diskstat.name);
+                        st = rrdset_find_bytype_localhost("disk_svctm", diskstat.name);
                         if (unlikely(!st)) {
                             st = rrdset_create("disk_svctm", diskstat.name, NULL, diskstat.name, "disk.svctm", "Average Service Time", "ms per operation", 2007, update_every, RRDSET_TYPE_LINE);
                             st->isdetail = 1;
@@ -301,7 +301,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
     }
 
     if (likely(do_io)) {
-        st = rrdset_find_bytype("system", "io");
+        st = rrdset_find_bytype_localhost("system", "io");
         if (unlikely(!st)) {
             st = rrdset_create("system", "io", NULL, "disk", NULL, "Disk I/O", "kilobytes/s", 150, update_every, RRDSET_TYPE_AREA);
             rrddim_add(st, "in",  NULL,  1, 1024, RRDDIM_ALGORITHM_INCREMENTAL);
@@ -340,7 +340,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
                 // --------------------------------------------------------------------------
 
                 if (likely(do_space)) {
-                    st = rrdset_find_bytype("disk_space", mntbuf[i].f_mntonname);
+                    st = rrdset_find_bytype_localhost("disk_space", mntbuf[i].f_mntonname);
                     if (unlikely(!st)) {
                         snprintfz(title, 4096, "Disk Space Usage for %s [%s]", mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname);
                         st = rrdset_create("disk_space", mntbuf[i].f_mntonname, NULL, mntbuf[i].f_mntonname, "disk.space", title, "GB", 2023,
@@ -363,7 +363,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
                 // --------------------------------------------------------------------------
 
                 if (likely(do_inodes)) {
-                    st = rrdset_find_bytype("disk_inodes", mntbuf[i].f_mntonname);
+                    st = rrdset_find_bytype_localhost("disk_inodes", mntbuf[i].f_mntonname);
                     if (unlikely(!st)) {
                         snprintfz(title, 4096, "Disk Files (inodes) Usage for %s [%s]", mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname);
                         st = rrdset_create("disk_inodes", mntbuf[i].f_mntonname, NULL, mntbuf[i].f_mntonname, "disk.inodes", title, "Inodes", 2024,
@@ -398,7 +398,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
 
                 // --------------------------------------------------------------------
 
-                st = rrdset_find_bytype("net", ifa->ifa_name);
+                st = rrdset_find_bytype_localhost("net", ifa->ifa_name);
                 if (unlikely(!st)) {
                     st = rrdset_create("net", ifa->ifa_name, NULL, ifa->ifa_name, "net.net", "Bandwidth", "kilobits/s", 7000, update_every, RRDSET_TYPE_AREA);
 
@@ -413,7 +413,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
 
                 // --------------------------------------------------------------------
 
-                st = rrdset_find_bytype("net_packets", ifa->ifa_name);
+                st = rrdset_find_bytype_localhost("net_packets", ifa->ifa_name);
                 if (unlikely(!st)) {
                     st = rrdset_create("net_packets", ifa->ifa_name, NULL, ifa->ifa_name, "net.packets", "Packets", "packets/s", 7001, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -433,7 +433,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
 
                 // --------------------------------------------------------------------
 
-                st = rrdset_find_bytype("net_errors", ifa->ifa_name);
+                st = rrdset_find_bytype_localhost("net_errors", ifa->ifa_name);
                 if (unlikely(!st)) {
                     st = rrdset_create("net_errors", ifa->ifa_name, NULL, ifa->ifa_name, "net.errors", "Interface Errors", "errors/s", 7002, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -449,7 +449,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
 
                 // --------------------------------------------------------------------
 
-                st = rrdset_find_bytype("net_drops", ifa->ifa_name);
+                st = rrdset_find_bytype_localhost("net_drops", ifa->ifa_name);
                 if (unlikely(!st)) {
                     st = rrdset_create("net_drops", ifa->ifa_name, NULL, ifa->ifa_name, "net.drops", "Interface Drops", "drops/s", 7003, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -463,7 +463,7 @@ int do_macos_iokit(int update_every, usec_t dt) {
 
                 // --------------------------------------------------------------------
 
-                st = rrdset_find_bytype("net_events", ifa->ifa_name);
+                st = rrdset_find_bytype_localhost("net_events", ifa->ifa_name);
                 if (unlikely(!st)) {
                     st = rrdset_create("net_events", ifa->ifa_name, NULL, ifa->ifa_name, "net.events", "Network Interface Events", "events/s", 7006, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
index 18c4b93b451b3db7d0dfe4945096d6739cde24f1..60da6d7a3f21c27900da90264df6e11f0b38b02a 100644 (file)
@@ -48,7 +48,7 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
                 error("DISABLED: system.cpu");
             } else {
 
-                st = rrdset_find_bytype("system", "cpu");
+                st = rrdset_find_bytype_localhost("system", "cpu");
                 if (unlikely(!st)) {
                     st = rrdset_create("system", "cpu", NULL, "cpu", "system.cpu", "Total CPU utilization", "percentage", 100, update_every, RRDSET_TYPE_STACKED);
 
@@ -84,7 +84,7 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
             error("DISABLED: mem.pgfaults");
         } else {
             if (likely(do_ram)) {
-                st = rrdset_find("system.ram");
+                st = rrdset_find_localhost("system.ram");
                 if (unlikely(!st)) {
                     st = rrdset_create("system", "ram", NULL, "ram", NULL, "System RAM", "MB", 200, update_every, RRDSET_TYPE_STACKED);
 
@@ -113,7 +113,7 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_swapio)) {
-                st = rrdset_find("system.swapio");
+                st = rrdset_find_localhost("system.swapio");
                 if (unlikely(!st)) {
                     st = rrdset_create("system", "swapio", NULL, "swap", NULL, "Swap I/O", "kilobytes/s", 250, update_every, RRDSET_TYPE_AREA);
 
@@ -130,7 +130,7 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_pgfaults)) {
-                st = rrdset_find("mem.pgfaults");
+                st = rrdset_find_localhost("mem.pgfaults");
                 if (unlikely(!st)) {
                     st = rrdset_create("mem", "pgfaults", NULL, "system", NULL, "Memory Page Faults", "page faults/s", 500, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
index 52a0c230032149d875d0d3822a722dcd316f20d7..250faa7d10e1742fca3db96fd945568158554028 100644 (file)
@@ -215,7 +215,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                 error("DISABLED: system.load");
             } else {
 
-                st = rrdset_find_bytype("system", "load");
+                st = rrdset_find_bytype_localhost("system", "load");
                 if (unlikely(!st)) {
                     st = rrdset_create("system", "load", NULL, "load", NULL, "System Load Average", "load", 100, (update_every < MIN_LOADAVG_UPDATE_EVERY) ? MIN_LOADAVG_UPDATE_EVERY : update_every, RRDSET_TYPE_LINE);
                     rrddim_add(st, "load1", NULL, 1, 1000, RRDDIM_ALGORITHM_ABSOLUTE);
@@ -242,7 +242,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             do_swap = 0;
             error("DISABLED: system.swap");
         } else {
-            st = rrdset_find("system.swap");
+            st = rrdset_find_localhost("system.swap");
             if (unlikely(!st)) {
                 st = rrdset_create("system", "swap", NULL, "swap", NULL, "System Swap", "MB", 201, update_every, RRDSET_TYPE_STACKED);
                 st->isdetail = 1;
@@ -291,7 +291,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                         iftot.ift_obytes += if2m->ifm_data.ifi_obytes;
                     }
                 }
-                st = rrdset_find("system.ipv4");
+                st = rrdset_find_localhost("system.ipv4");
                 if (unlikely(!st)) {
                     st = rrdset_create("system", "ipv4", NULL, "network", NULL, "IPv4 Bandwidth", "kilobits/s", 500, update_every, RRDSET_TYPE_AREA);
 
@@ -328,7 +328,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             error("DISABLED: ipv4.ecnpkts");
         } else {
             if (likely(do_tcp_packets)) {
-                st = rrdset_find("ipv4.tcppackets");
+                st = rrdset_find_localhost("ipv4.tcppackets");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcppackets", NULL, "tcp", NULL, "IPv4 TCP Packets",
                                        "packets/s",
@@ -347,7 +347,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_tcp_errors)) {
-                st = rrdset_find("ipv4.tcperrors");
+                st = rrdset_find_localhost("ipv4.tcperrors");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcperrors", NULL, "tcp", NULL, "IPv4 TCP Errors",
                                        "packets/s",
@@ -369,7 +369,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_tcp_handshake)) {
-                st = rrdset_find("ipv4.tcphandshake");
+                st = rrdset_find_localhost("ipv4.tcphandshake");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcphandshake", NULL, "tcp", NULL,
                                        "IPv4 TCP Handshake Issues",
@@ -394,7 +394,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
 
             if (do_tcpext_connaborts == CONFIG_ONDEMAND_YES || (do_tcpext_connaborts == CONFIG_ONDEMAND_ONDEMAND && (tcpstat.tcps_rcvpackafterwin || tcpstat.tcps_rcvafterclose || tcpstat.tcps_rcvmemdrop || tcpstat.tcps_persistdrop))) {
                 do_tcpext_connaborts = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.tcpconnaborts");
+                st = rrdset_find_localhost("ipv4.tcpconnaborts");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcpconnaborts", NULL, "tcp", NULL, "TCP Connection Aborts", "connections/s", 3010, update_every, RRDSET_TYPE_LINE);
 
@@ -416,7 +416,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
 
             if (do_tcpext_ofo == CONFIG_ONDEMAND_YES || (do_tcpext_ofo == CONFIG_ONDEMAND_ONDEMAND && tcpstat.tcps_rcvoopack)) {
                 do_tcpext_ofo = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.tcpofo");
+                st = rrdset_find_localhost("ipv4.tcpofo");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcpofo", NULL, "tcp", NULL, "TCP Out-Of-Order Queue", "packets/s", 3050, update_every, RRDSET_TYPE_LINE);
 
@@ -433,7 +433,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             if (do_tcpext_syscookies == CONFIG_ONDEMAND_YES || (do_tcpext_syscookies == CONFIG_ONDEMAND_ONDEMAND && (tcpstat.tcps_sc_sendcookie || tcpstat.tcps_sc_recvcookie || tcpstat.tcps_sc_zonefail))) {
                 do_tcpext_syscookies = CONFIG_ONDEMAND_YES;
 
-                st = rrdset_find("ipv4.tcpsyncookies");
+                st = rrdset_find_localhost("ipv4.tcpsyncookies");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcpsyncookies", NULL, "tcp", NULL, "TCP SYN Cookies", "packets/s", 3100, update_every, RRDSET_TYPE_LINE);
 
@@ -453,7 +453,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
 
             if (do_ecn == CONFIG_ONDEMAND_YES || (do_ecn == CONFIG_ONDEMAND_ONDEMAND && (tcpstat.tcps_ecn_recv_ce || tcpstat.tcps_ecn_not_supported))) {
                 do_ecn = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.ecnpkts");
+                st = rrdset_find_localhost("ipv4.ecnpkts");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "ecnpkts", NULL, "ecn", NULL, "IPv4 ECN Statistics", "packets/s", 8700, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -482,7 +482,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             error("DISABLED: ipv4.udperrors");
         } else {
             if (likely(do_udp_packets)) {
-                st = rrdset_find("ipv4.udppackets");
+                st = rrdset_find_localhost("ipv4.udppackets");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "udppackets", NULL, "udp", NULL, "IPv4 UDP Packets",
                                        "packets/s", 2601, update_every, RRDSET_TYPE_LINE);
@@ -500,7 +500,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_udp_errors)) {
-                st = rrdset_find("ipv4.udperrors");
+                st = rrdset_find_localhost("ipv4.udperrors");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "udperrors", NULL, "udp", NULL, "IPv4 UDP Errors", "events/s",
                                        2701, update_every, RRDSET_TYPE_LINE);
@@ -543,7 +543,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_icmp_packets)) {
-                st = rrdset_find("ipv4.icmp");
+                st = rrdset_find_localhost("ipv4.icmp");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "icmp", NULL, "icmp", NULL, "IPv4 ICMP Packets", "packets/s",
                                        2602,
@@ -561,7 +561,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
 
                 // --------------------------------------------------------------------
 
-                st = rrdset_find("ipv4.icmp_errors");
+                st = rrdset_find_localhost("ipv4.icmp_errors");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "icmp_errors", NULL, "icmp", NULL, "IPv4 ICMP Errors",
                                        "packets/s",
@@ -583,7 +583,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_icmpmsg)) {
-                st = rrdset_find("ipv4.icmpmsg");
+                st = rrdset_find_localhost("ipv4.icmpmsg");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "icmpmsg", NULL, "icmp", NULL, "IPv4 ICMP Messsages",
                                        "packets/s", 2604, update_every, RRDSET_TYPE_LINE);
@@ -620,7 +620,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             error("DISABLED: ipv4.errors");
         } else {
             if (likely(do_ip_packets)) {
-                st = rrdset_find("ipv4.packets");
+                st = rrdset_find_localhost("ipv4.packets");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "packets", NULL, "packets", NULL, "IPv4 Packets", "packets/s",
                                        3000, update_every, RRDSET_TYPE_LINE);
@@ -642,7 +642,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_ip_fragsout)) {
-                st = rrdset_find("ipv4.fragsout");
+                st = rrdset_find_localhost("ipv4.fragsout");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "fragsout", NULL, "fragments", NULL, "IPv4 Fragments Sent",
                                        "packets/s", 3010, update_every, RRDSET_TYPE_LINE);
@@ -663,7 +663,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_ip_fragsin)) {
-                st = rrdset_find("ipv4.fragsin");
+                st = rrdset_find_localhost("ipv4.fragsin");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "fragsin", NULL, "fragments", NULL,
                                        "IPv4 Fragments Reassembly",
@@ -685,7 +685,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if (likely(do_ip_errors)) {
-                st = rrdset_find("ipv4.errors");
+                st = rrdset_find_localhost("ipv4.errors");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv4", "errors", NULL, "errors", NULL, "IPv4 Errors", "packets/s",
                                        3002,
@@ -731,7 +731,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                                                           (ip6stat.ip6s_localout || ip6stat.ip6s_total ||
                                                            ip6stat.ip6s_forward || ip6stat.ip6s_delivered))) {
                 do_ip6_packets = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.packets");
+                st = rrdset_find_localhost("ipv6.packets");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "packets", NULL, "packets", NULL, "IPv6 Packets", "packets/s", 3000,
                                        update_every, RRDSET_TYPE_LINE);
@@ -756,7 +756,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                                                            (ip6stat.ip6s_fragmented || ip6stat.ip6s_cantfrag ||
                                                             ip6stat.ip6s_ofragments))) {
                 do_ip6_fragsout = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.fragsout");
+                st = rrdset_find_localhost("ipv6.fragsout");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "fragsout", NULL, "fragments", NULL, "IPv6 Fragments Sent",
                                        "packets/s", 3010, update_every, RRDSET_TYPE_LINE);
@@ -780,7 +780,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                                                           (ip6stat.ip6s_reassembled || ip6stat.ip6s_fragdropped ||
                                                            ip6stat.ip6s_fragtimeout || ip6stat.ip6s_fragments))) {
                 do_ip6_fragsin = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.fragsin");
+                st = rrdset_find_localhost("ipv6.fragsin");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "fragsin", NULL, "fragments", NULL, "IPv6 Fragments Reassembly",
                                        "packets/s", 3011, update_every, RRDSET_TYPE_LINE);
@@ -813,7 +813,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                     ip6stat.ip6s_cantforward ||
                     ip6stat.ip6s_noroute))) {
                 do_ip6_errors = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.errors");
+                st = rrdset_find_localhost("ipv6.errors");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "errors", NULL, "errors", NULL, "IPv6 Errors", "packets/s", 3002,
                                        update_every, RRDSET_TYPE_LINE);
@@ -860,7 +860,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             icmp6_total.msgs_in += icmp6stat.icp6s_badcode + icmp6stat.icp6s_badlen + icmp6stat.icp6s_checksum + icmp6stat.icp6s_tooshort;
             if (do_icmp6 == CONFIG_ONDEMAND_YES || (do_icmp6 == CONFIG_ONDEMAND_ONDEMAND && (icmp6_total.msgs_in || icmp6_total.msgs_out))) {
                 do_icmp6 = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.icmp");
+                st = rrdset_find_localhost("ipv6.icmp");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "icmp", NULL, "icmp", NULL, "IPv6 ICMP Messages",
                                        "messages/s", 10000, update_every, RRDSET_TYPE_LINE);
@@ -879,7 +879,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
 
             if (do_icmp6_redir == CONFIG_ONDEMAND_YES || (do_icmp6_redir == CONFIG_ONDEMAND_ONDEMAND && (icmp6stat.icp6s_inhist[ND_REDIRECT] || icmp6stat.icp6s_outhist[ND_REDIRECT]))) {
                 do_icmp6_redir = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.icmpredir");
+                st = rrdset_find_localhost("ipv6.icmpredir");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "icmpredir", NULL, "icmp", NULL, "IPv6 ICMP Redirects",
                                        "redirects/s", 10050, update_every, RRDSET_TYPE_LINE);
@@ -909,7 +909,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                                                                             icmp6stat.icp6s_outhist[ICMP6_TIME_EXCEEDED] ||
                                                                             icmp6stat.icp6s_outhist[ICMP6_PARAM_PROB]))) {
                 do_icmp6_errors = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.icmperrors");
+                st = rrdset_find_localhost("ipv6.icmperrors");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "icmperrors", NULL, "icmp", NULL, "IPv6 ICMP Errors", "errors/s", 10100, update_every, RRDSET_TYPE_LINE);
 
@@ -948,7 +948,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                                                                  icmp6stat.icp6s_inhist[ICMP6_ECHO_REPLY] ||
                                                                  icmp6stat.icp6s_outhist[ICMP6_ECHO_REPLY]))) {
                 do_icmp6_echos = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.icmpechos");
+                st = rrdset_find_localhost("ipv6.icmpechos");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "icmpechos", NULL, "icmp", NULL, "IPv6 ICMP Echo", "messages/s", 10200, update_every, RRDSET_TYPE_LINE);
 
@@ -974,7 +974,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                                                                     icmp6stat.icp6s_inhist[ND_ROUTER_ADVERT] ||
                                                                     icmp6stat.icp6s_outhist[ND_ROUTER_ADVERT]))) {
                 do_icmp6_router = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.icmprouter");
+                st = rrdset_find_localhost("ipv6.icmprouter");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "icmprouter", NULL, "icmp", NULL, "IPv6 Router Messages", "messages/s", 10400, update_every, RRDSET_TYPE_LINE);
 
@@ -1000,7 +1000,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                                                                     icmp6stat.icp6s_inhist[ND_NEIGHBOR_ADVERT] ||
                                                                     icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]))) {
                 do_icmp6_neighbor = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.icmpneighbor");
+                st = rrdset_find_localhost("ipv6.icmpneighbor");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "icmpneighbor", NULL, "icmp", NULL, "IPv6 Neighbor Messages", "messages/s", 10500, update_every, RRDSET_TYPE_LINE);
 
@@ -1032,7 +1032,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
                                                                     icmp6stat.icp6s_outhist[135] ||
                                                                     icmp6stat.icp6s_outhist[136]))) {
                 do_icmp6_types = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv6.icmptypes");
+                st = rrdset_find_localhost("ipv6.icmptypes");
                 if (unlikely(!st)) {
                     st = rrdset_create("ipv6", "icmptypes", NULL, "icmp", NULL, "IPv6 ICMP Types",
                                        "messages/s", 10700, update_every, RRDSET_TYPE_LINE);
@@ -1073,7 +1073,7 @@ int do_macos_sysctl(int update_every, usec_t dt) {
             error("DISABLED: system.uptime");
         } else {
             clock_gettime(CLOCK_REALTIME, &cur_time);
-            st = rrdset_find("system.uptime");
+            st = rrdset_find_localhost("system.uptime");
 
             if(unlikely(!st)) {
                 st = rrdset_create("system", "uptime", NULL, "uptime", NULL, "System Uptime", "seconds", 1000, update_every, RRDSET_TYPE_LINE);
index 9aa6a94ca060d6776270af6ff11abf29caf93fad..9646e859c33b61e411019e5811f58d1457e5455d 100644 (file)
@@ -68,7 +68,7 @@ void *checks_main(void *ptr) {
         // --------------------------------------------------------------------
         // check chart 3
 
-        if(!apps_cpu) apps_cpu = rrdset_find("apps.cpu");
+        if(!apps_cpu) apps_cpu = rrdset_find_localhost("apps.cpu");
         if(check3->counter_done) rrdset_next_usec(check3, loop_usec);
         now_realtime_timeval(&loop);
         rrddim_set(check3, "caller", (long long) dt_usec(&loop, &check1->last_collected_time));
index 23fb4c9d984460515cda5e2d8b786941ea15d499..a95804825add29aeafb83a3324208464d0a6645b 100644 (file)
@@ -19,7 +19,7 @@ void *cpuidlejitter_main(void *ptr) {
         sleep_ms = CPU_IDLEJITTER_SLEEP_TIME_MS;
     }
 
-    RRDSET *st = rrdset_find("system.idlejitter");
+    RRDSET *st = rrdset_find_localhost("system.idlejitter");
     if(!st) {
         st = rrdset_create("system", "idlejitter", NULL, "processes", NULL, "CPU Idle Jitter", "microseconds lost/s", 9999, rrd_update_every, RRDSET_TYPE_LINE);
         rrddim_add(st, "jitter", NULL, 1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
index 3d1813dafac99e48574f6565419f47402cdb3b0f..cbcd0339e4d8c24e5da101702768486a64f0a383 100644 (file)
@@ -112,7 +112,7 @@ void *proc_main(void *ptr) {
             static RRDSET *st = NULL;
 
             if(unlikely(!st)) {
-                st = rrdset_find_bytype("netdata", "plugin_proc_modules");
+                st = rrdset_find_bytype_localhost("netdata", "plugin_proc_modules");
 
                 if(!st) {
                     st = rrdset_create("netdata", "plugin_proc_modules", NULL, "proc", NULL, "NetData Proc Plugin Modules Durations", "milliseconds/run", 132001, rrd_update_every, RRDSET_TYPE_STACKED);
index 2f2f6bd78a28fc11e172bc47c2192e77d9f394b3..4e0aa0feda4feb6b8087b4c0d6e1b962ca0e7088 100644 (file)
@@ -153,7 +153,7 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) {
     if(do_space == CONFIG_ONDEMAND_YES || (do_space == CONFIG_ONDEMAND_ONDEMAND && (bavail || breserved_root || bused))) {
         if(unlikely(!m->st_space)) {
             m->do_space = CONFIG_ONDEMAND_YES;
-            m->st_space = rrdset_find_bytype("disk_space", disk);
+            m->st_space = rrdset_find_bytype_localhost("disk_space", disk);
             if(unlikely(!m->st_space)) {
                 char title[4096 + 1];
                 snprintfz(title, 4096, "Disk Space Usage for %s [%s]", family, mi->mount_source);
@@ -180,7 +180,7 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) {
     if(do_inodes == CONFIG_ONDEMAND_YES || (do_inodes == CONFIG_ONDEMAND_ONDEMAND && (favail || freserved_root || fused))) {
         if(unlikely(!m->st_inodes)) {
             m->do_inodes = CONFIG_ONDEMAND_YES;
-            m->st_inodes = rrdset_find_bytype("disk_inodes", disk);
+            m->st_inodes = rrdset_find_bytype_localhost("disk_inodes", disk);
             if(unlikely(!m->st_inodes)) {
                 char title[4096 + 1];
                 snprintfz(title, 4096, "Disk Files (inodes) Usage for %s [%s]", family, mi->mount_source);
@@ -272,7 +272,7 @@ void *proc_diskspace_main(void *ptr) {
             getrusage(RUSAGE_THREAD, &thread);
 
             if(!stcpu_thread) {
-                stcpu_thread = rrdset_find("netdata.plugin_diskspace");
+                stcpu_thread = rrdset_find_localhost("netdata.plugin_diskspace");
                 if(!stcpu_thread) stcpu_thread = rrdset_create("netdata", "plugin_diskspace", NULL, "diskspace", NULL
                                                  , "NetData Disk Space Plugin CPU usage", "milliseconds/s", 132020
                                                  , update_every, RRDSET_TYPE_STACKED);
@@ -290,7 +290,7 @@ void *proc_diskspace_main(void *ptr) {
             // ----------------------------------------------------------------
 
             if(!st_duration) {
-                st_duration = rrdset_find("netdata.plugin_diskspace_dt");
+                st_duration = rrdset_find_localhost("netdata.plugin_diskspace_dt");
                 if(!st_duration) st_duration = rrdset_create("netdata", "plugin_diskspace_dt", NULL, "diskspace", NULL
                                                  , "NetData Disk Space Plugin Duration", "milliseconds/run", 132021
                                                  , update_every, RRDSET_TYPE_AREA);
index 03b578865476d748ad5e43012cbb8ec68ec167dc..9ef7cead81db7dee7bccbf2cc5582476118b5f32 100644 (file)
@@ -974,7 +974,7 @@ void *tc_main(void *ptr) {
                 // debug(D_TC_LOOP, "WORKTIME line '%s' '%s'", words[1], words[2]);
                 getrusage(RUSAGE_THREAD, &thread);
 
-                if(unlikely(!stcpu)) stcpu = rrdset_find("netdata.plugin_tc_cpu");
+                if(unlikely(!stcpu)) stcpu = rrdset_find_localhost("netdata.plugin_tc_cpu");
                 if(unlikely(!stcpu)) {
                     stcpu = rrdset_create("netdata", "plugin_tc_cpu", NULL, "tc.helper", NULL, "NetData TC CPU usage", "milliseconds/s", 135000, rrd_update_every, RRDSET_TYPE_STACKED);
                     rrddim_add(stcpu, "user",  NULL,  1, 1000, RRDDIM_ALGORITHM_INCREMENTAL);
@@ -986,7 +986,7 @@ void *tc_main(void *ptr) {
                 rrddim_set(stcpu, "system", thread.ru_stime.tv_sec * 1000000ULL + thread.ru_stime.tv_usec);
                 rrdset_done(stcpu);
 
-                if(unlikely(!sttime)) stcpu = rrdset_find("netdata.plugin_tc_time");
+                if(unlikely(!sttime)) stcpu = rrdset_find_localhost("netdata.plugin_tc_time");
                 if(unlikely(!sttime)) {
                     sttime = rrdset_create("netdata", "plugin_tc_time", NULL, "tc.helper", NULL, "NetData TC script execution", "milliseconds/run", 135001, rrd_update_every, RRDSET_TYPE_AREA);
                     rrddim_add(sttime, "run_time",  "run time",  1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
index 4ddcc20d036adcb3262406298dad2e8508e83ed7..37c7092d07a2d35ee8e4458167ca745807c3ae80 100644 (file)
@@ -175,7 +175,7 @@ void *pluginsd_worker_thread(void *arg)
                     break;
                 }
 
-                st = rrdset_find(id);
+                st = rrdset_find_localhost(id);
                 if(unlikely(!st)) {
                     error("PLUGINSD: '%s' is requesting a BEGIN on chart '%s', which does not exist. Disabling it.", cd->fullfilename, id);
                     cd->enabled = 0;
@@ -252,7 +252,7 @@ void *pluginsd_worker_thread(void *arg)
                 if(unlikely(!family || !*family)) family = NULL;
                 if(unlikely(!context || !*context)) context = NULL;
 
-                st = rrdset_find_bytype(type, id);
+                st = rrdset_find_bytype_localhost(type, id);
                 if(unlikely(!st)) {
                     debug(D_PLUGINSD, "PLUGINSD: Creating chart type='%s', id='%s', name='%s', family='%s', context='%s', chart='%s', priority=%d, update_every=%d"
                         , type, id
index a2d56a642cdea3878d0989a97bb096b99edcf79f..628562d421ededd485702687981a0d88da390d3b 100644 (file)
@@ -417,7 +417,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
         if(d->do_io == CONFIG_ONDEMAND_YES || (d->do_io == CONFIG_ONDEMAND_ONDEMAND && (readsectors || writesectors))) {
             d->do_io = CONFIG_ONDEMAND_YES;
 
-            st = rrdset_find_bytype(RRD_TYPE_DISK, disk);
+            st = rrdset_find_bytype_localhost(RRD_TYPE_DISK, disk);
             if(unlikely(!st)) {
                 st = rrdset_create(RRD_TYPE_DISK, disk, NULL, family, "disk.io", "Disk I/O Bandwidth", "kilobytes/s", 2000, update_every, RRDSET_TYPE_AREA);
 
@@ -436,7 +436,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
         if(d->do_ops == CONFIG_ONDEMAND_YES || (d->do_ops == CONFIG_ONDEMAND_ONDEMAND && (reads || writes))) {
             d->do_ops = CONFIG_ONDEMAND_YES;
 
-            st = rrdset_find_bytype("disk_ops", disk);
+            st = rrdset_find_bytype_localhost("disk_ops", disk);
             if(unlikely(!st)) {
                 st = rrdset_create("disk_ops", disk, NULL, family, "disk.ops", "Disk Completed I/O Operations", "operations/s", 2001, update_every, RRDSET_TYPE_LINE);
                 st->isdetail = 1;
@@ -456,7 +456,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
         if(d->do_qops == CONFIG_ONDEMAND_YES || (d->do_qops == CONFIG_ONDEMAND_ONDEMAND && queued_ios)) {
             d->do_qops = CONFIG_ONDEMAND_YES;
 
-            st = rrdset_find_bytype("disk_qops", disk);
+            st = rrdset_find_bytype_localhost("disk_qops", disk);
             if(unlikely(!st)) {
                 st = rrdset_create("disk_qops", disk, NULL, family, "disk.qops", "Disk Current I/O Operations", "operations", 2002, update_every, RRDSET_TYPE_LINE);
                 st->isdetail = 1;
@@ -474,7 +474,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
         if(d->do_backlog == CONFIG_ONDEMAND_YES || (d->do_backlog == CONFIG_ONDEMAND_ONDEMAND && backlog_ms)) {
             d->do_backlog = CONFIG_ONDEMAND_YES;
 
-            st = rrdset_find_bytype("disk_backlog", disk);
+            st = rrdset_find_bytype_localhost("disk_backlog", disk);
             if(unlikely(!st)) {
                 st = rrdset_create("disk_backlog", disk, NULL, family, "disk.backlog", "Disk Backlog", "backlog (ms)", 2003, update_every, RRDSET_TYPE_AREA);
                 st->isdetail = 1;
@@ -492,7 +492,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
         if(d->do_util == CONFIG_ONDEMAND_YES || (d->do_util == CONFIG_ONDEMAND_ONDEMAND && busy_ms)) {
             d->do_util = CONFIG_ONDEMAND_YES;
 
-            st = rrdset_find_bytype("disk_util", disk);
+            st = rrdset_find_bytype_localhost("disk_util", disk);
             if(unlikely(!st)) {
                 st = rrdset_create("disk_util", disk, NULL, family, "disk.util", "Disk Utilization Time", "% of time working", 2004, update_every, RRDSET_TYPE_AREA);
                 st->isdetail = 1;
@@ -510,7 +510,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
         if(d->do_mops == CONFIG_ONDEMAND_YES || (d->do_mops == CONFIG_ONDEMAND_ONDEMAND && (mreads || mwrites))) {
             d->do_mops = CONFIG_ONDEMAND_YES;
 
-            st = rrdset_find_bytype("disk_mops", disk);
+            st = rrdset_find_bytype_localhost("disk_mops", disk);
             if(unlikely(!st)) {
                 st = rrdset_create("disk_mops", disk, NULL, family, "disk.mops", "Disk Merged Operations", "merged operations/s", 2021, update_every, RRDSET_TYPE_LINE);
                 st->isdetail = 1;
@@ -530,7 +530,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
         if(d->do_iotime == CONFIG_ONDEMAND_YES || (d->do_iotime == CONFIG_ONDEMAND_ONDEMAND && (readms || writems))) {
             d->do_iotime = CONFIG_ONDEMAND_YES;
 
-            st = rrdset_find_bytype("disk_iotime", disk);
+            st = rrdset_find_bytype_localhost("disk_iotime", disk);
             if(unlikely(!st)) {
                 st = rrdset_create("disk_iotime", disk, NULL, family, "disk.iotime", "Disk Total I/O Time", "milliseconds/s", 2022, update_every, RRDSET_TYPE_LINE);
                 st->isdetail = 1;
@@ -552,7 +552,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
         if(likely(dt)) {
             if( (d->do_iotime == CONFIG_ONDEMAND_YES || (d->do_iotime == CONFIG_ONDEMAND_ONDEMAND && (readms || writems))) &&
                 (d->do_ops    == CONFIG_ONDEMAND_YES || (d->do_ops    == CONFIG_ONDEMAND_ONDEMAND && (reads || writes)))) {
-                st = rrdset_find_bytype("disk_await", disk);
+                st = rrdset_find_bytype_localhost("disk_await", disk);
                 if(unlikely(!st)) {
                     st = rrdset_create("disk_await", disk, NULL, family, "disk.await", "Average Completed I/O Operation Time", "ms per operation", 2005, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -569,7 +569,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
 
             if( (d->do_io  == CONFIG_ONDEMAND_YES || (d->do_io  == CONFIG_ONDEMAND_ONDEMAND && (readsectors || writesectors))) &&
                 (d->do_ops == CONFIG_ONDEMAND_YES || (d->do_ops == CONFIG_ONDEMAND_ONDEMAND && (reads || writes)))) {
-                st = rrdset_find_bytype("disk_avgsz", disk);
+                st = rrdset_find_bytype_localhost("disk_avgsz", disk);
                 if(unlikely(!st)) {
                     st = rrdset_create("disk_avgsz", disk, NULL, family, "disk.avgsz", "Average Completed I/O Operation Bandwidth", "kilobytes per operation", 2006, update_every, RRDSET_TYPE_AREA);
                     st->isdetail = 1;
@@ -586,7 +586,7 @@ int do_proc_diskstats(int update_every, usec_t dt) {
 
             if( (d->do_util == CONFIG_ONDEMAND_YES || (d->do_util == CONFIG_ONDEMAND_ONDEMAND && busy_ms)) &&
                 (d->do_ops  == CONFIG_ONDEMAND_YES || (d->do_ops  == CONFIG_ONDEMAND_ONDEMAND && (reads || writes)))) {
-                st = rrdset_find_bytype("disk_svctm", disk);
+                st = rrdset_find_bytype_localhost("disk_svctm", disk);
                 if(unlikely(!st)) {
                     st = rrdset_create("disk_svctm", disk, NULL, family, "disk.svctm", "Average Service Time", "ms per operation", 2007, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
index a79356217c2cbbbcf5d24dc082902994afd6d57e..8e97481641c065ed506208783074ec969a626df0 100644 (file)
@@ -146,7 +146,7 @@ int do_proc_interrupts(int update_every, usec_t dt) {
 
     // --------------------------------------------------------------------
 
-    st = rrdset_find_bytype("system", "interrupts");
+    st = rrdset_find_bytype_localhost("system", "interrupts");
     if(unlikely(!st)) st = rrdset_create("system", "interrupts", NULL, "interrupts", NULL, "System interrupts", "interrupts/s", 1000, update_every, RRDSET_TYPE_STACKED);
     else rrdset_next(st);
 
@@ -181,7 +181,7 @@ int do_proc_interrupts(int update_every, usec_t dt) {
             char id[50+1];
             snprintfz(id, 50, "cpu%d_interrupts", c);
 
-            st = rrdset_find_bytype("cpu", id);
+            st = rrdset_find_bytype_localhost("cpu", id);
             if(unlikely(!st)) {
                 char title[100+1];
                 snprintfz(title, 100, "CPU%d Interrupts", c);
index aa10e1cc58635227e60a45040757803e69e754ff..aecc93288fc60994194a9ea4f9e5a3863838ff3f 100644 (file)
@@ -50,7 +50,7 @@ int do_proc_loadavg(int update_every, usec_t dt) {
     if(next_loadavg_dt <= dt) {
         if(likely(do_loadavg)) {
             if(unlikely(!load_chart)) {
-                load_chart = rrdset_find_byname("system.load");
+                load_chart = rrdset_find_byname_localhost("system.load");
                 if(unlikely(!load_chart)) {
                     load_chart = rrdset_create("system", "load", NULL, "load", NULL, "System Load Average", "load", 100, (update_every < MIN_LOADAVG_UPDATE_EVERY) ? MIN_LOADAVG_UPDATE_EVERY : update_every, RRDSET_TYPE_LINE);
                     rrddim_add(load_chart, "load1", NULL, 1, 1000, RRDDIM_ALGORITHM_ABSOLUTE);
@@ -75,7 +75,7 @@ int do_proc_loadavg(int update_every, usec_t dt) {
 
     if(likely(do_all_processes)) {
         if(unlikely(!processes_chart)) {
-            processes_chart = rrdset_find_byname("system.active_processes");
+            processes_chart = rrdset_find_byname_localhost("system.active_processes");
             if(unlikely(!processes_chart)) {
                 processes_chart = rrdset_create("system", "active_processes", NULL, "processes", NULL, "System Active Processes", "processes", 750, update_every, RRDSET_TYPE_LINE);
                 rrddim_add(processes_chart, "active", NULL, 1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
index 8f498d908e87ae302283581727cdcdb09cc83065..be3720186b48fa95094767193902b02a53c3ea43 100644 (file)
@@ -140,7 +140,7 @@ int do_proc_meminfo(int update_every, usec_t dt) {
     unsigned long long MemUsed = MemTotal - MemFree - Cached - Buffers;
 
     if(do_ram) {
-        st = rrdset_find("system.ram");
+        st = rrdset_find_localhost("system.ram");
         if(!st) {
             st = rrdset_create("system", "ram", NULL, "ram", NULL, "System RAM", "MB", 200, update_every, RRDSET_TYPE_STACKED);
 
@@ -165,7 +165,7 @@ int do_proc_meminfo(int update_every, usec_t dt) {
     if(SwapTotal || SwapUsed || SwapFree || do_swap == CONFIG_ONDEMAND_YES) {
         do_swap = CONFIG_ONDEMAND_YES;
 
-        st = rrdset_find("system.swap");
+        st = rrdset_find_localhost("system.swap");
         if(!st) {
             st = rrdset_create("system", "swap", NULL, "swap", NULL, "System Swap", "MB", 201, update_every, RRDSET_TYPE_STACKED);
             st->isdetail = 1;
@@ -185,7 +185,7 @@ int do_proc_meminfo(int update_every, usec_t dt) {
     if(arl_hwcorrupted->flags & ARL_ENTRY_FLAG_FOUND && (do_hwcorrupt == CONFIG_ONDEMAND_YES || (do_hwcorrupt == CONFIG_ONDEMAND_ONDEMAND && HardwareCorrupted > 0))) {
         do_hwcorrupt = CONFIG_ONDEMAND_YES;
 
-        st = rrdset_find("mem.hwcorrupt");
+        st = rrdset_find_localhost("mem.hwcorrupt");
         if(!st) {
             st = rrdset_create("mem", "hwcorrupt", NULL, "ecc", NULL, "Hardware Corrupted ECC", "MB", 9000, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -201,7 +201,7 @@ int do_proc_meminfo(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_committed) {
-        st = rrdset_find("mem.committed");
+        st = rrdset_find_localhost("mem.committed");
         if(!st) {
             st = rrdset_create("mem", "committed", NULL, "system", NULL, "Committed (Allocated) Memory", "MB", 5000, update_every, RRDSET_TYPE_AREA);
             st->isdetail = 1;
@@ -217,7 +217,7 @@ int do_proc_meminfo(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_writeback) {
-        st = rrdset_find("mem.writeback");
+        st = rrdset_find_localhost("mem.writeback");
         if(!st) {
             st = rrdset_create("mem", "writeback", NULL, "kernel", NULL, "Writeback Memory", "MB", 4000, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -241,7 +241,7 @@ int do_proc_meminfo(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_kernel) {
-        st = rrdset_find("mem.kernel");
+        st = rrdset_find_localhost("mem.kernel");
         if(!st) {
             st = rrdset_create("mem", "kernel", NULL, "kernel", NULL, "Memory Used by Kernel", "MB", 6000, update_every, RRDSET_TYPE_STACKED);
             st->isdetail = 1;
@@ -263,7 +263,7 @@ int do_proc_meminfo(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_slab) {
-        st = rrdset_find("mem.slab");
+        st = rrdset_find_localhost("mem.slab");
         if(!st) {
             st = rrdset_create("mem", "slab", NULL, "slab", NULL, "Reclaimable Kernel Memory", "MB", 6500, update_every, RRDSET_TYPE_STACKED);
             st->isdetail = 1;
index a276b8acba08fa19b9bd49ab4a59105fb66b90ea..3389ae997ae8623058eac9c71bf03896decae896 100644 (file)
@@ -223,7 +223,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
 
         if(d->do_bandwidth == CONFIG_ONDEMAND_YES) {
             if(unlikely(!d->st_bandwidth)) {
-                d->st_bandwidth = rrdset_find_bytype("net", d->name);
+                d->st_bandwidth = rrdset_find_bytype_localhost("net", d->name);
 
                 if(!d->st_bandwidth)
                     d->st_bandwidth = rrdset_create("net", d->name, NULL, d->name, "net.net", "Bandwidth", "kilobits/s", 7000, update_every, RRDSET_TYPE_AREA);
@@ -245,7 +245,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
 
         if(d->do_packets == CONFIG_ONDEMAND_YES) {
             if(unlikely(!d->st_packets)) {
-                d->st_packets = rrdset_find_bytype("net_packets", d->name);
+                d->st_packets = rrdset_find_bytype_localhost("net_packets", d->name);
 
                 if(!d->st_packets)
                     d->st_packets = rrdset_create("net_packets", d->name, NULL, d->name, "net.packets", "Packets", "packets/s", 7001, update_every, RRDSET_TYPE_LINE);
@@ -271,7 +271,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
 
         if(d->do_errors == CONFIG_ONDEMAND_YES) {
             if(unlikely(!d->st_errors)) {
-                d->st_errors = rrdset_find_bytype("net_errors", d->name);
+                d->st_errors = rrdset_find_bytype_localhost("net_errors", d->name);
 
                 if(!d->st_errors)
                     d->st_errors = rrdset_create("net_errors", d->name, NULL, d->name, "net.errors", "Interface Errors", "errors/s", 7002, update_every, RRDSET_TYPE_LINE);
@@ -295,7 +295,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
 
         if(d->do_drops == CONFIG_ONDEMAND_YES) {
             if(unlikely(!d->st_drops)) {
-                d->st_drops = rrdset_find_bytype("net_drops", d->name);
+                d->st_drops = rrdset_find_bytype_localhost("net_drops", d->name);
 
                 if(!d->st_drops)
                     d->st_drops = rrdset_create("net_drops", d->name, NULL, d->name, "net.drops", "Interface Drops", "drops/s", 7003, update_every, RRDSET_TYPE_LINE);
@@ -319,7 +319,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
 
         if(d->do_fifo == CONFIG_ONDEMAND_YES) {
             if(unlikely(!d->st_fifo)) {
-                d->st_fifo = rrdset_find_bytype("net_fifo", d->name);
+                d->st_fifo = rrdset_find_bytype_localhost("net_fifo", d->name);
 
                 if(!d->st_fifo)
                     d->st_fifo = rrdset_create("net_fifo", d->name, NULL, d->name, "net.fifo", "Interface FIFO Buffer Errors", "errors", 7004, update_every, RRDSET_TYPE_LINE);
@@ -343,7 +343,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
 
         if(d->do_compressed == CONFIG_ONDEMAND_YES) {
             if(unlikely(!d->st_compressed)) {
-                d->st_compressed = rrdset_find_bytype("net_compressed", d->name);
+                d->st_compressed = rrdset_find_bytype_localhost("net_compressed", d->name);
                 if(!d->st_compressed)
                     d->st_compressed = rrdset_create("net_compressed", d->name, NULL, d->name, "net.compressed", "Compressed Packets", "packets/s", 7005, update_every, RRDSET_TYPE_LINE);
 
@@ -366,7 +366,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
 
         if(d->do_events == CONFIG_ONDEMAND_YES) {
             if(unlikely(!d->st_events)) {
-                d->st_events = rrdset_find_bytype("net_events", d->name);
+                d->st_events = rrdset_find_bytype_localhost("net_events", d->name);
                 if(!d->st_events)
                     d->st_events = rrdset_create("net_events", d->name, NULL, d->name, "net.events", "Network Interface Events", "events/s", 7006, update_every, RRDSET_TYPE_LINE);
 
index 8ab1e1d4bb253174ee817fab3f9a9d2e2fae8dc4..b01657c7401179b7e6081d93dfd4f36c7e079e70 100644 (file)
@@ -40,7 +40,7 @@ int do_proc_net_ip_vs_stats(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_sockets) {
-        st = rrdset_find(RRD_TYPE_NET_IPVS ".sockets");
+        st = rrdset_find_localhost(RRD_TYPE_NET_IPVS ".sockets");
         if(!st) {
             st = rrdset_create(RRD_TYPE_NET_IPVS, "sockets", NULL, RRD_TYPE_NET_IPVS, NULL, "IPVS New Connections", "connections/s", 3101, update_every, RRDSET_TYPE_LINE);
 
@@ -55,7 +55,7 @@ int do_proc_net_ip_vs_stats(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_packets) {
-        st = rrdset_find(RRD_TYPE_NET_IPVS ".packets");
+        st = rrdset_find_localhost(RRD_TYPE_NET_IPVS ".packets");
         if(!st) {
             st = rrdset_create(RRD_TYPE_NET_IPVS, "packets", NULL, RRD_TYPE_NET_IPVS, NULL, "IPVS Packets", "packets/s", 3102, update_every, RRDSET_TYPE_LINE);
 
@@ -72,7 +72,7 @@ int do_proc_net_ip_vs_stats(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_bandwidth) {
-        st = rrdset_find(RRD_TYPE_NET_IPVS ".net");
+        st = rrdset_find_localhost(RRD_TYPE_NET_IPVS ".net");
         if(!st) {
             st = rrdset_create(RRD_TYPE_NET_IPVS, "net", NULL, RRD_TYPE_NET_IPVS, NULL, "IPVS Bandwidth", "kilobits/s", 3100, update_every, RRDSET_TYPE_AREA);
 
index 869db3bf88bbe73151e8f57b42104e5412996cde..875f6620feff99dba55ec9d3ebe3467a18baf91e 100644 (file)
@@ -230,7 +230,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_bandwidth == CONFIG_ONDEMAND_YES || (do_bandwidth == CONFIG_ONDEMAND_ONDEMAND && (ipext_InOctets || ipext_OutOctets))) {
                 do_bandwidth = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("system.ipv4");
+                st = rrdset_find_localhost("system.ipv4");
                 if(unlikely(!st)) {
                     st = rrdset_create("system", "ipv4", NULL, "network", NULL, "IPv4 Bandwidth", "kilobits/s", 500, update_every, RRDSET_TYPE_AREA);
 
@@ -248,7 +248,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_inerrors == CONFIG_ONDEMAND_YES || (do_inerrors == CONFIG_ONDEMAND_ONDEMAND && (ipext_InNoRoutes || ipext_InTruncatedPkts))) {
                 do_inerrors = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.inerrors");
+                st = rrdset_find_localhost("ipv4.inerrors");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "inerrors", NULL, "errors", NULL, "IPv4 Input Errors", "packets/s", 4000, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -269,7 +269,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_mcast == CONFIG_ONDEMAND_YES || (do_mcast == CONFIG_ONDEMAND_ONDEMAND && (ipext_InMcastOctets || ipext_OutMcastOctets))) {
                 do_mcast = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.mcast");
+                st = rrdset_find_localhost("ipv4.mcast");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "mcast", NULL, "multicast", NULL, "IPv4 Multicast Bandwidth", "kilobits/s", 9000, update_every, RRDSET_TYPE_AREA);
                     st->isdetail = 1;
@@ -288,7 +288,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_bcast == CONFIG_ONDEMAND_YES || (do_bcast == CONFIG_ONDEMAND_ONDEMAND && (ipext_InBcastOctets || ipext_OutBcastOctets))) {
                 do_bcast = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.bcast");
+                st = rrdset_find_localhost("ipv4.bcast");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "bcast", NULL, "broadcast", NULL, "IPv4 Broadcast Bandwidth", "kilobits/s", 8000, update_every, RRDSET_TYPE_AREA);
                     st->isdetail = 1;
@@ -307,7 +307,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_mcast_p == CONFIG_ONDEMAND_YES || (do_mcast_p == CONFIG_ONDEMAND_ONDEMAND && (ipext_InMcastPkts || ipext_OutMcastPkts))) {
                 do_mcast_p = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.mcastpkts");
+                st = rrdset_find_localhost("ipv4.mcastpkts");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "mcastpkts", NULL, "multicast", NULL, "IPv4 Multicast Packets", "packets/s", 8600, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -326,7 +326,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_bcast_p == CONFIG_ONDEMAND_YES || (do_bcast_p == CONFIG_ONDEMAND_ONDEMAND && (ipext_InBcastPkts || ipext_OutBcastPkts))) {
                 do_bcast_p = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.bcastpkts");
+                st = rrdset_find_localhost("ipv4.bcastpkts");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "bcastpkts", NULL, "broadcast", NULL, "IPv4 Broadcast Packets", "packets/s", 8500, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -345,7 +345,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_ecn == CONFIG_ONDEMAND_YES || (do_ecn == CONFIG_ONDEMAND_ONDEMAND && (ipext_InCEPkts || ipext_InECT0Pkts || ipext_InECT1Pkts || ipext_InNoECTPkts))) {
                 do_ecn = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.ecnpkts");
+                st = rrdset_find_localhost("ipv4.ecnpkts");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "ecnpkts", NULL, "ecn", NULL, "IPv4 ECN Statistics", "packets/s", 8700, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -381,7 +381,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_tcpext_memory == CONFIG_ONDEMAND_YES || (do_tcpext_memory == CONFIG_ONDEMAND_ONDEMAND && (tcpext_TCPMemoryPressures))) {
                 do_tcpext_memory = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.tcpmemorypressures");
+                st = rrdset_find_localhost("ipv4.tcpmemorypressures");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcpmemorypressures", NULL, "tcp", NULL, "TCP Memory Pressures", "events/s", 3000, update_every, RRDSET_TYPE_LINE);
 
@@ -397,7 +397,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_tcpext_connaborts == CONFIG_ONDEMAND_YES || (do_tcpext_connaborts == CONFIG_ONDEMAND_ONDEMAND && (tcpext_TCPAbortOnData || tcpext_TCPAbortOnClose || tcpext_TCPAbortOnMemory || tcpext_TCPAbortOnTimeout || tcpext_TCPAbortOnLinger || tcpext_TCPAbortFailed))) {
                 do_tcpext_connaborts = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.tcpconnaborts");
+                st = rrdset_find_localhost("ipv4.tcpconnaborts");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcpconnaborts", NULL, "tcp", NULL, "TCP Connection Aborts", "connections/s", 3010, update_every, RRDSET_TYPE_LINE);
 
@@ -422,7 +422,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_tcpext_reorder == CONFIG_ONDEMAND_YES || (do_tcpext_reorder == CONFIG_ONDEMAND_ONDEMAND && (tcpext_TCPRenoReorder || tcpext_TCPFACKReorder || tcpext_TCPSACKReorder || tcpext_TCPTSReorder))) {
                 do_tcpext_reorder = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.tcpreorders");
+                st = rrdset_find_localhost("ipv4.tcpreorders");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcpreorders", NULL, "tcp", NULL, "TCP Reordered Packets by Detection Method", "packets/s", 3020, update_every, RRDSET_TYPE_LINE);
 
@@ -444,7 +444,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_tcpext_ofo == CONFIG_ONDEMAND_YES || (do_tcpext_ofo == CONFIG_ONDEMAND_ONDEMAND && (tcpext_TCPOFOQueue || tcpext_TCPOFODrop || tcpext_TCPOFOMerge))) {
                 do_tcpext_ofo = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.tcpofo");
+                st = rrdset_find_localhost("ipv4.tcpofo");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcpofo", NULL, "tcp", NULL, "TCP Out-Of-Order Queue", "packets/s", 3050, update_every, RRDSET_TYPE_LINE);
 
@@ -466,7 +466,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
 
             if(do_tcpext_syscookies == CONFIG_ONDEMAND_YES || (do_tcpext_syscookies == CONFIG_ONDEMAND_ONDEMAND && (tcpext_SyncookiesSent || tcpext_SyncookiesRecv || tcpext_SyncookiesFailed))) {
                 do_tcpext_syscookies = CONFIG_ONDEMAND_YES;
-                st = rrdset_find("ipv4.tcpsyncookies");
+                st = rrdset_find_localhost("ipv4.tcpsyncookies");
                 if(unlikely(!st)) {
                     st = rrdset_create("ipv4", "tcpsyncookies", NULL, "tcp", NULL, "TCP SYN Cookies", "packets/s", 3100, update_every, RRDSET_TYPE_LINE);
 
index ac358f8c4b0a5bbe5dadbf7282e705c699c51057..4a6153af60cef11321c3bd6de94f5a8f6fb0933c 100644 (file)
@@ -269,7 +269,7 @@ int do_proc_net_rpc_nfs(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_net == 2) {
-        st = rrdset_find_bytype("nfs", "net");
+        st = rrdset_find_bytype_localhost("nfs", "net");
         if(!st) {
             st = rrdset_create("nfs", "net", NULL, "network", NULL, "NFS Client Network", "operations/s", 5007, update_every, RRDSET_TYPE_STACKED);
             st->isdetail = 1;
@@ -291,7 +291,7 @@ int do_proc_net_rpc_nfs(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_rpc == 2) {
-        st = rrdset_find_bytype("nfs", "rpc");
+        st = rrdset_find_bytype_localhost("nfs", "rpc");
         if(!st) {
             st = rrdset_create("nfs", "rpc", NULL, "rpc", NULL, "NFS Client Remote Procedure Calls Statistics", "calls/s", 5008, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -312,7 +312,7 @@ int do_proc_net_rpc_nfs(int update_every, usec_t dt) {
 
     if(do_proc2 == 2) {
         unsigned int i;
-        st = rrdset_find_bytype("nfs", "proc2");
+        st = rrdset_find_bytype_localhost("nfs", "proc2");
         if(!st) {
             st = rrdset_create("nfs", "proc2", NULL, "nfsv2rpc", NULL, "NFS v2 Client Remote Procedure Calls", "calls/s", 5009, update_every, RRDSET_TYPE_STACKED);
 
@@ -331,7 +331,7 @@ int do_proc_net_rpc_nfs(int update_every, usec_t dt) {
 
     if(do_proc3 == 2) {
         unsigned int i;
-        st = rrdset_find_bytype("nfs", "proc3");
+        st = rrdset_find_bytype_localhost("nfs", "proc3");
         if(!st) {
             st = rrdset_create("nfs", "proc3", NULL, "nfsv3rpc", NULL, "NFS v3 Client Remote Procedure Calls", "calls/s", 5010, update_every, RRDSET_TYPE_STACKED);
 
@@ -350,7 +350,7 @@ int do_proc_net_rpc_nfs(int update_every, usec_t dt) {
 
     if(do_proc4 == 2) {
         unsigned int i;
-        st = rrdset_find_bytype("nfs", "proc4");
+        st = rrdset_find_bytype_localhost("nfs", "proc4");
         if(!st) {
             st = rrdset_create("nfs", "proc4", NULL, "nfsv4rpc", NULL, "NFS v4 Client Remote Procedure Calls", "calls/s", 5011, update_every, RRDSET_TYPE_STACKED);
 
index 6a83b8e3ade4de74f482dea57922486f03c3b396..39858efc25bc73a767e1375a67329774fc014ad9 100644 (file)
@@ -492,7 +492,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_rc == 2) {
-        st = rrdset_find_bytype("nfsd", "readcache");
+        st = rrdset_find_bytype_localhost("nfsd", "readcache");
         if(!st) {
             st = rrdset_create("nfsd", "readcache", NULL, "cache", NULL, "NFS Server Read Cache", "reads/s", 5000, update_every, RRDSET_TYPE_STACKED);
 
@@ -511,7 +511,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_fh == 2) {
-        st = rrdset_find_bytype("nfsd", "filehandles");
+        st = rrdset_find_bytype_localhost("nfsd", "filehandles");
         if(!st) {
             st = rrdset_create("nfsd", "filehandles", NULL, "filehandles", NULL, "NFS Server File Handles", "handles/s", 5001, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -535,7 +535,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_io == 2) {
-        st = rrdset_find_bytype("nfsd", "io");
+        st = rrdset_find_bytype_localhost("nfsd", "io");
         if(!st) {
             st = rrdset_create("nfsd", "io", NULL, "io", NULL, "NFS Server I/O", "kilobytes/s", 5002, update_every, RRDSET_TYPE_AREA);
 
@@ -552,7 +552,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_th == 2) {
-        st = rrdset_find_bytype("nfsd", "threads");
+        st = rrdset_find_bytype_localhost("nfsd", "threads");
         if(!st) {
             st = rrdset_create("nfsd", "threads", NULL, "threads", NULL, "NFS Server Threads", "threads", 5003, update_every, RRDSET_TYPE_LINE);
 
@@ -563,7 +563,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
         rrddim_set(st, "threads", th_threads);
         rrdset_done(st);
 
-        st = rrdset_find_bytype("nfsd", "threads_fullcnt");
+        st = rrdset_find_bytype_localhost("nfsd", "threads_fullcnt");
         if(!st) {
             st = rrdset_create("nfsd", "threads_fullcnt", NULL, "threads", NULL, "NFS Server Threads Full Count", "ops/s", 5004, update_every, RRDSET_TYPE_LINE);
 
@@ -574,7 +574,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
         rrddim_set(st, "full_count", th_fullcnt);
         rrdset_done(st);
 
-        st = rrdset_find_bytype("nfsd", "threads_histogram");
+        st = rrdset_find_bytype_localhost("nfsd", "threads_histogram");
         if(!st) {
             st = rrdset_create("nfsd", "threads_histogram", NULL, "threads", NULL, "NFS Server Threads Usage Histogram", "percentage", 5005, update_every, RRDSET_TYPE_LINE);
 
@@ -607,7 +607,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_ra == 2) {
-        st = rrdset_find_bytype("nfsd", "readahead");
+        st = rrdset_find_bytype_localhost("nfsd", "readahead");
         if(!st) {
             st = rrdset_create("nfsd", "readahead", NULL, "readahead", NULL, "NFS Server Read Ahead Depth", "percentage", 5005, update_every, RRDSET_TYPE_STACKED);
 
@@ -645,7 +645,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_net == 2) {
-        st = rrdset_find_bytype("nfsd", "net");
+        st = rrdset_find_bytype_localhost("nfsd", "net");
         if(!st) {
             st = rrdset_create("nfsd", "net", NULL, "network", NULL, "NFS Server Network Statistics", "packets/s", 5007, update_every, RRDSET_TYPE_STACKED);
             st->isdetail = 1;
@@ -667,7 +667,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_rpc == 2) {
-        st = rrdset_find_bytype("nfsd", "rpc");
+        st = rrdset_find_bytype_localhost("nfsd", "rpc");
         if(!st) {
             st = rrdset_create("nfsd", "rpc", NULL, "rpc", NULL, "NFS Server Remote Procedure Calls Statistics", "calls/s", 5008, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -691,7 +691,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
 
     if(do_proc2 == 2) {
         unsigned int i;
-        st = rrdset_find_bytype("nfsd", "proc2");
+        st = rrdset_find_bytype_localhost("nfsd", "proc2");
         if(!st) {
             st = rrdset_create("nfsd", "proc2", NULL, "nfsv2rpc", NULL, "NFS v2 Server Remote Procedure Calls", "calls/s", 5009, update_every, RRDSET_TYPE_STACKED);
 
@@ -710,7 +710,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
 
     if(do_proc3 == 2) {
         unsigned int i;
-        st = rrdset_find_bytype("nfsd", "proc3");
+        st = rrdset_find_bytype_localhost("nfsd", "proc3");
         if(!st) {
             st = rrdset_create("nfsd", "proc3", NULL, "nfsv3rpc", NULL, "NFS v3 Server Remote Procedure Calls", "calls/s", 5010, update_every, RRDSET_TYPE_STACKED);
 
@@ -729,7 +729,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
 
     if(do_proc4 == 2) {
         unsigned int i;
-        st = rrdset_find_bytype("nfsd", "proc4");
+        st = rrdset_find_bytype_localhost("nfsd", "proc4");
         if(!st) {
             st = rrdset_create("nfsd", "proc4", NULL, "nfsv4rpc", NULL, "NFS v4 Server Remote Procedure Calls", "calls/s", 5011, update_every, RRDSET_TYPE_STACKED);
 
@@ -748,7 +748,7 @@ int do_proc_net_rpc_nfsd(int update_every, usec_t dt) {
 
     if(do_proc4ops == 2) {
         unsigned int i;
-        st = rrdset_find_bytype("nfsd", "proc4ops");
+        st = rrdset_find_bytype_localhost("nfsd", "proc4ops");
         if(!st) {
             st = rrdset_create("nfsd", "proc4ops", NULL, "nfsv2ops", NULL, "NFS v4 Server Operations", "operations/s", 5012, update_every, RRDSET_TYPE_STACKED);
 
index ac1a35801b8dc574402ab7c7d1b827b9cea7d09a..4a060da9475c3e71119645f1ff625e84d44bfa36 100644 (file)
@@ -392,7 +392,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_ip_packets) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".packets");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".packets");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "packets", NULL, "packets", NULL, "IPv4 Packets", "packets/s", 3000, update_every, RRDSET_TYPE_LINE);
 
@@ -413,7 +413,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_ip_fragsout) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".fragsout");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".fragsout");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "fragsout", NULL, "fragments", NULL, "IPv4 Fragments Sent", "packets/s", 3010, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -433,7 +433,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_ip_fragsin) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".fragsin");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".fragsin");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "fragsin", NULL, "fragments", NULL, "IPv4 Fragments Reassembly", "packets/s", 3011, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -453,7 +453,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_ip_errors) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".errors");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".errors");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "errors", NULL, "errors", NULL, "IPv4 Errors", "packets/s", 3002, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -497,7 +497,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_icmp_packets) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".icmp");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".icmp");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "icmp", NULL, "icmp", NULL, "IPv4 ICMP Packets", "packets/s", 2602, update_every, RRDSET_TYPE_LINE);
 
@@ -511,7 +511,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
 
                 rrdset_done(st);
 
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".icmp_errors");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".icmp_errors");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "icmp_errors", NULL, "icmp", NULL, "IPv4 ICMP Errors", "packets/s", 2603, update_every, RRDSET_TYPE_LINE);
 
@@ -543,7 +543,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             if(do_icmpmsg) {
                 int i;
 
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".icmpmsg");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".icmpmsg");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "icmpmsg", NULL, "icmp", NULL, "IPv4 ICMP Messsages", "packets/s", 2604, update_every, RRDSET_TYPE_LINE);
 
@@ -578,7 +578,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
 
             // see http://net-snmp.sourceforge.net/docs/mibs/tcp.html
             if(do_tcp_sockets) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".tcpsock");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".tcpsock");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "tcpsock", NULL, "tcp", NULL, "IPv4 TCP Connections", "active connections", 2500, update_every, RRDSET_TYPE_LINE);
 
@@ -593,7 +593,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_tcp_packets) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".tcppackets");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".tcppackets");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "tcppackets", NULL, "tcp", NULL, "IPv4 TCP Packets", "packets/s", 2600, update_every, RRDSET_TYPE_LINE);
 
@@ -610,7 +610,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_tcp_errors) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".tcperrors");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".tcperrors");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "tcperrors", NULL, "tcp", NULL, "IPv4 TCP Errors", "packets/s", 2700, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -630,7 +630,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_tcp_handshake) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".tcphandshake");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".tcphandshake");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "tcphandshake", NULL, "tcp", NULL, "IPv4 TCP Handshake Issues", "events/s", 2900, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -671,7 +671,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
 
             // see http://net-snmp.sourceforge.net/docs/mibs/udp.html
             if(do_udp_packets) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".udppackets");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".udppackets");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "udppackets", NULL, "udp", NULL, "IPv4 UDP Packets", "packets/s", 2601, update_every, RRDSET_TYPE_LINE);
 
@@ -688,7 +688,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_udp_errors) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".udperrors");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".udperrors");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "udperrors", NULL, "udp", NULL, "IPv4 UDP Errors", "events/s", 2701, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -730,7 +730,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(do_udplite_packets) {
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".udplite");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".udplite");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "udplite", NULL, "udplite", NULL, "IPv4 UDPLite Packets", "packets/s", 2603, update_every, RRDSET_TYPE_LINE);
 
@@ -743,7 +743,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
                 rrddim_set(st, "OutDatagrams", *udplite_OutDatagrams);
                 rrdset_done(st);
 
-                st = rrdset_find(RRD_TYPE_NET_SNMP ".udplite_errors");
+                st = rrdset_find_localhost(RRD_TYPE_NET_SNMP ".udplite_errors");
                 if(!st) {
                     st = rrdset_create(RRD_TYPE_NET_SNMP, "udplite_errors", NULL, "udplite", NULL, "IPv4 UDPLite Errors", "packets/s", 2604, update_every, RRDSET_TYPE_LINE);
 
index dbb6b84007d4e9f2a1697d257d14edb31217cce7..a2b46eb0dc525e50a25b4eb8a851844bea207b9d 100644 (file)
@@ -278,7 +278,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_bandwidth == CONFIG_ONDEMAND_YES || (do_bandwidth == CONFIG_ONDEMAND_ONDEMAND && (Ip6InOctets || Ip6OutOctets))) {
         do_bandwidth = CONFIG_ONDEMAND_YES;
-        st = rrdset_find("system.ipv6");
+        st = rrdset_find_localhost("system.ipv6");
         if(unlikely(!st)) {
             st = rrdset_create("system", "ipv6", NULL, "network", NULL, "IPv6 Bandwidth", "kilobits/s", 500, update_every, RRDSET_TYPE_AREA);
 
@@ -296,7 +296,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_ip_packets == CONFIG_ONDEMAND_YES || (do_ip_packets == CONFIG_ONDEMAND_ONDEMAND && (Ip6InReceives || Ip6OutRequests || Ip6InDelivers || Ip6OutForwDatagrams))) {
         do_ip_packets = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".packets");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".packets");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "packets", NULL, "packets", NULL, "IPv6 Packets", "packets/s", 3000, update_every, RRDSET_TYPE_LINE);
 
@@ -318,7 +318,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_ip_fragsout == CONFIG_ONDEMAND_YES || (do_ip_fragsout == CONFIG_ONDEMAND_ONDEMAND && (Ip6FragOKs || Ip6FragFails || Ip6FragCreates))) {
         do_ip_fragsout = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".fragsout");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".fragsout");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "fragsout", NULL, "fragments", NULL, "IPv6 Fragments Sent", "packets/s", 3010, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -345,7 +345,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Ip6ReasmReqds
             ))) {
         do_ip_fragsin = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".fragsin");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".fragsin");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "fragsin", NULL, "fragments", NULL, "IPv6 Fragments Reassembly", "packets/s", 3011, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -378,7 +378,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Ip6InNoRoutes
         ))) {
         do_ip_errors = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".errors");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".errors");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "errors", NULL, "errors", NULL, "IPv6 Errors", "packets/s", 3002, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -415,7 +415,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_udp_packets == CONFIG_ONDEMAND_YES || (do_udp_packets == CONFIG_ONDEMAND_ONDEMAND && (Udp6InDatagrams || Udp6OutDatagrams))) {
         do_udp_packets = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".udppackets");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".udppackets");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "udppackets", NULL, "udp", NULL, "IPv6 UDP Packets", "packets/s", 3601, update_every, RRDSET_TYPE_LINE);
 
@@ -441,7 +441,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Udp6IgnoredMulti
         ))) {
         do_udp_errors = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".udperrors");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".udperrors");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "udperrors", NULL, "udp", NULL, "IPv6 UDP Errors", "events/s", 3701, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -468,7 +468,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_udplite_packets == CONFIG_ONDEMAND_YES || (do_udplite_packets == CONFIG_ONDEMAND_ONDEMAND && (UdpLite6InDatagrams || UdpLite6OutDatagrams))) {
         do_udplite_packets = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".udplitepackets");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".udplitepackets");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "udplitepackets", NULL, "udplite", NULL, "IPv6 UDPlite Packets", "packets/s", 3601, update_every, RRDSET_TYPE_LINE);
 
@@ -494,7 +494,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || UdpLite6InCsumErrors
         ))) {
         do_udplite_errors = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".udpliteerrors");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".udpliteerrors");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "udpliteerrors", NULL, "udplite", NULL, "IPv6 UDP Lite Errors", "events/s", 3701, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -519,7 +519,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_mcast == CONFIG_ONDEMAND_YES || (do_mcast == CONFIG_ONDEMAND_ONDEMAND && (Ip6OutMcastOctets || Ip6InMcastOctets))) {
         do_mcast = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".mcast");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".mcast");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "mcast", NULL, "multicast", NULL, "IPv6 Multicast Bandwidth", "kilobits/s", 9000, update_every, RRDSET_TYPE_AREA);
             st->isdetail = 1;
@@ -538,7 +538,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_bcast == CONFIG_ONDEMAND_YES || (do_bcast == CONFIG_ONDEMAND_ONDEMAND && (Ip6OutBcastOctets || Ip6InBcastOctets))) {
         do_bcast = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".bcast");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".bcast");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "bcast", NULL, "broadcast", NULL, "IPv6 Broadcast Bandwidth", "kilobits/s", 8000, update_every, RRDSET_TYPE_AREA);
             st->isdetail = 1;
@@ -557,7 +557,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_mcast_p == CONFIG_ONDEMAND_YES || (do_mcast_p == CONFIG_ONDEMAND_ONDEMAND && (Ip6OutMcastPkts || Ip6InMcastPkts))) {
         do_mcast_p = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".mcastpkts");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".mcastpkts");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "mcastpkts", NULL, "multicast", NULL, "IPv6 Multicast Packets", "packets/s", 9500, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -576,7 +576,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_icmp == CONFIG_ONDEMAND_YES || (do_icmp == CONFIG_ONDEMAND_ONDEMAND && (Icmp6InMsgs || Icmp6OutMsgs))) {
         do_icmp = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".icmp");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".icmp");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "icmp", NULL, "icmp", NULL, "IPv6 ICMP Messages", "messages/s", 10000, update_every, RRDSET_TYPE_LINE);
 
@@ -594,7 +594,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_icmp_redir == CONFIG_ONDEMAND_YES || (do_icmp_redir == CONFIG_ONDEMAND_ONDEMAND && (Icmp6InRedirects || Icmp6OutRedirects))) {
         do_icmp_redir = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".icmpredir");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".icmpredir");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "icmpredir", NULL, "icmp", NULL, "IPv6 ICMP Redirects", "redirects/s", 10050, update_every, RRDSET_TYPE_LINE);
 
@@ -625,7 +625,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Icmp6OutParmProblems
         ))) {
         do_icmp_errors = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".icmperrors");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".icmperrors");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "icmperrors", NULL, "icmp", NULL, "IPv6 ICMP Errors", "errors/s", 10100, update_every, RRDSET_TYPE_LINE);
 
@@ -668,7 +668,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Icmp6OutEchoReplies
         ))) {
         do_icmp_echos = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".icmpechos");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".icmpechos");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "icmpechos", NULL, "icmp", NULL, "IPv6 ICMP Echo", "messages/s", 10200, update_every, RRDSET_TYPE_LINE);
 
@@ -698,7 +698,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Icmp6OutGroupMembReductions
         ))) {
         do_icmp_groupmemb = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".groupmemb");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".groupmemb");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "groupmemb", NULL, "icmp", NULL, "IPv6 ICMP Group Membership", "messages/s", 10300, update_every, RRDSET_TYPE_LINE);
 
@@ -730,7 +730,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Icmp6OutRouterAdvertisements
         ))) {
         do_icmp_router = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".icmprouter");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".icmprouter");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "icmprouter", NULL, "icmp", NULL, "IPv6 Router Messages", "messages/s", 10400, update_every, RRDSET_TYPE_LINE);
 
@@ -758,7 +758,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Icmp6OutNeighborAdvertisements
         ))) {
         do_icmp_neighbor = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".icmpneighbor");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".icmpneighbor");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "icmpneighbor", NULL, "icmp", NULL, "IPv6 Neighbor Messages", "messages/s", 10500, update_every, RRDSET_TYPE_LINE);
 
@@ -780,7 +780,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
     if(do_icmp_mldv2 == CONFIG_ONDEMAND_YES || (do_icmp_mldv2 == CONFIG_ONDEMAND_ONDEMAND && (Icmp6InMLDv2Reports || Icmp6OutMLDv2Reports))) {
         do_icmp_mldv2 = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".icmpmldv2");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".icmpmldv2");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "icmpmldv2", NULL, "icmp", NULL, "IPv6 ICMP MLDv2 Reports", "reports/s", 10600, update_every, RRDSET_TYPE_LINE);
 
@@ -810,7 +810,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Icmp6OutType143
         ))) {
         do_icmp_types = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".icmptypes");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".icmptypes");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "icmptypes", NULL, "icmp", NULL, "IPv6 ICMP Types", "messages/s", 10700, update_every, RRDSET_TYPE_LINE);
 
@@ -850,7 +850,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
             || Ip6InCEPkts
         ))) {
         do_ect = CONFIG_ONDEMAND_YES;
-        st = rrdset_find(RRD_TYPE_NET_SNMP6 ".ect");
+        st = rrdset_find_localhost(RRD_TYPE_NET_SNMP6 ".ect");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_SNMP6, "ect", NULL, "packets", NULL, "IPv6 ECT Packets", "packets/s", 10800, update_every, RRDSET_TYPE_LINE);
 
index e6da070afcd08081375be939e850ad5719b06074..99dc663254c1edf554a1b46b30c0f22f8399412a 100644 (file)
@@ -77,7 +77,7 @@ int do_proc_net_softnet_stat(int update_every, usec_t dt) {
 
     // --------------------------------------------------------------------
 
-    st = rrdset_find_bytype("system", "softnet_stat");
+    st = rrdset_find_bytype_localhost("system", "softnet_stat");
     if(unlikely(!st)) {
         st = rrdset_create("system", "softnet_stat", NULL, "softnet_stat", NULL, "System softnet_stat", "events/s", 955, update_every, RRDSET_TYPE_LINE);
         for(w = 0; w < allocated_columns ;w++)
@@ -97,7 +97,7 @@ int do_proc_net_softnet_stat(int update_every, usec_t dt) {
             char id[50+1];
             snprintfz(id, 50, "cpu%zu_softnet_stat", l);
 
-            st = rrdset_find_bytype("cpu", id);
+            st = rrdset_find_bytype_localhost("cpu", id);
             if(unlikely(!st)) {
                 char title[100+1];
                 snprintfz(title, 100, "CPU%zu softnet_stat", l);
index 5651f9c3f19965657b532cbe791341eb015dd348..4dceadaa9d04d3a8044b2a55d378058ee097c855 100644 (file)
@@ -130,7 +130,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_sockets) {
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_sockets");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_sockets");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_CONNTRACK "_sockets", NULL, RRD_TYPE_NET_STAT_CONNTRACK, NULL, "Connection Tracker Connections", "active connections", 3000, update_every, RRDSET_TYPE_LINE);
 
@@ -145,7 +145,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_new) {
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_new");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_new");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_CONNTRACK "_new", NULL, RRD_TYPE_NET_STAT_CONNTRACK, NULL, "Connection Tracker New Connections", "connections/s", 3001, update_every, RRDSET_TYPE_LINE);
 
@@ -164,7 +164,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_changes) {
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_changes");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_changes");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_CONNTRACK "_changes", NULL, RRD_TYPE_NET_STAT_CONNTRACK, NULL, "Connection Tracker Changes", "changes/s", 3002, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -184,7 +184,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_expect) {
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_expect");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_expect");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_CONNTRACK "_expect", NULL, RRD_TYPE_NET_STAT_CONNTRACK, NULL, "Connection Tracker Expectations", "expectations/s", 3003, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -204,7 +204,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_search) {
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_search");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_search");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_CONNTRACK "_search", NULL, RRD_TYPE_NET_STAT_CONNTRACK, NULL, "Connection Tracker Searches", "searches/s", 3010, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -224,7 +224,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(do_errors) {
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_errors");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_CONNTRACK "_errors");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_CONNTRACK "_errors", NULL, RRD_TYPE_NET_STAT_CONNTRACK, NULL, "Connection Tracker Errors", "events/s", 3005, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
index 9de28e7dd16743a9c4cd1fca3a5dcb941af77973..d3bfae5112e2357808c7d73a71e78631576043b8 100644 (file)
@@ -60,7 +60,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
     if((do_entries == CONFIG_ONDEMAND_ONDEMAND && events) || do_entries == CONFIG_ONDEMAND_YES) {
         do_entries = CONFIG_ONDEMAND_YES;
 
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_SYNPROXY "_entries");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_SYNPROXY "_entries");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_SYNPROXY "_entries", NULL, RRD_TYPE_NET_STAT_SYNPROXY, NULL, "SYNPROXY Entries Used", "entries", 3304, update_every, RRDSET_TYPE_LINE);
 
@@ -77,7 +77,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
     if((do_syns == CONFIG_ONDEMAND_ONDEMAND && events) || do_syns == CONFIG_ONDEMAND_YES) {
         do_syns = CONFIG_ONDEMAND_YES;
 
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_SYNPROXY "_syn_received");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_SYNPROXY "_syn_received");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_SYNPROXY "_syn_received", NULL, RRD_TYPE_NET_STAT_SYNPROXY, NULL, "SYNPROXY SYN Packets received", "SYN/s", 3301, update_every, RRDSET_TYPE_LINE);
 
@@ -94,7 +94,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
     if((do_reopened == CONFIG_ONDEMAND_ONDEMAND && events) || do_reopened == CONFIG_ONDEMAND_YES) {
         do_reopened = CONFIG_ONDEMAND_YES;
 
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_SYNPROXY "_conn_reopened");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_SYNPROXY "_conn_reopened");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_SYNPROXY "_conn_reopened", NULL, RRD_TYPE_NET_STAT_SYNPROXY, NULL, "SYNPROXY Connections Reopened", "connections/s", 3303, update_every, RRDSET_TYPE_LINE);
 
@@ -111,7 +111,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
     if((do_cookies == CONFIG_ONDEMAND_ONDEMAND && events) || do_cookies == CONFIG_ONDEMAND_YES) {
         do_cookies = CONFIG_ONDEMAND_YES;
 
-        st = rrdset_find(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_SYNPROXY "_cookies");
+        st = rrdset_find_localhost(RRD_TYPE_NET_STAT_NETFILTER "." RRD_TYPE_NET_STAT_SYNPROXY "_cookies");
         if(unlikely(!st)) {
             st = rrdset_create(RRD_TYPE_NET_STAT_NETFILTER, RRD_TYPE_NET_STAT_SYNPROXY "_cookies", NULL, RRD_TYPE_NET_STAT_SYNPROXY, NULL, "SYNPROXY TCP Cookies", "cookies/s", 3302, update_every, RRDSET_TYPE_LINE);
 
index 61c73ff8345c6eb1ba1c86fe0627fa6cc3b44ec6..d52fa63679b3abed13af981a824fdc4a70828957 100644 (file)
@@ -128,7 +128,7 @@ int do_proc_softirqs(int update_every, usec_t dt) {
 
     // --------------------------------------------------------------------
 
-    st = rrdset_find_bytype("system", "softirqs");
+    st = rrdset_find_bytype_localhost("system", "softirqs");
     if(unlikely(!st)) st = rrdset_create("system", "softirqs", NULL, "softirqs", NULL, "System softirqs", "softirqs/s", 950, update_every, RRDSET_TYPE_STACKED);
     else rrdset_next(st);
 
@@ -163,7 +163,7 @@ int do_proc_softirqs(int update_every, usec_t dt) {
             char id[50+1];
             snprintfz(id, 50, "cpu%d_softirqs", c);
 
-            st = rrdset_find_bytype("cpu", id);
+            st = rrdset_find_bytype_localhost("cpu", id);
             if(unlikely(!st)) {
                 // find if everything is zero
                 unsigned long long core_sum = 0 ;
index d1bc6cdb10ea326d9f4fe8dd9c9d54ecb0ed8920..df12f6ce5ea05fe8bd8e9618ca8d2ab72f0a53b1 100644 (file)
@@ -91,7 +91,7 @@ int do_proc_stat(int update_every, usec_t dt) {
             }
 
             if(likely((isthistotal && do_cpu) || (!isthistotal && do_cpu_cores))) {
-                st = rrdset_find_bytype(type, id);
+                st = rrdset_find_bytype_localhost(type, id);
                 if(unlikely(!st)) {
                     st = rrdset_create(type, id, NULL, family, context, title, "percentage", priority, update_every, RRDSET_TYPE_STACKED);
 
@@ -132,7 +132,7 @@ int do_proc_stat(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(likely(do_interrupts)) {
-                st = rrdset_find_bytype("system", "intr");
+                st = rrdset_find_bytype_localhost("system", "intr");
                 if(unlikely(!st)) {
                     st = rrdset_create("system", "intr", NULL, "interrupts", NULL, "CPU Interrupts", "interrupts/s", 900, update_every, RRDSET_TYPE_LINE);
                     st->isdetail = 1;
@@ -151,7 +151,7 @@ int do_proc_stat(int update_every, usec_t dt) {
             // --------------------------------------------------------------------
 
             if(likely(do_context)) {
-                st = rrdset_find_bytype("system", "ctxt");
+                st = rrdset_find_bytype_localhost("system", "ctxt");
                 if(unlikely(!st)) {
                     st = rrdset_create("system", "ctxt", NULL, "processes", NULL, "CPU Context Switches", "context switches/s", 800, update_every, RRDSET_TYPE_LINE);
 
@@ -177,7 +177,7 @@ int do_proc_stat(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(likely(do_forks)) {
-        st = rrdset_find_bytype("system", "forks");
+        st = rrdset_find_bytype_localhost("system", "forks");
         if(unlikely(!st)) {
             st = rrdset_create("system", "forks", NULL, "processes", NULL, "Started Processes", "processes/s", 700, update_every, RRDSET_TYPE_LINE);
             st->isdetail = 1;
@@ -193,7 +193,7 @@ int do_proc_stat(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(likely(do_processes)) {
-        st = rrdset_find_bytype("system", "processes");
+        st = rrdset_find_bytype_localhost("system", "processes");
         if(unlikely(!st)) {
             st = rrdset_create("system", "processes", NULL, "processes", NULL, "System Processes", "processes", 600, update_every, RRDSET_TYPE_LINE);
 
index c86bb65bde71e72cc98a7ec3fcc59419a30392fb..8e6c6c38569c418b9f62932b002c5df0b4b683d4 100644 (file)
@@ -17,7 +17,7 @@ int do_proc_sys_kernel_random_entropy_avail(int update_every, usec_t dt) {
 
     unsigned long long entropy = str2ull(procfile_lineword(ff, 0, 0));
 
-    RRDSET *st = rrdset_find_bytype("system", "entropy");
+    RRDSET *st = rrdset_find_bytype_localhost("system", "entropy");
     if(unlikely(!st)) {
         st = rrdset_create("system", "entropy", NULL, "entropy", NULL, "Available Entropy", "entropy", 1000, update_every, RRDSET_TYPE_LINE);
         rrddim_add(st, "entropy", NULL, 1, 1, RRDDIM_ALGORITHM_ABSOLUTE);
index 21760cd4a4b5a53944be14ebfc4ac1e0282228e0..d4a0a16b291b1647090ab209a88f27e2c9323519 100644 (file)
@@ -39,7 +39,7 @@ int do_proc_uptime(int update_every, usec_t dt) {
     // --------------------------------------------------------------------
 
     if(unlikely(!st))
-        st = rrdset_find("system.uptime");
+        st = rrdset_find_localhost("system.uptime");
 
     if(unlikely(!st)) {
         st = rrdset_create("system", "uptime", NULL, "uptime", NULL, "System Uptime", "seconds", 1000, update_every, RRDSET_TYPE_LINE);
index 77638abe32a3128591790219f57021c27db0d8ae..006501709dcce960d0da7621b98f57ac95c5b024 100644 (file)
@@ -323,7 +323,7 @@ void registry_statistics(void) {
 
     static RRDSET *sts = NULL, *stc = NULL, *stm = NULL;
 
-    if(!sts) sts = rrdset_find("netdata.registry_sessions");
+    if(!sts) sts = rrdset_find_localhost("netdata.registry_sessions");
     if(!sts) {
         sts = rrdset_create("netdata", "registry_sessions", NULL, "registry", NULL, "NetData Registry Sessions", "session", 131000, rrd_update_every, RRDSET_TYPE_LINE);
 
@@ -336,7 +336,7 @@ void registry_statistics(void) {
 
     // ------------------------------------------------------------------------
 
-    if(!stc) stc = rrdset_find("netdata.registry_entries");
+    if(!stc) stc = rrdset_find_localhost("netdata.registry_entries");
     if(!stc) {
         stc = rrdset_create("netdata", "registry_entries", NULL, "registry", NULL, "NetData Registry Entries", "entries", 131100, rrd_update_every, RRDSET_TYPE_LINE);
 
@@ -357,7 +357,7 @@ void registry_statistics(void) {
 
     // ------------------------------------------------------------------------
 
-    if(!stm) stm = rrdset_find("netdata.registry_mem");
+    if(!stm) stm = rrdset_find_localhost("netdata.registry_mem");
     if(!stm) {
         stm = rrdset_create("netdata", "registry_mem", NULL, "registry", NULL, "NetData Registry Memory", "KB", 131300, rrd_update_every, RRDSET_TYPE_STACKED);
 
index 5aba989f50b03549faa4553462c32786e8eb336c..65c5f890d01b47350cc8f7310b2993a6b0622764 100644 (file)
--- a/src/rrd.c
+++ b/src/rrd.c
@@ -105,8 +105,8 @@ static RRDFAMILY *rrdfamily_index_find(RRDHOST *host, const char *id, uint32_t h
     return (RRDFAMILY *)avl_search_lock(&(host->rrdfamily_root_index), (avl *) &tmp);
 }
 
-RRDFAMILY *rrdfamily_create(const char *id) {
-    RRDFAMILY *rc = rrdfamily_index_find(&localhost, id, 0);
+RRDFAMILY *rrdfamily_create(RRDHOST *host, const char *id) {
+    RRDFAMILY *rc = rrdfamily_index_find(host, id, 0);
     if(!rc) {
         rc = callocz(1, sizeof(RRDFAMILY));
 
@@ -116,7 +116,7 @@ RRDFAMILY *rrdfamily_create(const char *id) {
         // initialize the variables index
         avl_init_lock(&rc->variables_root_index, rrdvar_compare);
 
-        RRDFAMILY *ret = rrdfamily_index_add(&localhost, rc);
+        RRDFAMILY *ret = rrdfamily_index_add(host, rc);
         if(ret != rc)
             fatal("RRDFAMILY: INTERNAL ERROR: Expected to INSERT RRDFAMILY '%s' into index, but inserted '%s'.", rc->family, (ret)?ret->family:"NONE");
     }
@@ -125,10 +125,10 @@ RRDFAMILY *rrdfamily_create(const char *id) {
     return rc;
 }
 
-void rrdfamily_free(RRDFAMILY *rc) {
+void rrdfamily_free(RRDHOST *host, RRDFAMILY *rc) {
     rc->use_count--;
     if(!rc->use_count) {
-        RRDFAMILY *ret = rrdfamily_index_del(&localhost, rc);
+        RRDFAMILY *ret = rrdfamily_index_del(host, rc);
         if(ret != rc)
             fatal("RRDFAMILY: INTERNAL ERROR: Expected to DELETE RRDFAMILY '%s' from index, but deleted '%s'.", rc->family, (ret)?ret->family:"NONE");
 
@@ -360,7 +360,7 @@ void rrdset_set_name(RRDSET *st, const char *name)
     rrdset_strncpyz_name(b, n, CONFIG_MAX_VALUE);
 
     if(st->name) {
-        rrdset_index_del_name(&localhost, st);
+        rrdset_index_del_name(st->rrdhost, st);
         st->name = config_set_default(st->id, "name", b);
         st->hash_name = simple_hash(st->name);
         rrdsetvar_rename_all(st);
@@ -376,7 +376,7 @@ void rrdset_set_name(RRDSET *st, const char *name)
         rrddimvar_rename_all(rd);
     pthread_rwlock_unlock(&st->rwlock);
 
-    if(unlikely(rrdset_index_add_name(&localhost, st) != st))
+    if(unlikely(rrdset_index_add_name(st->rrdhost, st) != st))
         error("RRDSET: INTERNAL ERROR: attempted to index duplicate chart name '%s'", st->name);
 }
 
@@ -453,8 +453,9 @@ static inline void timeval_align(struct timeval *tv, int update_every) {
     tv->tv_usec = 500000;
 }
 
-RRDSET *rrdset_create(const char *type, const char *id, const char *name, const char *family, const char *context, const char *title, const char *units, long priority, int update_every, int chart_type)
-{
+RRDSET *rrdset_create(const char *type, const char *id, const char *name, const char *family, const char *context, const char *title, const char *units, long priority, int update_every, int chart_type) {
+    RRDHOST *host = &localhost;
+
     if(!type || !type[0]) {
         fatal("Cannot create rrd stats without a type.");
         return NULL;
@@ -470,7 +471,7 @@ RRDSET *rrdset_create(const char *type, const char *id, const char *name, const
 
     snprintfz(fullid, RRD_ID_LENGTH_MAX, "%s.%s", type, id);
 
-    RRDSET *st = rrdset_find(fullid);
+    RRDSET *st = rrdset_find(host, fullid);
     if(st) {
         debug(D_RRD_CALLS, "RRDSET '%s', already exists.", fullid);
         return st;
@@ -547,6 +548,7 @@ RRDSET *rrdset_create(const char *type, const char *id, const char *name, const
         st->mapped = RRD_MEMORY_MODE_RAM;
     }
 
+    st->rrdhost = host;
     st->memsize = size;
     st->entries = entries;
     st->update_every = update_every;
@@ -595,7 +597,7 @@ RRDSET *rrdset_create(const char *type, const char *id, const char *name, const
     avl_init_lock(&st->variables_root_index, rrdvar_compare);
 
     pthread_rwlock_init(&st->rwlock, NULL);
-    rrdhost_rwlock(&localhost);
+    rrdhost_rwlock(host);
 
     if(name && *name) rrdset_set_name(st, name);
     else rrdset_set_name(st, id);
@@ -608,11 +610,10 @@ RRDSET *rrdset_create(const char *type, const char *id, const char *name, const
         st->title = config_get(st->id, "title", varvalue2);
     }
 
-    st->rrdfamily = rrdfamily_create(st->family);
-    st->rrdhost = &localhost;
+    st->rrdfamily = rrdfamily_create(host, st->family);
 
-    st->next = localhost.rrdset_root;
-    localhost.rrdset_root = st;
+    st->next = host->rrdset_root;
+    host->rrdset_root = st;
 
     if(health_enabled) {
         rrdsetvar_create(st, "last_collected_t", RRDVAR_TYPE_TIME_T, &st->last_collected_time.tv_sec, 0);
@@ -622,13 +623,13 @@ RRDSET *rrdset_create(const char *type, const char *id, const char *name, const
         rrdsetvar_create(st, "update_every", RRDVAR_TYPE_INT, &st->update_every, 0);
     }
 
-    if(unlikely(rrdset_index_add(&localhost, st) != st))
+    if(unlikely(rrdset_index_add(host, st) != st))
         error("RRDSET: INTERNAL ERROR: attempt to index duplicate chart '%s'", st->id);
 
     rrdsetcalc_link_matching(st);
     rrdcalctemplate_link_matching(st);
 
-    rrdhost_unlock(&localhost);
+    rrdhost_unlock(host);
 
     return(st);
 }
@@ -869,7 +870,7 @@ void rrdset_free_all(void)
 
         st->rrdfamily->use_count--;
         if(!st->rrdfamily->use_count)
-            rrdfamily_free(st->rrdfamily);
+            rrdfamily_free(&localhost, st->rrdfamily);
 
         pthread_rwlock_unlock(&st->rwlock);
 
@@ -921,33 +922,28 @@ void rrdset_save_all(void) {
 }
 
 
-RRDSET *rrdset_find(const char *id)
-{
-    debug(D_RRD_CALLS, "rrdset_find() for chart %s", id);
-
-    RRDSET *st = rrdset_index_find(&localhost, id, 0);
+RRDSET *rrdset_find(RRDHOST *host, const char *id) {
+    debug(D_RRD_CALLS, "rrdset_find() for chart '%s' in host '%s'", id, host->hostname);
+    RRDSET *st = rrdset_index_find(host, id, 0);
     return(st);
 }
 
-RRDSET *rrdset_find_bytype(const char *type, const char *id)
+RRDSET *rrdset_find_bytype(RRDHOST *host, const char *type, const char *id)
 {
-    debug(D_RRD_CALLS, "rrdset_find_bytype() for chart %s.%s", type, id);
+    debug(D_RRD_CALLS, "rrdset_find_bytype() for chart '%s.%s' in host '%s'", type, id, host->hostname);
 
     char buf[RRD_ID_LENGTH_MAX + 1];
-
     strncpyz(buf, type, RRD_ID_LENGTH_MAX - 1);
     strcat(buf, ".");
     int len = (int) strlen(buf);
     strncpyz(&buf[len], id, (size_t) (RRD_ID_LENGTH_MAX - len));
 
-    return(rrdset_find(buf));
+    return(rrdset_find(host, buf));
 }
 
-RRDSET *rrdset_find_byname(const char *name)
-{
-    debug(D_RRD_CALLS, "rrdset_find_byname() for chart %s", name);
-
-    RRDSET *st = rrdset_index_find_name(&localhost, name, 0);
+RRDSET *rrdset_find_byname(RRDHOST *host, const char *name) {
+    debug(D_RRD_CALLS, "rrdset_find_byname() for chart '%s' in host '%s'", name, host->hostname);
+    RRDSET *st = rrdset_index_find_name(host, name, 0);
     return(st);
 }
 
index e1f312a70c1b1f297922562db3dfff79d22c183f..93eaf12ef61fbbadd791aa15e7441ab688df66c4 100644 (file)
--- a/src/rrd.h
+++ b/src/rrd.h
@@ -315,6 +315,10 @@ struct rrdhost {
     ALARM_LOG health_log;
 
     RRDCALCTEMPLATE *templates;
+
+    uint32_t flags;
+
+    struct rrdhost *next;
 };
 typedef struct rrdhost RRDHOST;
 extern RRDHOST localhost;
@@ -359,9 +363,14 @@ extern RRDSET *rrdset_create(const char *type
 extern void rrdset_free_all(void);
 extern void rrdset_save_all(void);
 
-extern RRDSET *rrdset_find(const char *id);
-extern RRDSET *rrdset_find_bytype(const char *type, const char *id);
-extern RRDSET *rrdset_find_byname(const char *name);
+extern RRDSET *rrdset_find(RRDHOST *host, const char *id);
+#define rrdset_find_localhost(id) rrdset_find(&localhost, id)
+
+extern RRDSET *rrdset_find_bytype(RRDHOST *host, const char *type, const char *id);
+#define rrdset_find_bytype_localhost(type, id) rrdset_find_bytype(&localhost, type, id)
+
+extern RRDSET *rrdset_find_byname(RRDHOST *host, const char *name);
+#define rrdset_find_byname_localhost(name)  rrdset_find_byname(&localhost, name)
 
 extern void rrdset_next_usec_unfiltered(RRDSET *st, usec_t microseconds);
 extern void rrdset_next_usec(RRDSET *st, usec_t microseconds);
index 22ca9eaf5eccc42400af71020eecce035754a601..44af74f03a04c1576e7eab5d41b33a82bff2fe7a 100644 (file)
@@ -132,7 +132,7 @@ int do_proc_sys_devices_system_edac_mc(int update_every, usec_t dt) {
         static RRDSET *ce_st = NULL;
 
         if(unlikely(!ce_st)) {
-            ce_st = rrdset_find("mem.ecc_ce");
+            ce_st = rrdset_find_localhost("mem.ecc_ce");
             if(unlikely(!ce_st))
                 ce_st = rrdset_create("mem", "ecc_ce", NULL, "ecc", NULL, "ECC Memory Correctable Errors", "errors",
                         6600, update_every, RRDSET_TYPE_LINE);
@@ -159,7 +159,7 @@ int do_proc_sys_devices_system_edac_mc(int update_every, usec_t dt) {
         static RRDSET *ue_st = NULL;
 
         if(unlikely(!ue_st)) {
-            ue_st = rrdset_find("mem.ecc_ue");
+            ue_st = rrdset_find_localhost("mem.ecc_ue");
 
             if(unlikely(!ue_st))
                 ue_st = rrdset_create("mem", "ecc_ue", NULL, "ecc", NULL, "ECC Memory Uncorrectable Errors", "errors",
index d4ef28a9e02a13dde0f320c666ce36b53dbeca99..133721e4c97f347b828f110a39ddd78ef9da159c 100644 (file)
@@ -1314,7 +1314,7 @@ void update_services_charts(int update_every,
         if(unlikely(!st_cpu)) {
             char title[CHART_TITLE_MAX + 1];
 
-            st_cpu = rrdset_find_bytype("services", "cpu");
+            st_cpu = rrdset_find_bytype_localhost("services", "cpu");
             if(likely(!st_cpu)) {
                 snprintfz(title, CHART_TITLE_MAX, "Systemd Services CPU utilization (%d%% = %d core%s)", (processors * 100), processors, (processors > 1) ? "s" : "");
                 st_cpu = rrdset_create("services", "cpu", NULL, "cpu", "services.cpu", title, "%", CHART_PRIORITY_SYSTEMD_SERVICES, update_every, RRDSET_TYPE_STACKED);
@@ -1326,7 +1326,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_mem_usage)) {
         if(unlikely(!st_mem_usage)) {
-            st_mem_usage = rrdset_find_bytype("services", "mem_usage");
+            st_mem_usage = rrdset_find_bytype_localhost("services", "mem_usage");
             if(likely(!st_mem_usage))
                 st_mem_usage = rrdset_create("services", "mem_usage", NULL, "mem", "services.mem_usage", (cgroup_used_memory_without_cache)?"Systemd Services Used Memory without Cache":"Systemd Services Used Memory", "MB", CHART_PRIORITY_SYSTEMD_SERVICES + 10, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1336,7 +1336,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_mem_detailed)) {
         if(unlikely(!st_mem_detailed_rss)) {
-            st_mem_detailed_rss = rrdset_find_bytype("services", "mem_rss");
+            st_mem_detailed_rss = rrdset_find_bytype_localhost("services", "mem_rss");
             if(likely(!st_mem_detailed_rss))
                 st_mem_detailed_rss = rrdset_create("services", "mem_rss", NULL, "mem", "services.mem_rss", "Systemd Services RSS Memory", "MB", CHART_PRIORITY_SYSTEMD_SERVICES + 20, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1344,7 +1344,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_mem_detailed_rss);
 
         if(unlikely(!st_mem_detailed_mapped)) {
-            st_mem_detailed_mapped = rrdset_find_bytype("services", "mem_mapped");
+            st_mem_detailed_mapped = rrdset_find_bytype_localhost("services", "mem_mapped");
             if(likely(!st_mem_detailed_mapped))
                 st_mem_detailed_mapped = rrdset_create("services", "mem_mapped", NULL, "mem", "services.mem_mapped", "Systemd Services Mapped Memory", "MB", CHART_PRIORITY_SYSTEMD_SERVICES + 30, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1352,7 +1352,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_mem_detailed_mapped);
 
         if(unlikely(!st_mem_detailed_cache)) {
-            st_mem_detailed_cache = rrdset_find_bytype("services", "mem_cache");
+            st_mem_detailed_cache = rrdset_find_bytype_localhost("services", "mem_cache");
             if(likely(!st_mem_detailed_cache))
                 st_mem_detailed_cache = rrdset_create("services", "mem_cache", NULL, "mem", "services.mem_cache", "Systemd Services Cache Memory", "MB", CHART_PRIORITY_SYSTEMD_SERVICES + 40, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1360,7 +1360,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_mem_detailed_cache);
 
         if(unlikely(!st_mem_detailed_writeback)) {
-            st_mem_detailed_writeback = rrdset_find_bytype("services", "mem_writeback");
+            st_mem_detailed_writeback = rrdset_find_bytype_localhost("services", "mem_writeback");
             if(likely(!st_mem_detailed_writeback))
                 st_mem_detailed_writeback = rrdset_create("services", "mem_writeback", NULL, "mem", "services.mem_writeback", "Systemd Services Writeback Memory", "MB", CHART_PRIORITY_SYSTEMD_SERVICES + 50, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1368,7 +1368,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_mem_detailed_writeback);
 
         if(unlikely(!st_mem_detailed_pgfault)) {
-            st_mem_detailed_pgfault = rrdset_find_bytype("services", "mem_pgfault");
+            st_mem_detailed_pgfault = rrdset_find_bytype_localhost("services", "mem_pgfault");
             if(likely(!st_mem_detailed_pgfault))
                 st_mem_detailed_pgfault = rrdset_create("services", "mem_pgfault", NULL, "mem", "services.mem_pgfault", "Systemd Services Memory Minor Page Faults", "MB/s", CHART_PRIORITY_SYSTEMD_SERVICES + 60, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1376,7 +1376,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_mem_detailed_pgfault);
 
         if(unlikely(!st_mem_detailed_pgmajfault)) {
-            st_mem_detailed_pgmajfault = rrdset_find_bytype("services", "mem_pgmajfault");
+            st_mem_detailed_pgmajfault = rrdset_find_bytype_localhost("services", "mem_pgmajfault");
             if(likely(!st_mem_detailed_pgmajfault))
                 st_mem_detailed_pgmajfault = rrdset_create("services", "mem_pgmajfault", NULL, "mem", "services.mem_pgmajfault", "Systemd Services Memory Major Page Faults", "MB/s", CHART_PRIORITY_SYSTEMD_SERVICES + 70, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1384,7 +1384,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_mem_detailed_pgmajfault);
 
         if(unlikely(!st_mem_detailed_pgpgin)) {
-            st_mem_detailed_pgpgin = rrdset_find_bytype("services", "mem_pgpgin");
+            st_mem_detailed_pgpgin = rrdset_find_bytype_localhost("services", "mem_pgpgin");
             if(likely(!st_mem_detailed_pgpgin))
                 st_mem_detailed_pgpgin = rrdset_create("services", "mem_pgpgin", NULL, "mem", "services.mem_pgpgin", "Systemd Services Memory Charging Activity", "MB/s", CHART_PRIORITY_SYSTEMD_SERVICES + 80, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1392,7 +1392,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_mem_detailed_pgpgin);
 
         if(unlikely(!st_mem_detailed_pgpgout)) {
-            st_mem_detailed_pgpgout = rrdset_find_bytype("services", "mem_pgpgout");
+            st_mem_detailed_pgpgout = rrdset_find_bytype_localhost("services", "mem_pgpgout");
             if(likely(!st_mem_detailed_pgpgout))
                 st_mem_detailed_pgpgout = rrdset_create("services", "mem_pgpgout", NULL, "mem", "services.mem_pgpgout", "Systemd Services Memory Uncharging Activity", "MB/s", CHART_PRIORITY_SYSTEMD_SERVICES + 90, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1402,7 +1402,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_mem_failcnt)) {
         if(unlikely(!st_mem_failcnt)) {
-            st_mem_failcnt = rrdset_find_bytype("services", "mem_failcnt");
+            st_mem_failcnt = rrdset_find_bytype_localhost("services", "mem_failcnt");
             if(likely(!st_mem_failcnt))
                 st_mem_failcnt = rrdset_create("services", "mem_failcnt", NULL, "mem", "services.mem_failcnt", "Systemd Services Memory Limit Failures", "MB", CHART_PRIORITY_SYSTEMD_SERVICES + 110, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1412,7 +1412,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_swap_usage)) {
         if(unlikely(!st_swap_usage)) {
-            st_swap_usage = rrdset_find_bytype("services", "swap_usage");
+            st_swap_usage = rrdset_find_bytype_localhost("services", "swap_usage");
             if(likely(!st_swap_usage))
                 st_swap_usage = rrdset_create("services", "swap_usage", NULL, "swap", "services.swap_usage", "Systemd Services Swap Memory Used", "MB", CHART_PRIORITY_SYSTEMD_SERVICES + 100, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1422,7 +1422,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_io)) {
         if(unlikely(!st_io_read)) {
-            st_io_read = rrdset_find_bytype("services", "io_read");
+            st_io_read = rrdset_find_bytype_localhost("services", "io_read");
             if(likely(!st_io_read))
                 st_io_read = rrdset_create("services", "io_read", NULL, "disk", "services.io_read", "Systemd Services Disk Read Bandwidth", "KB/s", CHART_PRIORITY_SYSTEMD_SERVICES + 120, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1430,7 +1430,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_io_read);
 
         if(unlikely(!st_io_write)) {
-            st_io_write = rrdset_find_bytype("services", "io_write");
+            st_io_write = rrdset_find_bytype_localhost("services", "io_write");
             if(likely(!st_io_write))
                 st_io_write = rrdset_create("services", "io_write", NULL, "disk", "services.io_write", "Systemd Services Disk Write Bandwidth", "KB/s", CHART_PRIORITY_SYSTEMD_SERVICES + 130, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1440,7 +1440,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_io_ops)) {
         if(unlikely(!st_io_serviced_read)) {
-            st_io_serviced_read = rrdset_find_bytype("services", "io_ops_read");
+            st_io_serviced_read = rrdset_find_bytype_localhost("services", "io_ops_read");
             if(likely(!st_io_serviced_read))
                 st_io_serviced_read = rrdset_create("services", "io_ops_read", NULL, "disk", "services.io_ops_read", "Systemd Services Disk Read Operations", "operations/s", CHART_PRIORITY_SYSTEMD_SERVICES + 140, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1448,7 +1448,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_io_serviced_read);
 
         if(unlikely(!st_io_serviced_write)) {
-            st_io_serviced_write = rrdset_find_bytype("services", "io_ops_write");
+            st_io_serviced_write = rrdset_find_bytype_localhost("services", "io_ops_write");
             if(likely(!st_io_serviced_write))
                 st_io_serviced_write = rrdset_create("services", "io_ops_write", NULL, "disk", "services.io_ops_write", "Systemd Services Disk Write Operations", "operations/s", CHART_PRIORITY_SYSTEMD_SERVICES + 150, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1458,7 +1458,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_throttle_io)) {
         if(unlikely(!st_throttle_io_read)) {
-            st_throttle_io_read = rrdset_find_bytype("services", "throttle_io_read");
+            st_throttle_io_read = rrdset_find_bytype_localhost("services", "throttle_io_read");
             if(likely(!st_throttle_io_read))
                 st_throttle_io_read = rrdset_create("services", "throttle_io_read", NULL, "disk", "services.throttle_io_read", "Systemd Services Throttle Disk Read Bandwidth", "KB/s", CHART_PRIORITY_SYSTEMD_SERVICES + 160, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1466,7 +1466,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_throttle_io_read);
 
         if(unlikely(!st_throttle_io_write)) {
-            st_throttle_io_write = rrdset_find_bytype("services", "throttle_io_write");
+            st_throttle_io_write = rrdset_find_bytype_localhost("services", "throttle_io_write");
             if(likely(!st_throttle_io_write))
                 st_throttle_io_write = rrdset_create("services", "throttle_io_write", NULL, "disk", "services.throttle_io_write", "Systemd Services Throttle Disk Write Bandwidth", "KB/s", CHART_PRIORITY_SYSTEMD_SERVICES + 170, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1476,7 +1476,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_throttle_ops)) {
         if(unlikely(!st_throttle_ops_read)) {
-            st_throttle_ops_read = rrdset_find_bytype("services", "throttle_io_ops_read");
+            st_throttle_ops_read = rrdset_find_bytype_localhost("services", "throttle_io_ops_read");
             if(likely(!st_throttle_ops_read))
                 st_throttle_ops_read = rrdset_create("services", "throttle_io_ops_read", NULL, "disk", "services.throttle_io_ops_read", "Systemd Services Throttle Disk Read Operations", "operations/s", CHART_PRIORITY_SYSTEMD_SERVICES + 180, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1484,7 +1484,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_throttle_ops_read);
 
         if(unlikely(!st_throttle_ops_write)) {
-            st_throttle_ops_write = rrdset_find_bytype("services", "throttle_io_ops_write");
+            st_throttle_ops_write = rrdset_find_bytype_localhost("services", "throttle_io_ops_write");
             if(likely(!st_throttle_ops_write))
                 st_throttle_ops_write = rrdset_create("services", "throttle_io_ops_write", NULL, "disk", "services.throttle_io_ops_write", "Systemd Services Throttle Disk Write Operations", "operations/s", CHART_PRIORITY_SYSTEMD_SERVICES + 190, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1494,7 +1494,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_queued_ops)) {
         if(unlikely(!st_queued_ops_read)) {
-            st_queued_ops_read = rrdset_find_bytype("services", "queued_io_ops_read");
+            st_queued_ops_read = rrdset_find_bytype_localhost("services", "queued_io_ops_read");
             if(likely(!st_queued_ops_read))
                 st_queued_ops_read = rrdset_create("services", "queued_io_ops_read", NULL, "disk", "services.queued_io_ops_read", "Systemd Services Queued Disk Read Operations", "operations/s", CHART_PRIORITY_SYSTEMD_SERVICES + 200, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1502,7 +1502,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_queued_ops_read);
 
         if(unlikely(!st_queued_ops_write)) {
-            st_queued_ops_write = rrdset_find_bytype("services", "queued_io_ops_write");
+            st_queued_ops_write = rrdset_find_bytype_localhost("services", "queued_io_ops_write");
             if(likely(!st_queued_ops_write))
                 st_queued_ops_write = rrdset_create("services", "queued_io_ops_write", NULL, "disk", "services.queued_io_ops_write", "Systemd Services Queued Disk Write Operations", "operations/s", CHART_PRIORITY_SYSTEMD_SERVICES + 210, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1512,7 +1512,7 @@ void update_services_charts(int update_every,
 
     if(likely(do_merged_ops)) {
         if(unlikely(!st_merged_ops_read)) {
-            st_merged_ops_read = rrdset_find_bytype("services", "merged_io_ops_read");
+            st_merged_ops_read = rrdset_find_bytype_localhost("services", "merged_io_ops_read");
             if(likely(!st_merged_ops_read))
                 st_merged_ops_read = rrdset_create("services", "merged_io_ops_read", NULL, "disk", "services.merged_io_ops_read", "Systemd Services Merged Disk Read Operations", "operations/s", CHART_PRIORITY_SYSTEMD_SERVICES + 220, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1520,7 +1520,7 @@ void update_services_charts(int update_every,
             rrdset_next(st_merged_ops_read);
 
         if(unlikely(!st_merged_ops_write)) {
-            st_merged_ops_write = rrdset_find_bytype("services", "merged_io_ops_write");
+            st_merged_ops_write = rrdset_find_bytype_localhost("services", "merged_io_ops_write");
             if(likely(!st_merged_ops_write))
                 st_merged_ops_write = rrdset_create("services", "merged_io_ops_write", NULL, "disk", "services.merged_io_ops_write", "Systemd Services Merged Disk Write Operations", "operations/s", CHART_PRIORITY_SYSTEMD_SERVICES + 230, update_every, RRDSET_TYPE_STACKED);
         }
@@ -1780,7 +1780,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->cpuacct_stat.updated && cg->cpuacct_stat.enabled == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_cpu)) {
-                cg->st_cpu = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "cpu");
+                cg->st_cpu = rrdset_find_bytype_localhost(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
+                                                          , "cpu");
                 if(likely(!cg->st_cpu)) {
                     snprintfz(title, CHART_TITLE_MAX, "CPU Usage (%d%% = %d core%s) for cgroup %s", (processors * 100), processors, (processors > 1) ? "s" : "", cg->chart_title);
                     cg->st_cpu = rrdset_create(type, "cpu", NULL, "cpu", "cgroup.cpu", title, "%", CHART_PRIORITY_CONTAINERS, update_every, RRDSET_TYPE_STACKED);
@@ -1801,7 +1802,8 @@ void update_cgroup_charts(int update_every) {
             unsigned int i;
 
             if(unlikely(!cg->st_cpu_per_core)) {
-                cg->st_cpu_per_core = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "cpu_per_core");
+                cg->st_cpu_per_core = rrdset_find_bytype_localhost(
+                        cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "cpu_per_core");
                 if(likely(!cg->st_cpu_per_core)) {
                     snprintfz(title, CHART_TITLE_MAX, "CPU Usage (%d%% = %d core%s) Per Core for cgroup %s", (processors * 100), processors, (processors > 1) ? "s" : "", cg->chart_title);
                     cg->st_cpu_per_core = rrdset_create(type, "cpu_per_core", NULL, "cpu", "cgroup.cpu_per_core", title, "%", CHART_PRIORITY_CONTAINERS + 100, update_every, RRDSET_TYPE_STACKED);
@@ -1823,7 +1825,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->memory.updated_detailed && cg->memory.enabled_detailed == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_mem)) {
-                cg->st_mem = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem");
+                cg->st_mem = rrdset_find_bytype_localhost(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
+                                                          , "mem");
                 if(likely(!cg->st_mem)) {
                     snprintfz(title, CHART_TITLE_MAX, "Memory Usage for cgroup %s", cg->chart_title);
                     cg->st_mem = rrdset_create(type, "mem", NULL, "mem", "cgroup.mem", title, "MB", CHART_PRIORITY_CONTAINERS + 210, update_every, RRDSET_TYPE_STACKED);
@@ -1848,7 +1851,8 @@ void update_cgroup_charts(int update_every) {
             rrdset_done(cg->st_mem);
 
             if(unlikely(!cg->st_writeback)) {
-                cg->st_writeback = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "writeback");
+                cg->st_writeback = rrdset_find_bytype_localhost(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
+                                                                , "writeback");
                 if(likely(!cg->st_writeback)) {
                     snprintfz(title, CHART_TITLE_MAX, "Writeback Memory for cgroup %s", cg->chart_title);
                     cg->st_writeback = rrdset_create(type, "writeback", NULL, "mem", "cgroup.writeback", title, "MB", CHART_PRIORITY_CONTAINERS + 300, update_every, RRDSET_TYPE_AREA);
@@ -1867,7 +1871,8 @@ void update_cgroup_charts(int update_every) {
             rrdset_done(cg->st_writeback);
 
             if(unlikely(!cg->st_mem_activity)) {
-                cg->st_mem_activity = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem_activity");
+                cg->st_mem_activity = rrdset_find_bytype_localhost(
+                        cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem_activity");
                 if(likely(!cg->st_mem_activity)) {
                     snprintfz(title, CHART_TITLE_MAX, "Memory Activity for cgroup %s", cg->chart_title);
                     cg->st_mem_activity = rrdset_create(type, "mem_activity", NULL, "mem", "cgroup.mem_activity", title, "MB/s", CHART_PRIORITY_CONTAINERS + 400, update_every, RRDSET_TYPE_LINE);
@@ -1883,7 +1888,8 @@ void update_cgroup_charts(int update_every) {
             rrdset_done(cg->st_mem_activity);
 
             if(unlikely(!cg->st_pgfaults)) {
-                cg->st_pgfaults = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "pgfaults");
+                cg->st_pgfaults = rrdset_find_bytype_localhost(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
+                                                               , "pgfaults");
                 if(likely(!cg->st_pgfaults)) {
                     snprintfz(title, CHART_TITLE_MAX, "Memory Page Faults for cgroup %s", cg->chart_title);
                     cg->st_pgfaults = rrdset_create(type, "pgfaults", NULL, "mem", "cgroup.pgfaults", title, "MB/s", CHART_PRIORITY_CONTAINERS + 500, update_every, RRDSET_TYPE_LINE);
@@ -1901,7 +1907,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->memory.updated_usage_in_bytes && cg->memory.enabled_usage_in_bytes == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_mem_usage)) {
-                cg->st_mem_usage = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem_usage");
+                cg->st_mem_usage = rrdset_find_bytype_localhost(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
+                                                                , "mem_usage");
                 if(likely(!cg->st_mem_usage)) {
                     snprintfz(title, CHART_TITLE_MAX, "Used Memory %sfor cgroup %s", (cgroup_used_memory_without_cache && cg->memory.updated_detailed)?"without Cache ":"", cg->chart_title);
                     cg->st_mem_usage = rrdset_create(type, "mem_usage", NULL, "mem", "cgroup.mem_usage", title, "MB", CHART_PRIORITY_CONTAINERS + 200, update_every, RRDSET_TYPE_STACKED);
@@ -1919,7 +1926,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->memory.updated_failcnt && cg->memory.enabled_failcnt == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_mem_failcnt)) {
-                cg->st_mem_failcnt = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem_failcnt");
+                cg->st_mem_failcnt = rrdset_find_bytype_localhost(
+                        cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem_failcnt");
                 if(likely(!cg->st_mem_failcnt)) {
                     snprintfz(title, CHART_TITLE_MAX, "Memory Limit Failures for cgroup %s", cg->chart_title);
                     cg->st_mem_failcnt = rrdset_create(type, "mem_failcnt", NULL, "mem", "cgroup.mem_failcnt", title, "count", CHART_PRIORITY_CONTAINERS + 250, update_every, RRDSET_TYPE_LINE);
@@ -1935,7 +1943,7 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->io_service_bytes.updated && cg->io_service_bytes.enabled == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_io)) {
-                cg->st_io = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "io");
+                cg->st_io = rrdset_find_bytype_localhost(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "io");
                 if(likely(!cg->st_io)) {
                     snprintfz(title, CHART_TITLE_MAX, "I/O Bandwidth (all disks) for cgroup %s", cg->chart_title);
                     cg->st_io = rrdset_create(type, "io", NULL, "disk", "cgroup.io", title, "KB/s", CHART_PRIORITY_CONTAINERS + 1200, update_every, RRDSET_TYPE_AREA);
@@ -1953,7 +1961,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->io_serviced.updated && cg->io_serviced.enabled == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_serviced_ops)) {
-                cg->st_serviced_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "serviced_ops");
+                cg->st_serviced_ops = rrdset_find_bytype_localhost(
+                        cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "serviced_ops");
                 if(likely(!cg->st_serviced_ops)) {
                     snprintfz(title, CHART_TITLE_MAX, "Serviced I/O Operations (all disks) for cgroup %s", cg->chart_title);
                     cg->st_serviced_ops = rrdset_create(type, "serviced_ops", NULL, "disk", "cgroup.serviced_ops", title, "operations/s", CHART_PRIORITY_CONTAINERS + 1200, update_every, RRDSET_TYPE_LINE);
@@ -1971,7 +1980,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->throttle_io_service_bytes.updated && cg->throttle_io_service_bytes.enabled == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_throttle_io)) {
-                cg->st_throttle_io = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "throttle_io");
+                cg->st_throttle_io = rrdset_find_bytype_localhost(
+                        cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "throttle_io");
                 if(likely(!cg->st_throttle_io)) {
                     snprintfz(title, CHART_TITLE_MAX, "Throttle I/O Bandwidth (all disks) for cgroup %s", cg->chart_title);
                     cg->st_throttle_io = rrdset_create(type, "throttle_io", NULL, "disk", "cgroup.throttle_io", title, "KB/s", CHART_PRIORITY_CONTAINERS + 1200, update_every, RRDSET_TYPE_AREA);
@@ -1989,7 +1999,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->throttle_io_serviced.updated && cg->throttle_io_serviced.enabled == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_throttle_serviced_ops)) {
-                cg->st_throttle_serviced_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "throttle_serviced_ops");
+                cg->st_throttle_serviced_ops = rrdset_find_bytype_localhost(
+                        cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "throttle_serviced_ops");
                 if(likely(!cg->st_throttle_serviced_ops)) {
                     snprintfz(title, CHART_TITLE_MAX, "Throttle Serviced I/O Operations (all disks) for cgroup %s", cg->chart_title);
                     cg->st_throttle_serviced_ops = rrdset_create(type, "throttle_serviced_ops", NULL, "disk", "cgroup.throttle_serviced_ops", title, "operations/s", CHART_PRIORITY_CONTAINERS + 1200, update_every, RRDSET_TYPE_LINE);
@@ -2007,7 +2018,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->io_queued.updated && cg->io_queued.enabled == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_queued_ops)) {
-                cg->st_queued_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "queued_ops");
+                cg->st_queued_ops = rrdset_find_bytype_localhost(
+                        cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "queued_ops");
                 if(likely(!cg->st_queued_ops)) {
                     snprintfz(title, CHART_TITLE_MAX, "Queued I/O Operations (all disks) for cgroup %s", cg->chart_title);
                     cg->st_queued_ops = rrdset_create(type, "queued_ops", NULL, "disk", "cgroup.queued_ops", title, "operations", CHART_PRIORITY_CONTAINERS + 2000, update_every, RRDSET_TYPE_LINE);
@@ -2025,7 +2037,8 @@ void update_cgroup_charts(int update_every) {
 
         if(likely(cg->io_merged.updated && cg->io_merged.enabled == CONFIG_ONDEMAND_YES)) {
             if(unlikely(!cg->st_merged_ops)) {
-                cg->st_merged_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "merged_ops");
+                cg->st_merged_ops = rrdset_find_bytype_localhost(
+                        cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "merged_ops");
                 if(likely(!cg->st_merged_ops)) {
                     snprintfz(title, CHART_TITLE_MAX, "Merged I/O Operations (all disks) for cgroup %s", cg->chart_title);
                     cg->st_merged_ops = rrdset_create(type, "merged_ops", NULL, "disk", "cgroup.merged_ops", title, "operations/s", CHART_PRIORITY_CONTAINERS + 2100, update_every, RRDSET_TYPE_LINE);
@@ -2110,7 +2123,7 @@ void *cgroups_main(void *ptr) {
             getrusage(RUSAGE_THREAD, &thread);
 
             if(unlikely(!stcpu_thread)) {
-                stcpu_thread = rrdset_find("netdata.plugin_cgroups_cpu");
+                stcpu_thread = rrdset_find_localhost("netdata.plugin_cgroups_cpu");
                 if(unlikely(!stcpu_thread))
                     stcpu_thread = rrdset_create("netdata", "plugin_cgroups_cpu", NULL, "cgroups", NULL, "NetData CGroups Plugin CPU usage", "milliseconds/s", 132000, cgroup_update_every, RRDSET_TYPE_STACKED);
 
index 21fe4a7adec9ed860e2d35361d424a5338b2477a..4f41e12b61d10b13c9e34d19812f258873f5b58f 100644 (file)
@@ -90,7 +90,7 @@ int do_sys_kernel_mm_ksm(int update_every, usec_t dt) {
 
     // --------------------------------------------------------------------
 
-    st = rrdset_find("mem.ksm");
+    st = rrdset_find_localhost("mem.ksm");
     if(!st) {
         st = rrdset_create("mem", "ksm", NULL, "ksm", NULL, "Kernel Same Page Merging", "MB", 5000, update_every, RRDSET_TYPE_AREA);
 
@@ -109,7 +109,7 @@ int do_sys_kernel_mm_ksm(int update_every, usec_t dt) {
     rrddim_set(st, "to_scan", pages_to_scan * page_size);
     rrdset_done(st);
 
-    st = rrdset_find("mem.ksm_savings");
+    st = rrdset_find_localhost("mem.ksm_savings");
     if(!st) {
         st = rrdset_create("mem", "ksm_savings", NULL, "ksm", NULL, "Kernel Same Page Merging Savings", "MB", 5001, update_every, RRDSET_TYPE_AREA);
 
@@ -122,7 +122,7 @@ int do_sys_kernel_mm_ksm(int update_every, usec_t dt) {
     rrddim_set(st, "offered", offered * page_size);
     rrdset_done(st);
 
-    st = rrdset_find("mem.ksm_ratios");
+    st = rrdset_find_localhost("mem.ksm_ratios");
     if(!st) {
         st = rrdset_create("mem", "ksm_ratios", NULL, "ksm", NULL, "Kernel Same Page Merging Effectiveness", "percentage", 5002, update_every, RRDSET_TYPE_LINE);
 
index 9a9e2376608a964f19448dea8c3c757603fe3099..5b0ab6f934767cade80afff759fd3609f6850b61 100644 (file)
@@ -738,8 +738,8 @@ int web_client_api_request_single_chart(struct web_client *w, char *url, void ca
         goto cleanup;
     }
 
-    RRDSET *st = rrdset_find(chart);
-    if(!st) st = rrdset_find_byname(chart);
+    RRDSET *st = rrdset_find_localhost(chart);
+    if(!st) st = rrdset_find_byname_localhost(chart);
     if(!st) {
         buffer_strcat(w->response.data, "Chart is not found: ");
         buffer_strcat_htmlescape(w->response.data, chart);
@@ -888,8 +888,8 @@ int web_client_api_request_v1_badge(struct web_client *w, char *url) {
         goto cleanup;
     }
 
-    RRDSET *st = rrdset_find(chart);
-    if(!st) st = rrdset_find_byname(chart);
+    RRDSET *st = rrdset_find_localhost(chart);
+    if(!st) st = rrdset_find_byname_localhost(chart);
     if(!st) {
         buffer_no_cacheable(w->response.data);
         buffer_svg(w->response.data, "chart not found", NAN, "", NULL, NULL, -1);
@@ -1174,8 +1174,8 @@ int web_client_api_request_v1_data(struct web_client *w, char *url)
         goto cleanup;
     }
 
-    RRDSET *st = rrdset_find(chart);
-    if(!st) st = rrdset_find_byname(chart);
+    RRDSET *st = rrdset_find_localhost(chart);
+    if(!st) st = rrdset_find_byname_localhost(chart);
     if(!st) {
         buffer_strcat(w->response.data, "Chart is not found: ");
         buffer_strcat_htmlescape(w->response.data, chart);
@@ -1517,8 +1517,8 @@ int web_client_api_old_data_request(struct web_client *w, char *url, int datasou
     // do we have such a data set?
     if(*tok) {
         debug(D_WEB_CLIENT, "%llu: Searching for RRD data with name '%s'.", w->id, tok);
-        st = rrdset_find_byname(tok);
-        if(!st) st = rrdset_find(tok);
+        st = rrdset_find_byname_localhost(tok);
+        if(!st) st = rrdset_find_localhost(tok);
     }
 
     if(!st) {
@@ -2173,8 +2173,8 @@ void web_client_process(struct web_client *w) {
                         debug(D_WEB_CLIENT, "%llu: Searching for RRD data with name '%s'.", w->id, tok);
 
                         // do we have such a data set?
-                        RRDSET *st = rrdset_find_byname(tok);
-                        if(!st) st = rrdset_find(tok);
+                        RRDSET *st = rrdset_find_byname_localhost(tok);
+                        if(!st) st = rrdset_find_localhost(tok);
                         if(!st) {
                             // we don't have it
                             // try to send a file with that name
@@ -2239,8 +2239,8 @@ void web_client_process(struct web_client *w) {
                         debug(D_WEB_CLIENT, "%llu: Searching for RRD data with name '%s'.", w->id, tok);
 
                         // do we have such a data set?
-                        RRDSET *st = rrdset_find_byname(tok);
-                        if(!st) st = rrdset_find(tok);
+                        RRDSET *st = rrdset_find_byname_localhost(tok);
+                        if(!st) st = rrdset_find_localhost(tok);
                         if(!st) {
                             code = 404;
                             buffer_strcat(w->response.data, "Chart is not found: ");