summaryrefslogtreecommitdiffstats
path: root/collectors/proc.plugin
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2019-07-12 15:45:35 +0300
committerGitHub <noreply@github.com>2019-07-12 15:45:35 +0300
commite8d6cde97c0bad7c598a3cc04c45603f0c942992 (patch)
tree6937fa6536d19327bb6add153eea6e1cb0755740 /collectors/proc.plugin
parentfecc659376d67f66f483799929eeb962d7b5abd2 (diff)
Add global configuration option for zero metrics (#6419)
* Add global configuration option for zero metrics * Add the option to the cgroup plugin * Add the option to the proc plugin (diskstats, meminfo, net_dev, netstat, sctp_snmp, snmp, snmp6, sockstat, sockstat6, synproxy, vmstat, system_edac_mc, system_node, btrfs, ksm, zfs) * Add the option to the macos plugin * Add the option to the freebsd plugin (devstat, getifaddrs, getmntinfo, sysctl) * Change the option behaviour with the 'auto' value * Add the option to the tc plugin * Update the documentation
Diffstat (limited to 'collectors/proc.plugin')
-rw-r--r--collectors/proc.plugin/README.md2
-rw-r--r--collectors/proc.plugin/proc_diskstats.c59
-rw-r--r--collectors/proc.plugin/proc_meminfo.c18
-rw-r--r--collectors/proc.plugin/proc_net_dev.c25
-rw-r--r--collectors/proc.plugin/proc_net_netstat.c79
-rw-r--r--collectors/proc.plugin/proc_net_sctp_snmp.c35
-rw-r--r--collectors/proc.plugin/proc_net_snmp.c147
-rw-r--r--collectors/proc.plugin/proc_net_snmp6.c247
-rw-r--r--collectors/proc.plugin/proc_net_sockstat.c38
-rw-r--r--collectors/proc.plugin/proc_net_sockstat6.c20
-rw-r--r--collectors/proc.plugin/proc_net_stat_synproxy.c12
-rw-r--r--collectors/proc.plugin/proc_spl_kstat_zfs.c2
-rw-r--r--collectors/proc.plugin/proc_vmstat.c8
-rw-r--r--collectors/proc.plugin/sys_devices_system_edac_mc.c6
-rw-r--r--collectors/proc.plugin/sys_devices_system_node.c3
-rw-r--r--collectors/proc.plugin/sys_fs_btrfs.c16
-rw-r--r--collectors/proc.plugin/sys_kernel_mm_ksm.c4
17 files changed, 480 insertions, 241 deletions
diff --git a/collectors/proc.plugin/README.md b/collectors/proc.plugin/README.md
index cacde84f60..9513877d3b 100644
--- a/collectors/proc.plugin/README.md
+++ b/collectors/proc.plugin/README.md
@@ -75,7 +75,7 @@ netdata will automatically set the name of disks on the dashboard, from the moun
### performance metrics
-By default, Netdata will enable monitoring metrics only when they are not zero. If they are constantly zero they are ignored. Metrics that will start having values, after netdata is started, will be detected and charts will be automatically added to the dashboard (a refresh of the dashboard is needed for them to appear though). Set `yes` for a chart instead of `auto` to enable it permanently.
+By default, Netdata will enable monitoring metrics only when they are not zero. If they are constantly zero they are ignored. Metrics that will start having values, after netdata is started, will be detected and charts will be automatically added to the dashboard (a refresh of the dashboard is needed for them to appear though). Set `yes` for a chart instead of `auto` to enable it permanently. You can also set the `enable zero metrics` option to `yes` in the `[global]` section which enables charts with zero metrics for all internal Netdata plugins.
netdata categorizes all block devices in 3 categories:
diff --git a/collectors/proc.plugin/proc_diskstats.c b/collectors/proc.plugin/proc_diskstats.c
index cd467948c2..eee0cbe7f8 100644
--- a/collectors/proc.plugin/proc_diskstats.c
+++ b/collectors/proc.plugin/proc_diskstats.c
@@ -973,7 +973,9 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// --------------------------------------------------------------------------
// Do performance metrics
- if(d->do_io == CONFIG_BOOLEAN_YES || (d->do_io == CONFIG_BOOLEAN_AUTO && (readsectors || writesectors))) {
+ if(d->do_io == CONFIG_BOOLEAN_YES || (d->do_io == CONFIG_BOOLEAN_AUTO &&
+ (readsectors || writesectors ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
d->do_io = CONFIG_BOOLEAN_YES;
if(unlikely(!d->st_io)) {
@@ -1004,7 +1006,8 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(d->do_ops == CONFIG_BOOLEAN_YES || (d->do_ops == CONFIG_BOOLEAN_AUTO && (reads || writes))) {
+ if(d->do_ops == CONFIG_BOOLEAN_YES || (d->do_ops == CONFIG_BOOLEAN_AUTO &&
+ (reads || writes || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
d->do_ops = CONFIG_BOOLEAN_YES;
if(unlikely(!d->st_ops)) {
@@ -1037,7 +1040,8 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(d->do_qops == CONFIG_BOOLEAN_YES || (d->do_qops == CONFIG_BOOLEAN_AUTO && queued_ios)) {
+ if(d->do_qops == CONFIG_BOOLEAN_YES || (d->do_qops == CONFIG_BOOLEAN_AUTO &&
+ (queued_ios || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
d->do_qops = CONFIG_BOOLEAN_YES;
if(unlikely(!d->st_qops)) {
@@ -1068,7 +1072,8 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(d->do_backlog == CONFIG_BOOLEAN_YES || (d->do_backlog == CONFIG_BOOLEAN_AUTO && backlog_ms)) {
+ if(d->do_backlog == CONFIG_BOOLEAN_YES || (d->do_backlog == CONFIG_BOOLEAN_AUTO &&
+ (backlog_ms || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
d->do_backlog = CONFIG_BOOLEAN_YES;
if(unlikely(!d->st_backlog)) {
@@ -1099,7 +1104,8 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(d->do_util == CONFIG_BOOLEAN_YES || (d->do_util == CONFIG_BOOLEAN_AUTO && busy_ms)) {
+ if(d->do_util == CONFIG_BOOLEAN_YES || (d->do_util == CONFIG_BOOLEAN_AUTO &&
+ (busy_ms || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
d->do_util = CONFIG_BOOLEAN_YES;
if(unlikely(!d->st_util)) {
@@ -1130,7 +1136,8 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(d->do_mops == CONFIG_BOOLEAN_YES || (d->do_mops == CONFIG_BOOLEAN_AUTO && (mreads || mwrites))) {
+ if(d->do_mops == CONFIG_BOOLEAN_YES || (d->do_mops == CONFIG_BOOLEAN_AUTO &&
+ (mreads || mwrites || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
d->do_mops = CONFIG_BOOLEAN_YES;
if(unlikely(!d->st_mops)) {
@@ -1163,7 +1170,8 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(d->do_iotime == CONFIG_BOOLEAN_YES || (d->do_iotime == CONFIG_BOOLEAN_AUTO && (readms || writems))) {
+ if(d->do_iotime == CONFIG_BOOLEAN_YES || (d->do_iotime == CONFIG_BOOLEAN_AUTO &&
+ (readms || writems || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
d->do_iotime = CONFIG_BOOLEAN_YES;
if(unlikely(!d->st_iotime)) {
@@ -1199,8 +1207,12 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// only if this is not the first time we run
if(likely(dt)) {
- if( (d->do_iotime == CONFIG_BOOLEAN_YES || (d->do_iotime == CONFIG_BOOLEAN_AUTO && (readms || writems))) &&
- (d->do_ops == CONFIG_BOOLEAN_YES || (d->do_ops == CONFIG_BOOLEAN_AUTO && (reads || writes)))) {
+ if( (d->do_iotime == CONFIG_BOOLEAN_YES || (d->do_iotime == CONFIG_BOOLEAN_AUTO &&
+ (readms || writems ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) &&
+ (d->do_ops == CONFIG_BOOLEAN_YES || (d->do_ops == CONFIG_BOOLEAN_AUTO &&
+ (reads || writes ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))) {
if(unlikely(!d->st_await)) {
d->st_await = rrdset_create_localhost(
@@ -1230,8 +1242,10 @@ int do_proc_diskstats(int update_every, usec_t dt) {
rrdset_done(d->st_await);
}
- if( (d->do_io == CONFIG_BOOLEAN_YES || (d->do_io == CONFIG_BOOLEAN_AUTO && (readsectors || writesectors))) &&
- (d->do_ops == CONFIG_BOOLEAN_YES || (d->do_ops == CONFIG_BOOLEAN_AUTO && (reads || writes)))) {
+ if( (d->do_io == CONFIG_BOOLEAN_YES || (d->do_io == CONFIG_BOOLEAN_AUTO &&
+ (readsectors || writesectors || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) &&
+ (d->do_ops == CONFIG_BOOLEAN_YES || (d->do_ops == CONFIG_BOOLEAN_AUTO &&
+ (reads || writes || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))) {
if(unlikely(!d->st_avgsz)) {
d->st_avgsz = rrdset_create_localhost(
@@ -1261,8 +1275,12 @@ int do_proc_diskstats(int update_every, usec_t dt) {
rrdset_done(d->st_avgsz);
}
- if( (d->do_util == CONFIG_BOOLEAN_YES || (d->do_util == CONFIG_BOOLEAN_AUTO && busy_ms)) &&
- (d->do_ops == CONFIG_BOOLEAN_YES || (d->do_ops == CONFIG_BOOLEAN_AUTO && (reads || writes)))) {
+ if( (d->do_util == CONFIG_BOOLEAN_YES || (d->do_util == CONFIG_BOOLEAN_AUTO &&
+ (busy_ms ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) &&
+ (d->do_ops == CONFIG_BOOLEAN_YES || (d->do_ops == CONFIG_BOOLEAN_AUTO &&
+ (reads || writes ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))) {
if(unlikely(!d->st_svctm)) {
d->st_svctm = rrdset_create_localhost(
@@ -1505,7 +1523,11 @@ int do_proc_diskstats(int update_every, usec_t dt) {
rrdset_done(d->st_bcache_cache_read_races);
}
- if(d->do_bcache == CONFIG_BOOLEAN_YES || (d->do_bcache == CONFIG_BOOLEAN_AUTO && (stats_total_cache_hits != 0 || stats_total_cache_misses != 0 || stats_total_cache_miss_collisions != 0))) {
+ if(d->do_bcache == CONFIG_BOOLEAN_YES || (d->do_bcache == CONFIG_BOOLEAN_AUTO &&
+ (stats_total_cache_hits ||
+ stats_total_cache_misses ||
+ stats_total_cache_miss_collisions ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if(unlikely(!d->st_bcache)) {
d->st_bcache = rrdset_create_localhost(
@@ -1539,7 +1561,10 @@ int do_proc_diskstats(int update_every, usec_t dt) {
rrdset_done(d->st_bcache);
}
- if(d->do_bcache == CONFIG_BOOLEAN_YES || (d->do_bcache == CONFIG_BOOLEAN_AUTO && (stats_total_cache_bypass_hits != 0 || stats_total_cache_bypass_misses != 0))) {
+ if(d->do_bcache == CONFIG_BOOLEAN_YES || (d->do_bcache == CONFIG_BOOLEAN_AUTO &&
+ (stats_total_cache_bypass_hits ||
+ stats_total_cache_bypass_misses ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if(unlikely(!d->st_bcache_bypass)) {
d->st_bcache_bypass = rrdset_create_localhost(
@@ -1575,7 +1600,9 @@ int do_proc_diskstats(int update_every, usec_t dt) {
// ------------------------------------------------------------------------
// update the system total I/O
- if(global_do_io == CONFIG_BOOLEAN_YES || (global_do_io == CONFIG_BOOLEAN_AUTO && (system_read_kb || system_write_kb))) {
+ if(global_do_io == CONFIG_BOOLEAN_YES || (global_do_io == CONFIG_BOOLEAN_AUTO &&
+ (system_read_kb || system_write_kb ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
static RRDSET *st_io = NULL;
static RRDDIM *rd_in = NULL, *rd_out = NULL;
diff --git a/collectors/proc.plugin/proc_meminfo.c b/collectors/proc.plugin/proc_meminfo.c
index ae399c4400..92135393d2 100644
--- a/collectors/proc.plugin/proc_meminfo.c
+++ b/collectors/proc.plugin/proc_meminfo.c
@@ -219,7 +219,9 @@ int do_proc_meminfo(int update_every, usec_t dt) {
unsigned long long SwapUsed = SwapTotal - SwapFree;
- if(do_swap == CONFIG_BOOLEAN_YES || SwapTotal || SwapUsed || SwapFree) {
+ if(do_swap == CONFIG_BOOLEAN_YES || (do_swap == CONFIG_BOOLEAN_AUTO &&
+ (SwapTotal || SwapUsed || SwapFree ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_swap = CONFIG_BOOLEAN_YES;
static RRDSET *st_system_swap = NULL;
@@ -256,7 +258,10 @@ int do_proc_meminfo(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(arl_hwcorrupted->flags & ARL_ENTRY_FLAG_FOUND && (do_hwcorrupt == CONFIG_BOOLEAN_YES || (do_hwcorrupt == CONFIG_BOOLEAN_AUTO && HardwareCorrupted > 0))) {
+ if(arl_hwcorrupted->flags & ARL_ENTRY_FLAG_FOUND &&
+ (do_hwcorrupt == CONFIG_BOOLEAN_YES || (do_hwcorrupt == CONFIG_BOOLEAN_AUTO &&
+ (HardwareCorrupted > 0 ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))) {
do_hwcorrupt = CONFIG_BOOLEAN_YES;
static RRDSET *st_mem_hwcorrupt = NULL;
@@ -438,7 +443,9 @@ int do_proc_meminfo(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_hugepages == CONFIG_BOOLEAN_YES || (do_hugepages == CONFIG_BOOLEAN_AUTO && Hugepagesize != 0 && HugePages_Total != 0)) {
+ if(do_hugepages == CONFIG_BOOLEAN_YES || (do_hugepages == CONFIG_BOOLEAN_AUTO &&
+ ((Hugepagesize && HugePages_Total) ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_hugepages = CONFIG_BOOLEAN_YES;
static RRDSET *st_mem_hugepages = NULL;
@@ -479,7 +486,10 @@ int do_proc_meminfo(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_transparent_hugepages == CONFIG_BOOLEAN_YES || (do_transparent_hugepages == CONFIG_BOOLEAN_AUTO && (AnonHugePages != 0 || ShmemHugePages != 0))) {
+ if(do_transparent_hugepages == CONFIG_BOOLEAN_YES || (do_transparent_hugepages == CONFIG_BOOLEAN_AUTO &&
+ (AnonHugePages ||
+ ShmemHugePages ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_transparent_hugepages = CONFIG_BOOLEAN_YES;
static RRDSET *st_mem_transparent_hugepages = NULL;
diff --git a/collectors/proc.plugin/proc_net_dev.c b/collectors/proc.plugin/proc_net_dev.c
index 1e426e9775..8d9751d1c2 100644
--- a/collectors/proc.plugin/proc_net_dev.c
+++ b/collectors/proc.plugin/proc_net_dev.c
@@ -601,7 +601,8 @@ int do_proc_net_dev(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(unlikely((d->do_bandwidth == CONFIG_BOOLEAN_AUTO && (d->rbytes || d->tbytes))))
+ if(unlikely(d->do_bandwidth == CONFIG_BOOLEAN_AUTO &&
+ (d->rbytes || d->tbytes || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))
d->do_bandwidth = CONFIG_BOOLEAN_YES;
if(d->do_bandwidth == CONFIG_BOOLEAN_YES) {
@@ -671,7 +672,8 @@ int do_proc_net_dev(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(unlikely((d->do_packets == CONFIG_BOOLEAN_AUTO && (d->rpackets || d->tpackets || d->rmulticast))))
+ if(unlikely(d->do_packets == CONFIG_BOOLEAN_AUTO &&
+ (d->rpackets || d->tpackets || d->rmulticast || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))
d->do_packets = CONFIG_BOOLEAN_YES;
if(d->do_packets == CONFIG_BOOLEAN_YES) {
@@ -716,7 +718,8 @@ int do_proc_net_dev(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(unlikely((d->do_errors == CONFIG_BOOLEAN_AUTO && (d->rerrors || d->terrors))))
+ if(unlikely(d->do_errors == CONFIG_BOOLEAN_AUTO &&
+ (d->rerrors || d->terrors || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))
d->do_errors = CONFIG_BOOLEAN_YES;
if(d->do_errors == CONFIG_BOOLEAN_YES) {
@@ -759,7 +762,8 @@ int do_proc_net_dev(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(unlikely((d->do_drops == CONFIG_BOOLEAN_AUTO && (d->rdrops || d->tdrops))))
+ if(unlikely(d->do_drops == CONFIG_BOOLEAN_AUTO &&
+ (d->rdrops || d->tdrops || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))
d->do_drops = CONFIG_BOOLEAN_YES;
if(d->do_drops == CONFIG_BOOLEAN_YES) {
@@ -802,7 +806,8 @@ int do_proc_net_dev(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(unlikely((d->do_fifo == CONFIG_BOOLEAN_AUTO && (d->rfifo || d->tfifo))))
+ if(unlikely(d->do_fifo == CONFIG_BOOLEAN_AUTO &&
+ (d->rfifo || d->tfifo || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))
d->do_fifo = CONFIG_BOOLEAN_YES;
if(d->do_fifo == CONFIG_BOOLEAN_YES) {
@@ -845,7 +850,8 @@ int do_proc_net_dev(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(unlikely((d->do_compressed == CONFIG_BOOLEAN_AUTO && (d->rcompressed || d->tcompressed))))
+ if(unlikely(d->do_compressed == CONFIG_BOOLEAN_AUTO &&
+ (d->rcompressed || d->tcompressed || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))
d->do_compressed = CONFIG_BOOLEAN_YES;
if(d->do_compressed == CONFIG_BOOLEAN_YES) {
@@ -888,7 +894,8 @@ int do_proc_net_dev(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(unlikely((d->do_events == CONFIG_BOOLEAN_AUTO && (d->rframe || d->tcollisions || d->tcarrier))))
+ if(unlikely(d->do_events == CONFIG_BOOLEAN_AUTO &&
+ (d->rframe || d->tcollisions || d->tcarrier || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES)))
d->do_events = CONFIG_BOOLEAN_YES;
if(d->do_events == CONFIG_BOOLEAN_YES) {
@@ -924,7 +931,9 @@ int do_proc_net_dev(int update_every, usec_t dt) {
}
}
- if(do_bandwidth == CONFIG_BOOLEAN_YES || (do_bandwidth == CONFIG_BOOLEAN_AUTO && (system_rbytes || system_tbytes))) {
+ if(do_bandwidth == CONFIG_BOOLEAN_YES || (do_bandwidth == CONFIG_BOOLEAN_AUTO &&
+ (system_rbytes || system_tbytes ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_bandwidth = CONFIG_BOOLEAN_YES;
static RRDSET *st_system_net = NULL;
static RRDDIM *rd_in = NULL, *rd_out = NULL;
diff --git a/collectors/proc.plugin/proc_net_netstat.c b/collectors/proc.plugin/proc_net_netstat.c
index 2dc3c59c09..ab8206be38 100644
--- a/collectors/proc.plugin/proc_net_netstat.c
+++ b/collectors/proc.plugin/proc_net_netstat.c
@@ -262,7 +262,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_bandwidth == CONFIG_BOOLEAN_YES || (do_bandwidth == CONFIG_BOOLEAN_AUTO && (ipext_InOctets || ipext_OutOctets))) {
+ if(do_bandwidth == CONFIG_BOOLEAN_YES || (do_bandwidth == CONFIG_BOOLEAN_AUTO &&
+ (ipext_InOctets ||
+ ipext_OutOctets ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_bandwidth = CONFIG_BOOLEAN_YES;
static RRDSET *st_system_ip = NULL;
static RRDDIM *rd_in = NULL, *rd_out = NULL;
@@ -297,7 +300,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_inerrors == CONFIG_BOOLEAN_YES || (do_inerrors == CONFIG_BOOLEAN_AUTO && (ipext_InNoRoutes || ipext_InTruncatedPkts))) {
+ if(do_inerrors == CONFIG_BOOLEAN_YES || (do_inerrors == CONFIG_BOOLEAN_AUTO &&
+ (ipext_InNoRoutes ||
+ ipext_InTruncatedPkts ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_inerrors = CONFIG_BOOLEAN_YES;
static RRDSET *st_ip_inerrors = NULL;
static RRDDIM *rd_noroutes = NULL, *rd_truncated = NULL, *rd_checksum = NULL;
@@ -336,7 +342,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_mcast == CONFIG_BOOLEAN_YES || (do_mcast == CONFIG_BOOLEAN_AUTO && (ipext_InMcastOctets || ipext_OutMcastOctets))) {
+ if(do_mcast == CONFIG_BOOLEAN_YES || (do_mcast == CONFIG_BOOLEAN_AUTO &&
+ (ipext_InMcastOctets ||
+ ipext_OutMcastOctets ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_mcast = CONFIG_BOOLEAN_YES;
static RRDSET *st_ip_mcast = NULL;
static RRDDIM *rd_in = NULL, *rd_out = NULL;
@@ -373,7 +382,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_bcast == CONFIG_BOOLEAN_YES || (do_bcast == CONFIG_BOOLEAN_AUTO && (ipext_InBcastOctets || ipext_OutBcastOctets))) {
+ if(do_bcast == CONFIG_BOOLEAN_YES || (do_bcast == CONFIG_BOOLEAN_AUTO &&
+ (ipext_InBcastOctets ||
+ ipext_OutBcastOctets ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_bcast = CONFIG_BOOLEAN_YES;
static RRDSET *st_ip_bcast = NULL;
@@ -411,7 +423,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_mcast_p == CONFIG_BOOLEAN_YES || (do_mcast_p == CONFIG_BOOLEAN_AUTO && (ipext_InMcastPkts || ipext_OutMcastPkts))) {
+ if(do_mcast_p == CONFIG_BOOLEAN_YES || (do_mcast_p == CONFIG_BOOLEAN_AUTO &&
+ (ipext_InMcastPkts ||
+ ipext_OutMcastPkts ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_mcast_p = CONFIG_BOOLEAN_YES;
static RRDSET *st_ip_mcastpkts = NULL;
@@ -448,7 +463,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_bcast_p == CONFIG_BOOLEAN_YES || (do_bcast_p == CONFIG_BOOLEAN_AUTO && (ipext_InBcastPkts || ipext_OutBcastPkts))) {
+ if(do_bcast_p == CONFIG_BOOLEAN_YES || (do_bcast_p == CONFIG_BOOLEAN_AUTO &&
+ (ipext_InBcastPkts ||
+ ipext_OutBcastPkts ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_bcast_p = CONFIG_BOOLEAN_YES;
static RRDSET *st_ip_bcastpkts = NULL;
@@ -486,7 +504,12 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_ecn == CONFIG_BOOLEAN_YES || (do_ecn == CONFIG_BOOLEAN_AUTO && (ipext_InCEPkts || ipext_InECT0Pkts || ipext_InECT1Pkts || ipext_InNoECTPkts))) {
+ if(do_ecn == CONFIG_BOOLEAN_YES || (do_ecn == CONFIG_BOOLEAN_AUTO &&
+ (ipext_InCEPkts ||
+ ipext_InECT0Pkts ||
+ ipext_InECT1Pkts ||
+ ipext_InNoECTPkts ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_ecn = CONFIG_BOOLEAN_YES;
static RRDSET *st_ecnpkts = NULL;
@@ -538,7 +561,9 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_tcpext_memory == CONFIG_BOOLEAN_YES || (do_tcpext_memory == CONFIG_BOOLEAN_AUTO && (tcpext_TCPMemoryPressures))) {
+ if(do_tcpext_memory == CONFIG_BOOLEAN_YES || (do_tcpext_memory == CONFIG_BOOLEAN_AUTO &&
+ (tcpext_TCPMemoryPressures ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_tcpext_memory = CONFIG_BOOLEAN_YES;
static RRDSET *st_tcpmemorypressures = NULL;
@@ -572,7 +597,14 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_tcpext_connaborts == CONFIG_BOOLEAN_YES || (do_tcpext_connaborts == CONFIG_BOOLEAN_AUTO && (tcpext_TCPAbortOnData || tcpext_TCPAbortOnClose || tcpext_TCPAbortOnMemory || tcpext_TCPAbortOnTimeout || tcpext_TCPAbortOnLinger || tcpext_TCPAbortFailed))) {
+ if(do_tcpext_connaborts == CONFIG_BOOLEAN_YES || (do_tcpext_connaborts == CONFIG_BOOLEAN_AUTO &&
+ (tcpext_TCPAbortOnData ||
+ tcpext_TCPAbortOnClose ||
+ tcpext_TCPAbortOnMemory ||
+ tcpext_TCPAbortOnTimeout ||
+ tcpext_TCPAbortOnLinger ||
+ tcpext_TCPAbortFailed ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_tcpext_connaborts = CONFIG_BOOLEAN_YES;
static RRDSET *st_tcpconnaborts = NULL;
@@ -616,7 +648,12 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_tcpext_reorder == CONFIG_BOOLEAN_YES || (do_tcpext_reorder == CONFIG_BOOLEAN_AUTO && (tcpext_TCPRenoReorder || tcpext_TCPFACKReorder || tcpext_TCPSACKReorder || tcpext_TCPTSReorder))) {
+ if(do_tcpext_reorder == CONFIG_BOOLEAN_YES || (do_tcpext_reorder == CONFIG_BOOLEAN_AUTO &&
+ (tcpext_TCPRenoReorder ||
+ tcpext_TCPFACKReorder ||
+ tcpext_TCPSACKReorder ||
+ tcpext_TCPTSReorder ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_tcpext_reorder = CONFIG_BOOLEAN_YES;
static RRDSET *st_tcpreorders = NULL;
@@ -656,7 +693,11 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_tcpext_ofo == CONFIG_BOOLEAN_YES || (do_tcpext_ofo == CONFIG_BOOLEAN_AUTO && (tcpext_TCPOFOQueue || tcpext_TCPOFODrop || tcpext_TCPOFOMerge))) {
+ if(do_tcpext_ofo == CONFIG_BOOLEAN_YES || (do_tcpext_ofo == CONFIG_BOOLEAN_AUTO &&
+ (tcpext_TCPOFOQueue ||
+ tcpext_TCPOFODrop ||
+ tcpext_TCPOFOMerge ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_tcpext_ofo = CONFIG_BOOLEAN_YES;
static RRDSET *st_ip_tcpofo = NULL;
@@ -697,7 +738,11 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_tcpext_syscookies == CONFIG_BOOLEAN_YES || (do_tcpext_syscookies == CONFIG_BOOLEAN_AUTO && (tcpext_SyncookiesSent || tcpext_SyncookiesRecv || tcpext_SyncookiesFailed))) {
+ if(do_tcpext_syscookies == CONFIG_BOOLEAN_YES || (do_tcpext_syscookies == CONFIG_BOOLEAN_AUTO &&
+ (tcpext_SyncookiesSent ||
+ tcpext_SyncookiesRecv ||
+ tcpext_SyncookiesFailed ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_tcpext_syscookies = CONFIG_BOOLEAN_YES;
static RRDSET *st_syncookies = NULL;
@@ -736,7 +781,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_tcpext_syn_queue == CONFIG_BOOLEAN_YES || (do_tcpext_syn_queue == CONFIG_BOOLEAN_AUTO && (tcpext_TCPReqQFullDrop || tcpext_TCPReqQFullDoCookies))) {
+ if(do_tcpext_syn_queue == CONFIG_BOOLEAN_YES || (do_tcpext_syn_queue == CONFIG_BOOLEAN_AUTO &&
+ (tcpext_TCPReqQFullDrop ||
+ tcpext_TCPReqQFullDoCookies ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_tcpext_syn_queue = CONFIG_BOOLEAN_YES;
static RRDSET *st_syn_queue = NULL;
@@ -775,7 +823,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_tcpext_accept_queue == CONFIG_BOOLEAN_YES || (do_tcpext_accept_queue == CONFIG_BOOLEAN_AUTO && (tcpext_ListenOverflows || tcpext_ListenDrops))) {
+ if(do_tcpext_accept_queue == CONFIG_BOOLEAN_YES || (do_tcpext_accept_queue == CONFIG_BOOLEAN_AUTO &&
+ (tcpext_ListenOverflows ||
+ tcpext_ListenDrops ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_tcpext_accept_queue = CONFIG_BOOLEAN_YES;
static RRDSET *st_accept_queue = NULL;
diff --git a/collectors/proc.plugin/proc_net_sctp_snmp.c b/collectors/proc.plugin/proc_net_sctp_snmp.c
index bd1062e982..343cc5afbe 100644
--- a/collectors/proc.plugin/proc_net_sctp_snmp.c
+++ b/collectors/proc.plugin/proc_net_sctp_snmp.c
@@ -124,7 +124,8 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_associations == CONFIG_BOOLEAN_YES || (do_associations == CONFIG_BOOLEAN_AUTO && SctpCurrEstab)) {
+ if(do_associations == CONFIG_BOOLEAN_YES || (do_associations == CONFIG_BOOLEAN_AUTO &&
+ (SctpCurrEstab || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_associations = CONFIG_BOOLEAN_YES;
static RRDSET *st = NULL;
static RRDDIM *rd_established = NULL;
@@ -155,7 +156,12 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_transitions == CONFIG_BOOLEAN_YES || (do_transitions == CONFIG_BOOLEAN_AUTO && (SctpActiveEstabs || SctpPassiveEstabs || SctpAborteds || SctpShutdowns))) {
+ if(do_transitions == CONFIG_BOOLEAN_YES || (do_transitions == CONFIG_BOOLEAN_AUTO &&
+ (SctpActiveEstabs ||
+ SctpPassiveEstabs ||
+ SctpAborteds ||
+ SctpShutdowns ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_transitions = CONFIG_BOOLEAN_YES;
static RRDSET *st = NULL;
static RRDDIM *rd_active = NULL,
@@ -195,7 +201,10 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_packets == CONFIG_BOOLEAN_YES || (do_packets == CONFIG_BOOLEAN_AUTO && (SctpInSCTPPacks || SctpOutSCTPPacks))) {
+ if(do_packets == CONFIG_BOOLEAN_YES || (do_packets == CONFIG_BOOLEAN_AUTO &&
+ (SctpInSCTPPacks ||
+ SctpOutSCTPPacks ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
do_packets = CONFIG_BOOLEAN_YES;
static RRDSET *st = NULL;
static RRDDIM *rd_received = NULL,
@@ -230,7 +239,10 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
// --------------------------------------------------------------------
- if(do_packet_errors == CONFIG_BOOLEAN_YES || (do_packet_errors == CONFIG_BOOLEAN_AUTO && (SctpOutOfBlues || SctpChecksumErrors))) {
+ if(do_packet_errors == CONFIG_BOOLEAN_YES || (do_packet_errors == CONFIG_BOOLEAN_AUTO &&
+ (SctpOutOfBlues ||
+ SctpChecksumErrors ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {