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);
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);
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);
*
* 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);
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,
// ----------------------------------------------------------------
- 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);
// ----------------------------------------------------------------
- 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);
// ----------------------------------------------------------------
- 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);
// ----------------------------------------------------------------
- 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);
// ----------------------------------------------------------------
- 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);
// ----------------------------------------------------------------
- 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,
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);
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);
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;
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;
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;
// --------------------------------------------------------------------
- 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;
// --------------------------------------------------------------------
- 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;
// --------------------------------------------------------------------
- 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;
}
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);
// --------------------------------------------------------------------------
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,
// --------------------------------------------------------------------------
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,
// --------------------------------------------------------------------
- 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);
// --------------------------------------------------------------------
- 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;
// --------------------------------------------------------------------
- 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;
// --------------------------------------------------------------------
- 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;
// --------------------------------------------------------------------
- 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;
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);
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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;
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);
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;
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);
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",
// --------------------------------------------------------------------
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",
// --------------------------------------------------------------------
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",
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);
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);
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);
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;
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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,
// --------------------------------------------------------------------
- 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",
// --------------------------------------------------------------------
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);
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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",
// --------------------------------------------------------------------
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,
(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);
(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);
(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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
// --------------------------------------------------------------------
// 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));
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);
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);
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);
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);
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);
// ----------------------------------------------------------------
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);
// 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);
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);
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;
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
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);
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;
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;
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;
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;
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;
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;
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;
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;
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;
// --------------------------------------------------------------------
- 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);
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);
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);
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);
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);
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;
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;
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
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);
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);
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);
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);
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);
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);
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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);
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);
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;
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;
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;
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;
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;
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;
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);
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);
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);
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);
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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
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);
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);
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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);
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);
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
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);
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);
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);
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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);
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);
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);
// 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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
// 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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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);
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);
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);
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);
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;
|| 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;
|| 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;
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);
|| 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;
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);
|| 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;
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;
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;
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;
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);
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);
|| 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);
|| 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);
|| 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);
|| 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);
|| 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);
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);
|| 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);
|| 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);
// --------------------------------------------------------------------
- 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++)
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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;
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);
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);
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);
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);
// --------------------------------------------------------------------
- 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);
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 ;
}
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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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);
// --------------------------------------------------------------------
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;
// --------------------------------------------------------------------
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);
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);
// --------------------------------------------------------------------
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);
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);
// ------------------------------------------------------------------------
- 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);
// ------------------------------------------------------------------------
- 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);
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));
// 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");
}
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");
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);
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);
}
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;
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;
st->mapped = RRD_MEMORY_MODE_RAM;
}
+ st->rrdhost = host;
st->memsize = size;
st->entries = entries;
st->update_every = update_every;
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);
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);
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);
}
st->rrdfamily->use_count--;
if(!st->rrdfamily->use_count)
- rrdfamily_free(st->rrdfamily);
+ rrdfamily_free(&localhost, st->rrdfamily);
pthread_rwlock_unlock(&st->rwlock);
}
-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);
}
ALARM_LOG health_log;
RRDCALCTEMPLATE *templates;
+
+ uint32_t flags;
+
+ struct rrdhost *next;
};
typedef struct rrdhost RRDHOST;
extern RRDHOST localhost;
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);
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);
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",
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);
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
// --------------------------------------------------------------------
- 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);
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);
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);
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);
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);
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);
// 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) {
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
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: ");