@cryptotaxi247 / netdata-1 / commits / ba7a7b49f

remove "ingore zero metrics" from freebsd plugin (#17805)

Ilya Mashchenko committed Jun 3, 2024 at 22:32 UTC ba7a7b49f1b2ab71de75066c0338e8cc292ff530
4 files changed +31 -182
src/collectors/freebsd.plugin/freebsd_devstat.c
+8 -41
@@ -347,11 +347,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
347
348 cur_dstat.busy_time_ms = dstat[i].busy_time.sec * 1000 + dstat[i].busy_time.frac * BINTIME_SCALE;
349
350 - if(dm->do_io == CONFIG_BOOLEAN_YES || (dm->do_io == CONFIG_BOOLEAN_AUTO &&
351 - (dstat[i].bytes[DEVSTAT_READ] ||
352 - dstat[i].bytes[DEVSTAT_WRITE] ||
353 - dstat[i].bytes[DEVSTAT_FREE] ||
354 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
350 + if (dm->do_io == CONFIG_BOOLEAN_YES || dm->do_io == CONFIG_BOOLEAN_AUTO) {
351 if (unlikely(!dm->st_io)) {
352 dm->st_io = rrdset_create_localhost("disk",
353 disk,
@@ -381,12 +377,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
377 rrdset_done(dm->st_io);
378 }
379
384 - if(dm->do_ops == CONFIG_BOOLEAN_YES || (dm->do_ops == CONFIG_BOOLEAN_AUTO &&
385 - (dstat[i].operations[DEVSTAT_READ] ||
386 - dstat[i].operations[DEVSTAT_WRITE] ||
387 - dstat[i].operations[DEVSTAT_NO_DATA] ||
388 - dstat[i].operations[DEVSTAT_FREE] ||
389 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
380 + if (dm->do_ops == CONFIG_BOOLEAN_YES || dm->do_ops == CONFIG_BOOLEAN_AUTO) {
381 if (unlikely(!dm->st_ops)) {
382 dm->st_ops = rrdset_create_localhost("disk_ops",
383 disk,
@@ -421,10 +412,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
412 rrdset_done(dm->st_ops);
413 }
414
424 - if(dm->do_qops == CONFIG_BOOLEAN_YES || (dm->do_qops == CONFIG_BOOLEAN_AUTO &&
425 - (dstat[i].start_count ||
426 - dstat[i].end_count ||
427 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
415 + if (dm->do_qops == CONFIG_BOOLEAN_YES || dm->do_qops == CONFIG_BOOLEAN_AUTO) {
416 if (unlikely(!dm->st_qops)) {
417 dm->st_qops = rrdset_create_localhost("disk_qops",
418 disk,
@@ -449,9 +437,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
437 rrdset_done(dm->st_qops);
438 }
439
452 - if(dm->do_util == CONFIG_BOOLEAN_YES || (dm->do_util == CONFIG_BOOLEAN_AUTO &&
453 - (cur_dstat.busy_time_ms ||
454 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
440 + if (dm->do_util == CONFIG_BOOLEAN_YES || dm->do_util == CONFIG_BOOLEAN_AUTO) {
441 if (unlikely(!dm->st_util)) {
442 dm->st_util = rrdset_create_localhost("disk_util",
443 disk,
@@ -477,12 +463,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
463 rrdset_done(dm->st_util);
464 }
465
480 - if(dm->do_iotime == CONFIG_BOOLEAN_YES || (dm->do_iotime == CONFIG_BOOLEAN_AUTO &&
481 - (cur_dstat.duration_read_ms ||
482 - cur_dstat.duration_write_ms ||
483 - cur_dstat.duration_other_ms ||
484 - cur_dstat.duration_free_ms ||
485 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
466 + if (dm->do_iotime == CONFIG_BOOLEAN_YES || dm->do_iotime == CONFIG_BOOLEAN_AUTO) {
467 if (unlikely(!dm->st_iotime)) {
468 dm->st_iotime = rrdset_create_localhost("disk_iotime",
469 disk,
@@ -521,12 +502,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
502 // only if this is not the first time we run
503
504 if (likely(dt)) {
524 - if(dm->do_await == CONFIG_BOOLEAN_YES || (dm->do_await == CONFIG_BOOLEAN_AUTO &&
525 - (dstat[i].operations[DEVSTAT_READ] ||
526 - dstat[i].operations[DEVSTAT_WRITE] ||
527 - dstat[i].operations[DEVSTAT_NO_DATA] ||
528 - dstat[i].operations[DEVSTAT_FREE] ||
529 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
505 + if (dm->do_await == CONFIG_BOOLEAN_YES || dm->do_await == CONFIG_BOOLEAN_AUTO) {
506 if (unlikely(!dm->st_await)) {
507 dm->st_await = rrdset_create_localhost("disk_await",
508 disk,
@@ -585,11 +561,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
561 rrdset_done(dm->st_await);
562 }
563
588 - if(dm->do_avagsz == CONFIG_BOOLEAN_YES || (dm->do_avagsz == CONFIG_BOOLEAN_AUTO &&
589 - (dstat[i].operations[DEVSTAT_READ] ||
590 - dstat[i].operations[DEVSTAT_WRITE] ||
591 - dstat[i].operations[DEVSTAT_FREE] ||
592 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
564 + if (dm->do_avagsz == CONFIG_BOOLEAN_YES || dm->do_avagsz == CONFIG_BOOLEAN_AUTO) {
565 if (unlikely(!dm->st_avagsz)) {
566 dm->st_avagsz = rrdset_create_localhost("disk_avgsz",
567 disk,
@@ -639,12 +611,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
611 rrdset_done(dm->st_avagsz);
612 }
613
642 - if(dm->do_svctm == CONFIG_BOOLEAN_YES || (dm->do_svctm == CONFIG_BOOLEAN_AUTO &&
643 - (dstat[i].operations[DEVSTAT_READ] ||
644 - dstat[i].operations[DEVSTAT_WRITE] ||
645 - dstat[i].operations[DEVSTAT_NO_DATA] ||
646 - dstat[i].operations[DEVSTAT_FREE] ||
647 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
614 + if (dm->do_svctm == CONFIG_BOOLEAN_YES || dm->do_svctm == CONFIG_BOOLEAN_AUTO) {
615 if (unlikely(!dm->st_svctm)) {
616 dm->st_svctm = rrdset_create_localhost("disk_svctm",
617 disk,
src/collectors/freebsd.plugin/freebsd_getifaddrs.c
+5 -23
@@ -423,10 +423,7 @@ int do_getifaddrs(int update_every, usec_t dt) {
423 if (unlikely(!ifm->enabled))
424 continue;
425
426 - if (ifm->do_bandwidth == CONFIG_BOOLEAN_YES || (ifm->do_bandwidth == CONFIG_BOOLEAN_AUTO &&
427 - (IFA_DATA(ibytes) ||
428 - IFA_DATA(obytes) ||
429 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
426 + if (ifm->do_bandwidth == CONFIG_BOOLEAN_YES || ifm->do_bandwidth == CONFIG_BOOLEAN_AUTO) {
427 if (unlikely(!ifm->st_bandwidth)) {
428 ifm->st_bandwidth = rrdset_create_localhost("net",
429 ifa->ifa_name,
@@ -451,12 +448,7 @@ int do_getifaddrs(int update_every, usec_t dt) {
448 rrdset_done(ifm->st_bandwidth);
449 }
450
454 - if (ifm->do_packets == CONFIG_BOOLEAN_YES || (ifm->do_packets == CONFIG_BOOLEAN_AUTO &&
455 - (IFA_DATA(ipackets) ||
456 - IFA_DATA(opackets) ||
457 - IFA_DATA(imcasts) ||
458 - IFA_DATA(omcasts) ||
459 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
451 + if (ifm->do_packets == CONFIG_BOOLEAN_YES || ifm->do_packets == CONFIG_BOOLEAN_AUTO) {
452 if (unlikely(!ifm->st_packets)) {
453 ifm->st_packets = rrdset_create_localhost("net_packets",
454 ifa->ifa_name,
@@ -491,10 +483,7 @@ int do_getifaddrs(int update_every, usec_t dt) {
483 rrdset_done(ifm->st_packets);
484 }
485
494 - if (ifm->do_errors == CONFIG_BOOLEAN_YES || (ifm->do_errors == CONFIG_BOOLEAN_AUTO &&
495 - (IFA_DATA(ierrors) ||
496 - IFA_DATA(oerrors) ||
497 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
486 + if (ifm->do_errors == CONFIG_BOOLEAN_YES || ifm->do_errors == CONFIG_BOOLEAN_AUTO) {
487 if (unlikely(!ifm->st_errors)) {
488 ifm->st_errors = rrdset_create_localhost("net_errors",
489 ifa->ifa_name,
@@ -521,12 +510,7 @@ int do_getifaddrs(int update_every, usec_t dt) {
510 rrdset_done(ifm->st_errors);
511 }
512
524 - if (ifm->do_drops == CONFIG_BOOLEAN_YES || (ifm->do_drops == CONFIG_BOOLEAN_AUTO &&
525 - (IFA_DATA(iqdrops) ||
526 - #if __FreeBSD__ >= 11
527 - IFA_DATA(oqdrops) ||
528 - #endif
529 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
513 + if (ifm->do_drops == CONFIG_BOOLEAN_YES || ifm->do_drops == CONFIG_BOOLEAN_AUTO) {
514 if (unlikely(!ifm->st_drops)) {
515 ifm->st_drops = rrdset_create_localhost("net_drops",
516 ifa->ifa_name,
@@ -557,9 +541,7 @@ int do_getifaddrs(int update_every, usec_t dt) {
541 rrdset_done(ifm->st_drops);
542 }
543
560 - if (ifm->do_events == CONFIG_BOOLEAN_YES || (ifm->do_events == CONFIG_BOOLEAN_AUTO &&
561 - (IFA_DATA(collisions) ||
562 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
544 + if (ifm->do_events == CONFIG_BOOLEAN_YES || ifm->do_events == CONFIG_BOOLEAN_AUTO) {
545 if (unlikely(!ifm->st_events)) {
546 ifm->st_events = rrdset_create_localhost("net_events",
547 ifa->ifa_name,
src/collectors/freebsd.plugin/freebsd_getmntinfo.c
+2 -6
@@ -212,9 +212,7 @@ int do_getmntinfo(int update_every, usec_t dt) {
212
213 int rendered = 0;
214
215 - if (m->do_space == CONFIG_BOOLEAN_YES || (m->do_space == CONFIG_BOOLEAN_AUTO &&
216 - (mntbuf[i].f_blocks > 2 ||
217 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
215 + if (m->do_space == CONFIG_BOOLEAN_YES || m->do_space == CONFIG_BOOLEAN_AUTO) {
216 if (unlikely(!m->st_space)) {
217 snprintfz(title, sizeof(title) - 1, "Disk Space Usage for %s [%s]",
218 mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname);
@@ -250,9 +248,7 @@ int do_getmntinfo(int update_every, usec_t dt) {
248 rendered++;
249 }
250
253 - if (m->do_inodes == CONFIG_BOOLEAN_YES || (m->do_inodes == CONFIG_BOOLEAN_AUTO &&
254 - (mntbuf[i].f_files > 1 ||
255 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
251 + if (m->do_inodes == CONFIG_BOOLEAN_YES || m->do_inodes == CONFIG_BOOLEAN_AUTO) {
252 if (unlikely(!m->st_inodes)) {
253 snprintfz(title, sizeof(title) - 1, "Disk Files (inodes) Usage for %s [%s]",
254 mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname);
src/collectors/freebsd.plugin/freebsd_sysctl.c
+16 -112
@@ -1847,13 +1847,7 @@ int do_net_inet_tcp_stats(int update_every, usec_t dt) {
1847 rrdset_done(st);
1848 }
1849
1850 - if (do_tcpext_connaborts == CONFIG_BOOLEAN_YES || (do_tcpext_connaborts == CONFIG_BOOLEAN_AUTO &&
1851 - (tcpstat.tcps_rcvpackafterwin ||
1852 - tcpstat.tcps_rcvafterclose ||
1853 - tcpstat.tcps_rcvmemdrop ||
1854 - tcpstat.tcps_persistdrop ||
1855 - tcpstat.tcps_finwait2_drops ||
1856 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1850 + if (do_tcpext_connaborts == CONFIG_BOOLEAN_YES || do_tcpext_connaborts == CONFIG_BOOLEAN_AUTO) {
1851 do_tcpext_connaborts = CONFIG_BOOLEAN_YES;
1852
1853 static RRDSET *st = NULL;
@@ -1891,9 +1885,7 @@ int do_net_inet_tcp_stats(int update_every, usec_t dt) {
1885 rrdset_done(st);
1886 }
1887
1894 - if (do_tcpext_ofo == CONFIG_BOOLEAN_YES || (do_tcpext_ofo == CONFIG_BOOLEAN_AUTO &&
1895 - (tcpstat.tcps_rcvoopack ||
1896 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1888 + if (do_tcpext_ofo == CONFIG_BOOLEAN_YES || do_tcpext_ofo == CONFIG_BOOLEAN_AUTO) {
1889 do_tcpext_ofo = CONFIG_BOOLEAN_YES;
1890
1891 static RRDSET *st = NULL;
@@ -1922,11 +1914,7 @@ int do_net_inet_tcp_stats(int update_every, usec_t dt) {
1914 rrdset_done(st);
1915 }
1916
1925 - if (do_tcpext_syncookies == CONFIG_BOOLEAN_YES || (do_tcpext_syncookies == CONFIG_BOOLEAN_AUTO &&
1926 - (tcpstat.tcps_sc_sendcookie ||
1927 - tcpstat.tcps_sc_recvcookie ||
1928 - tcpstat.tcps_sc_zonefail ||
1929 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1917 + if (do_tcpext_syncookies == CONFIG_BOOLEAN_YES || do_tcpext_syncookies == CONFIG_BOOLEAN_AUTO) {
1918 do_tcpext_syncookies = CONFIG_BOOLEAN_YES;
1919
1920 static RRDSET *st = NULL;
@@ -1959,9 +1947,7 @@ int do_net_inet_tcp_stats(int update_every, usec_t dt) {
1947 rrdset_done(st);
1948 }
1949
1962 - if(do_tcpext_listen == CONFIG_BOOLEAN_YES || (do_tcpext_listen == CONFIG_BOOLEAN_AUTO &&
1963 - (tcpstat.tcps_listendrop ||
1964 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1950 + if (do_tcpext_listen == CONFIG_BOOLEAN_YES || do_tcpext_listen == CONFIG_BOOLEAN_AUTO) {
1951 do_tcpext_listen = CONFIG_BOOLEAN_YES;
1952
1953 static RRDSET *st_listen = NULL;
@@ -1991,21 +1977,7 @@ int do_net_inet_tcp_stats(int update_every, usec_t dt) {
1977 rrdset_done(st_listen);
1978 }
1979
1994 - if (do_ecn == CONFIG_BOOLEAN_YES || ( do_ecn == CONFIG_BOOLEAN_AUTO &&
1995 - ( netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES ||
1996 -#if __FreeBSD_version < 1400074
1997 -// See https://github.com/freebsd/freebsd-src/commit/1a70101a870015304d5b2446b480d8677d8aad36
1998 - tcpstat.tcps_ecn_ce ||
1999 - tcpstat.tcps_ecn_ect0 ||
2000 - tcpstat.tcps_ecn_ect1
2001 -#else
2002 - tcpstat.tcps_ecn_rcvce ||
2003 - tcpstat.tcps_ecn_rcvect0 ||
2004 - tcpstat.tcps_ecn_rcvect1 ||
2005 - tcpstat.tcps_ecn_sndect0 ||
2006 - tcpstat.tcps_ecn_sndect1
2007 -#endif
2008 - ))) {
1980 + if (do_ecn == CONFIG_BOOLEAN_YES || do_ecn == CONFIG_BOOLEAN_AUTO) {
1981 do_ecn = CONFIG_BOOLEAN_YES;
1982
1983 static RRDSET *st = NULL;
@@ -2527,12 +2499,7 @@ int do_net_inet6_ip6_stats(int update_every, usec_t dt) {
2499 collector_error("DISABLED: net.inet6.ip6.stats module");
2500 return 1;
2501 } else {
2530 - if (do_ip6_packets == CONFIG_BOOLEAN_YES || (do_ip6_packets == CONFIG_BOOLEAN_AUTO &&
2531 - (ip6stat.ip6s_localout ||
2532 - ip6stat.ip6s_total ||
2533 - ip6stat.ip6s_forward ||
2534 - ip6stat.ip6s_delivered ||
2535 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2502 + if (do_ip6_packets == CONFIG_BOOLEAN_YES || do_ip6_packets == CONFIG_BOOLEAN_AUTO) {
2503 do_ip6_packets = CONFIG_BOOLEAN_YES;
2504
2505 static RRDSET *st = NULL;
@@ -2567,11 +2534,7 @@ int do_net_inet6_ip6_stats(int update_every, usec_t dt) {
2534 rrdset_done(st);
2535 }
2536
2570 - if (do_ip6_fragsout == CONFIG_BOOLEAN_YES || (do_ip6_fragsout == CONFIG_BOOLEAN_AUTO &&
2571 - (ip6stat.ip6s_fragmented ||
2572 - ip6stat.ip6s_cantfrag ||
2573 - ip6stat.ip6s_ofragments ||
2574 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2537 + if (do_ip6_fragsout == CONFIG_BOOLEAN_YES || do_ip6_fragsout == CONFIG_BOOLEAN_AUTO) {
2538 do_ip6_fragsout = CONFIG_BOOLEAN_YES;
2539
2540 static RRDSET *st = NULL;
@@ -2606,12 +2569,7 @@ int do_net_inet6_ip6_stats(int update_every, usec_t dt) {
2569 rrdset_done(st);
2570 }
2571
2609 - if (do_ip6_fragsin == CONFIG_BOOLEAN_YES || (do_ip6_fragsin == CONFIG_BOOLEAN_AUTO &&
2610 - (ip6stat.ip6s_reassembled ||
2611 - ip6stat.ip6s_fragdropped ||
2612 - ip6stat.ip6s_fragtimeout ||
2613 - ip6stat.ip6s_fragments ||
2614 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2572 + if (do_ip6_fragsin == CONFIG_BOOLEAN_YES || do_ip6_fragsin == CONFIG_BOOLEAN_AUTO) {
2573 do_ip6_fragsin = CONFIG_BOOLEAN_YES;
2574
2575 static RRDSET *st = NULL;
@@ -2648,17 +2606,7 @@ int do_net_inet6_ip6_stats(int update_every, usec_t dt) {
2606 rrdset_done(st);
2607 }
2608
2651 - if (do_ip6_errors == CONFIG_BOOLEAN_YES || (do_ip6_errors == CONFIG_BOOLEAN_AUTO &&
2652 - (ip6stat.ip6s_toosmall ||
2653 - ip6stat.ip6s_odropped ||
2654 - ip6stat.ip6s_badoptions ||
2655 - ip6stat.ip6s_badvers ||
2656 - ip6stat.ip6s_exthdrtoolong ||
2657 - ip6stat.ip6s_sources_none ||
2658 - ip6stat.ip6s_tooshort ||
2659 - ip6stat.ip6s_cantforward ||
2660 - ip6stat.ip6s_noroute ||
2661 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2609 + if (do_ip6_errors == CONFIG_BOOLEAN_YES || do_ip6_errors == CONFIG_BOOLEAN_AUTO) {
2610 do_ip6_errors = CONFIG_BOOLEAN_YES;
2611
2612 static RRDSET *st = NULL;
@@ -2772,10 +2720,7 @@ int do_net_inet6_icmp6_stats(int update_every, usec_t dt) {
2720
2721 // --------------------------------------------------------------------
2722
2775 - if (do_icmp6 == CONFIG_BOOLEAN_YES || (do_icmp6 == CONFIG_BOOLEAN_AUTO &&
2776 - (icmp6_total.msgs_in ||
2777 - icmp6_total.msgs_out ||
2778 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2723 + if (do_icmp6 == CONFIG_BOOLEAN_YES || do_icmp6 == CONFIG_BOOLEAN_AUTO) {
2724 do_icmp6 = CONFIG_BOOLEAN_YES;
2725
2726 static RRDSET *st = NULL;
@@ -2806,10 +2751,7 @@ int do_net_inet6_icmp6_stats(int update_every, usec_t dt) {
2751 rrdset_done(st);
2752 }
2753
2809 - if (do_icmp6_redir == CONFIG_BOOLEAN_YES || (do_icmp6_redir == CONFIG_BOOLEAN_AUTO &&
2810 - (icmp6stat.icp6s_inhist[ND_REDIRECT] ||
2811 - icmp6stat.icp6s_outhist[ND_REDIRECT] ||
2812 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2754 + if (do_icmp6_redir == CONFIG_BOOLEAN_YES || do_icmp6_redir == CONFIG_BOOLEAN_AUTO) {
2755 do_icmp6_redir = CONFIG_BOOLEAN_YES;
2756
2757 static RRDSET *st = NULL;
@@ -2840,19 +2782,7 @@ int do_net_inet6_icmp6_stats(int update_every, usec_t dt) {
2782 rrdset_done(st);
2783 }
2784
2843 - if (do_icmp6_errors == CONFIG_BOOLEAN_YES || (do_icmp6_errors == CONFIG_BOOLEAN_AUTO &&
2844 - (icmp6stat.icp6s_badcode ||
2845 - icmp6stat.icp6s_badlen ||
2846 - icmp6stat.icp6s_checksum ||
2847 - icmp6stat.icp6s_tooshort ||
2848 - icmp6stat.icp6s_error ||
2849 - icmp6stat.icp6s_inhist[ICMP6_DST_UNREACH] ||
2850 - icmp6stat.icp6s_inhist[ICMP6_TIME_EXCEEDED] ||
2851 - icmp6stat.icp6s_inhist[ICMP6_PARAM_PROB] ||
2852 - icmp6stat.icp6s_outhist[ICMP6_DST_UNREACH] ||
2853 - icmp6stat.icp6s_outhist[ICMP6_TIME_EXCEEDED] ||
2854 - icmp6stat.icp6s_outhist[ICMP6_PARAM_PROB] ||
2855 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2785 + if (do_icmp6_errors == CONFIG_BOOLEAN_YES || do_icmp6_errors == CONFIG_BOOLEAN_AUTO) {
2786 do_icmp6_errors = CONFIG_BOOLEAN_YES;
2787
2788 static RRDSET *st = NULL;
@@ -2902,12 +2832,7 @@ int do_net_inet6_icmp6_stats(int update_every, usec_t dt) {
2832 rrdset_done(st);
2833 }
2834
2905 - if (do_icmp6_echos == CONFIG_BOOLEAN_YES || (do_icmp6_echos == CONFIG_BOOLEAN_AUTO &&
2906 - (icmp6stat.icp6s_inhist[ICMP6_ECHO_REQUEST] ||
2907 - icmp6stat.icp6s_outhist[ICMP6_ECHO_REQUEST] ||
2908 - icmp6stat.icp6s_inhist[ICMP6_ECHO_REPLY] ||
2909 - icmp6stat.icp6s_outhist[ICMP6_ECHO_REPLY] ||
2910 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2835 + if (do_icmp6_echos == CONFIG_BOOLEAN_YES || do_icmp6_echos == CONFIG_BOOLEAN_AUTO) {
2836 do_icmp6_echos = CONFIG_BOOLEAN_YES;
2837
2838 static RRDSET *st = NULL;
@@ -2942,12 +2867,7 @@ int do_net_inet6_icmp6_stats(int update_every, usec_t dt) {
2867 rrdset_done(st);
2868 }
2869
2945 - if (do_icmp6_router == CONFIG_BOOLEAN_YES || (do_icmp6_router == CONFIG_BOOLEAN_AUTO &&
2946 - (icmp6stat.icp6s_inhist[ND_ROUTER_SOLICIT] ||
2947 - icmp6stat.icp6s_outhist[ND_ROUTER_SOLICIT] ||
2948 - icmp6stat.icp6s_inhist[ND_ROUTER_ADVERT] ||
2949 - icmp6stat.icp6s_outhist[ND_ROUTER_ADVERT] ||
2950 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2870 + if (do_icmp6_router == CONFIG_BOOLEAN_YES || do_icmp6_router == CONFIG_BOOLEAN_AUTO) {
2871 do_icmp6_router = CONFIG_BOOLEAN_YES;
2872
2873 static RRDSET *st = NULL;
@@ -2983,12 +2903,7 @@ int do_net_inet6_icmp6_stats(int update_every, usec_t dt) {
2903 rrdset_done(st);
2904 }
2905
2986 - if (do_icmp6_neighbor == CONFIG_BOOLEAN_YES || (do_icmp6_neighbor == CONFIG_BOOLEAN_AUTO &&
2987 - (icmp6stat.icp6s_inhist[ND_NEIGHBOR_SOLICIT] ||
2988 - icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT] ||
2989 - icmp6stat.icp6s_inhist[ND_NEIGHBOR_ADVERT] ||
2990 - icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT] ||
2991 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2906 + if (do_icmp6_neighbor == CONFIG_BOOLEAN_YES || do_icmp6_neighbor == CONFIG_BOOLEAN_AUTO) {
2907 do_icmp6_neighbor = CONFIG_BOOLEAN_YES;
2908
2909 static RRDSET *st = NULL;
@@ -3024,18 +2939,7 @@ int do_net_inet6_icmp6_stats(int update_every, usec_t dt) {
2939 rrdset_done(st);
2940 }
2941
3027 - if (do_icmp6_types == CONFIG_BOOLEAN_YES || (do_icmp6_types == CONFIG_BOOLEAN_AUTO &&
3028 - (icmp6stat.icp6s_inhist[1] ||
3029 - icmp6stat.icp6s_inhist[128] ||
3030 - icmp6stat.icp6s_inhist[129] ||
3031 - icmp6stat.icp6s_inhist[136] ||
3032 - icmp6stat.icp6s_outhist[1] ||
3033 - icmp6stat.icp6s_outhist[128] ||
3034 - icmp6stat.icp6s_outhist[129] ||
3035 - icmp6stat.icp6s_outhist[133] ||
3036 - icmp6stat.icp6s_outhist[135] ||
3037 - icmp6stat.icp6s_outhist[136] ||
3038 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2942 + if (do_icmp6_types == CONFIG_BOOLEAN_YES || do_icmp6_types == CONFIG_BOOLEAN_AUTO) {
2943 do_icmp6_types = CONFIG_BOOLEAN_YES;
2944
2945 static RRDSET *st = NULL;