@cryptotaxi247 / netdata-1 / commits / 449ffd1aa

remove "ignore zero metrics" from proc network modules (#17776)

Ilya Mashchenko committed May 30, 2024 at 10:21 UTC 449ffd1aa99cf785184734cfc320dc139bbae099
5 files changed +73 -369
src/collectors/proc.plugin/proc_net_netstat.c
+50 -291
@@ -375,10 +375,7 @@ static void do_proc_net_snmp6(int update_every) {
375 break;
376 }
377
378 - if(do_ip6_bandwidth == CONFIG_BOOLEAN_YES || (do_ip6_bandwidth == CONFIG_BOOLEAN_AUTO &&
379 - (Ip6InOctets ||
380 - Ip6OutOctets ||
381 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
378 + if (do_ip6_bandwidth == CONFIG_BOOLEAN_YES || do_ip6_bandwidth == CONFIG_BOOLEAN_AUTO) {
379 do_ip6_bandwidth = CONFIG_BOOLEAN_YES;
380 static RRDSET *st = NULL;
381 static RRDDIM *rd_received = NULL,
@@ -409,12 +406,7 @@ static void do_proc_net_snmp6(int update_every) {
406 rrdset_done(st);
407 }
408
412 - if(do_ip6_packets == CONFIG_BOOLEAN_YES || (do_ip6_packets == CONFIG_BOOLEAN_AUTO &&
413 - (Ip6InReceives ||
414 - Ip6OutRequests ||
415 - Ip6InDelivers ||
416 - Ip6OutForwDatagrams ||
417 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
409 + if (do_ip6_packets == CONFIG_BOOLEAN_YES || do_ip6_packets == CONFIG_BOOLEAN_AUTO) {
410 do_ip6_packets = CONFIG_BOOLEAN_YES;
411 static RRDSET *st = NULL;
412 static RRDDIM *rd_received = NULL,
@@ -451,11 +443,7 @@ static void do_proc_net_snmp6(int update_every) {
443 rrdset_done(st);
444 }
445
454 - if(do_ip6_fragsout == CONFIG_BOOLEAN_YES || (do_ip6_fragsout == CONFIG_BOOLEAN_AUTO &&
455 - (Ip6FragOKs ||
456 - Ip6FragFails ||
457 - Ip6FragCreates ||
458 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
446 + if (do_ip6_fragsout == CONFIG_BOOLEAN_YES || do_ip6_fragsout == CONFIG_BOOLEAN_AUTO) {
447 do_ip6_fragsout = CONFIG_BOOLEAN_YES;
448 static RRDSET *st = NULL;
449 static RRDDIM *rd_ok = NULL,
@@ -490,12 +478,7 @@ static void do_proc_net_snmp6(int update_every) {
478 rrdset_done(st);
479 }
480
493 - if(do_ip6_fragsin == CONFIG_BOOLEAN_YES || (do_ip6_fragsin == CONFIG_BOOLEAN_AUTO &&
494 - (Ip6ReasmOKs ||
495 - Ip6ReasmFails ||
496 - Ip6ReasmTimeout ||
497 - Ip6ReasmReqds ||
498 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
481 + if (do_ip6_fragsin == CONFIG_BOOLEAN_YES || do_ip6_fragsin == CONFIG_BOOLEAN_AUTO) {
482 do_ip6_fragsin = CONFIG_BOOLEAN_YES;
483
484 static RRDSET *st = NULL;
@@ -533,16 +516,7 @@ static void do_proc_net_snmp6(int update_every) {
516 rrdset_done(st);
517 }
518
536 - if(do_ip6_errors == CONFIG_BOOLEAN_YES || (do_ip6_errors == CONFIG_BOOLEAN_AUTO &&
537 - (Ip6InDiscards ||
538 - Ip6OutDiscards ||
539 - Ip6InHdrErrors ||
540 - Ip6InAddrErrors ||
541 - Ip6InUnknownProtos ||
542 - Ip6InTooBigErrors ||
543 - Ip6InTruncatedPkts ||
544 - Ip6InNoRoutes ||
545 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
519 + if (do_ip6_errors == CONFIG_BOOLEAN_YES || do_ip6_errors == CONFIG_BOOLEAN_AUTO) {
520 do_ip6_errors = CONFIG_BOOLEAN_YES;
521 static RRDSET *st = NULL;
522 static RRDDIM *rd_InDiscards = NULL,
@@ -595,10 +569,7 @@ static void do_proc_net_snmp6(int update_every) {
569 rrdset_done(st);
570 }
571
598 - if(do_ip6_udp_packets == CONFIG_BOOLEAN_YES || (do_ip6_udp_packets == CONFIG_BOOLEAN_AUTO &&
599 - (Udp6InDatagrams ||
600 - Udp6OutDatagrams ||
601 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
572 + if (do_ip6_udp_packets == CONFIG_BOOLEAN_YES || do_ip6_udp_packets == CONFIG_BOOLEAN_AUTO) {
573 static RRDSET *st = NULL;
574 static RRDDIM *rd_received = NULL,
575 *rd_sent = NULL;
@@ -628,14 +599,7 @@ static void do_proc_net_snmp6(int update_every) {
599 rrdset_done(st);
600 }
601
631 - if(do_ip6_udp_errors == CONFIG_BOOLEAN_YES || (do_ip6_udp_errors == CONFIG_BOOLEAN_AUTO &&
632 - (Udp6InErrors ||
633 - Udp6NoPorts ||
634 - Udp6RcvbufErrors ||
635 - Udp6SndbufErrors ||
636 - Udp6InCsumErrors ||
637 - Udp6IgnoredMulti ||
638 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
602 + if (do_ip6_udp_errors == CONFIG_BOOLEAN_YES || do_ip6_udp_errors == CONFIG_BOOLEAN_AUTO) {
603 do_ip6_udp_errors = CONFIG_BOOLEAN_YES;
604 static RRDSET *st = NULL;
605 static RRDDIM *rd_RcvbufErrors = NULL,
@@ -679,10 +643,7 @@ static void do_proc_net_snmp6(int update_every) {
643 rrdset_done(st);
644 }
645
682 - if(do_ip6_udplite_packets == CONFIG_BOOLEAN_YES || (do_ip6_udplite_packets == CONFIG_BOOLEAN_AUTO &&
683 - (UdpLite6InDatagrams ||
684 - UdpLite6OutDatagrams ||
685 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
646 + if (do_ip6_udplite_packets == CONFIG_BOOLEAN_YES || do_ip6_udplite_packets == CONFIG_BOOLEAN_AUTO) {
647 static RRDSET *st = NULL;
648 static RRDDIM *rd_received = NULL,
649 *rd_sent = NULL;
@@ -712,14 +673,7 @@ static void do_proc_net_snmp6(int update_every) {
673 rrdset_done(st);
674 }
675
715 - if(do_ip6_udplite_errors == CONFIG_BOOLEAN_YES || (do_ip6_udplite_errors == CONFIG_BOOLEAN_AUTO &&
716 - (UdpLite6InErrors ||
717 - UdpLite6NoPorts ||
718 - UdpLite6RcvbufErrors ||
719 - UdpLite6SndbufErrors ||
720 - Udp6InCsumErrors ||
721 - UdpLite6InCsumErrors ||
722 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
676 + if (do_ip6_udplite_errors == CONFIG_BOOLEAN_YES || do_ip6_udplite_errors == CONFIG_BOOLEAN_AUTO) {
677 do_ip6_udplite_errors = CONFIG_BOOLEAN_YES;
678 static RRDSET *st = NULL;
679 static RRDDIM *rd_RcvbufErrors = NULL,
@@ -760,10 +714,7 @@ static void do_proc_net_snmp6(int update_every) {
714 rrdset_done(st);
715 }
716
763 - if(do_ip6_mcast == CONFIG_BOOLEAN_YES || (do_ip6_mcast == CONFIG_BOOLEAN_AUTO &&
764 - (Ip6OutMcastOctets ||
765 - Ip6InMcastOctets ||
766 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
717 + if (do_ip6_mcast == CONFIG_BOOLEAN_YES || do_ip6_mcast == CONFIG_BOOLEAN_AUTO) {
718 do_ip6_mcast = CONFIG_BOOLEAN_YES;
719 static RRDSET *st = NULL;
720 static RRDDIM *rd_Ip6InMcastOctets = NULL,
@@ -795,10 +746,7 @@ static void do_proc_net_snmp6(int update_every) {
746 rrdset_done(st);
747 }
748
798 - if(do_ip6_bcast == CONFIG_BOOLEAN_YES || (do_ip6_bcast == CONFIG_BOOLEAN_AUTO &&
799 - (Ip6OutBcastOctets ||
800 - Ip6InBcastOctets ||
801 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
749 + if (do_ip6_bcast == CONFIG_BOOLEAN_YES || do_ip6_bcast == CONFIG_BOOLEAN_AUTO) {
750 do_ip6_bcast = CONFIG_BOOLEAN_YES;
751 static RRDSET *st = NULL;
752 static RRDDIM *rd_Ip6InBcastOctets = NULL,
@@ -830,10 +778,7 @@ static void do_proc_net_snmp6(int update_every) {
778 rrdset_done(st);
779 }
780
833 - if(do_ip6_mcast_p == CONFIG_BOOLEAN_YES || (do_ip6_mcast_p == CONFIG_BOOLEAN_AUTO &&
834 - (Ip6OutMcastPkts ||
835 - Ip6InMcastPkts ||
836 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
781 + if (do_ip6_mcast_p == CONFIG_BOOLEAN_YES || do_ip6_mcast_p == CONFIG_BOOLEAN_AUTO) {
782 do_ip6_mcast_p = CONFIG_BOOLEAN_YES;
783 static RRDSET *st = NULL;
784 static RRDDIM *rd_Ip6InMcastPkts = NULL,
@@ -865,10 +810,7 @@ static void do_proc_net_snmp6(int update_every) {
810 rrdset_done(st);
811 }
812
868 - if(do_ip6_icmp == CONFIG_BOOLEAN_YES || (do_ip6_icmp == CONFIG_BOOLEAN_AUTO &&
869 - (Icmp6InMsgs ||
870 - Icmp6OutMsgs ||
871 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
813 + if (do_ip6_icmp == CONFIG_BOOLEAN_YES || do_ip6_icmp == CONFIG_BOOLEAN_AUTO) {
814 do_ip6_icmp = CONFIG_BOOLEAN_YES;
815 static RRDSET *st = NULL;
816 static RRDDIM *rd_Icmp6InMsgs = NULL,
@@ -899,10 +841,7 @@ static void do_proc_net_snmp6(int update_every) {
841 rrdset_done(st);
842 }
843
902 - if(do_ip6_icmp_redir == CONFIG_BOOLEAN_YES || (do_ip6_icmp_redir == CONFIG_BOOLEAN_AUTO &&
903 - (Icmp6InRedirects ||
904 - Icmp6OutRedirects ||
905 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
844 + if (do_ip6_icmp_redir == CONFIG_BOOLEAN_YES || do_ip6_icmp_redir == CONFIG_BOOLEAN_AUTO) {
845 do_ip6_icmp_redir = CONFIG_BOOLEAN_YES;
846 static RRDSET *st = NULL;
847 static RRDDIM *rd_Icmp6InRedirects = NULL,
@@ -933,19 +872,7 @@ static void do_proc_net_snmp6(int update_every) {
872 rrdset_done(st);
873 }
874
936 - if(do_ip6_icmp_errors == CONFIG_BOOLEAN_YES || (do_ip6_icmp_errors == CONFIG_BOOLEAN_AUTO &&
937 - (Icmp6InErrors ||
938 - Icmp6OutErrors ||
939 - Icmp6InCsumErrors ||
940 - Icmp6InDestUnreachs ||
941 - Icmp6InPktTooBigs ||
942 - Icmp6InTimeExcds ||
943 - Icmp6InParmProblems ||
944 - Icmp6OutDestUnreachs ||
945 - Icmp6OutPktTooBigs ||
946 - Icmp6OutTimeExcds ||
947 - Icmp6OutParmProblems ||
948 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
875 + if (do_ip6_icmp_errors == CONFIG_BOOLEAN_YES || do_ip6_icmp_errors == CONFIG_BOOLEAN_AUTO) {
876 do_ip6_icmp_errors = CONFIG_BOOLEAN_YES;
877 static RRDSET *st = NULL;
878 static RRDDIM *rd_InErrors = NULL,
@@ -1003,12 +930,7 @@ static void do_proc_net_snmp6(int update_every) {
930 rrdset_done(st);
931 }
932
1006 - if(do_ip6_icmp_echos == CONFIG_BOOLEAN_YES || (do_ip6_icmp_echos == CONFIG_BOOLEAN_AUTO &&
1007 - (Icmp6InEchos ||
1008 - Icmp6OutEchos ||
1009 - Icmp6InEchoReplies ||
1010 - Icmp6OutEchoReplies ||
1011 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
933 + if (do_ip6_icmp_echos == CONFIG_BOOLEAN_YES || do_ip6_icmp_echos == CONFIG_BOOLEAN_AUTO) {
934 do_ip6_icmp_echos = CONFIG_BOOLEAN_YES;
935 static RRDSET *st = NULL;
936 static RRDDIM *rd_InEchos = NULL,
@@ -1045,14 +967,7 @@ static void do_proc_net_snmp6(int update_every) {
967 rrdset_done(st);
968 }
969
1048 - if(do_ip6_icmp_groupmemb == CONFIG_BOOLEAN_YES || (do_ip6_icmp_groupmemb == CONFIG_BOOLEAN_AUTO &&
1049 - (Icmp6InGroupMembQueries ||
1050 - Icmp6OutGroupMembQueries ||
1051 - Icmp6InGroupMembResponses ||
1052 - Icmp6OutGroupMembResponses ||
1053 - Icmp6InGroupMembReductions ||
1054 - Icmp6OutGroupMembReductions ||
1055 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
970 + if (do_ip6_icmp_groupmemb == CONFIG_BOOLEAN_YES || do_ip6_icmp_groupmemb == CONFIG_BOOLEAN_AUTO) {
971 do_ip6_icmp_groupmemb = CONFIG_BOOLEAN_YES;
972 static RRDSET *st = NULL;
973 static RRDDIM *rd_InQueries = NULL,
@@ -1094,12 +1009,7 @@ static void do_proc_net_snmp6(int update_every) {
1009 rrdset_done(st);
1010 }
1011
1097 - if(do_ip6_icmp_router == CONFIG_BOOLEAN_YES || (do_ip6_icmp_router == CONFIG_BOOLEAN_AUTO &&
1098 - (Icmp6InRouterSolicits ||
1099 - Icmp6OutRouterSolicits ||
1100 - Icmp6InRouterAdvertisements ||
1101 - Icmp6OutRouterAdvertisements ||
1102 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1012 + if (do_ip6_icmp_router == CONFIG_BOOLEAN_YES || do_ip6_icmp_router == CONFIG_BOOLEAN_AUTO) {
1013 do_ip6_icmp_router = CONFIG_BOOLEAN_YES;
1014 static RRDSET *st = NULL;
1015 static RRDDIM *rd_InSolicits = NULL,
@@ -1136,12 +1046,7 @@ static void do_proc_net_snmp6(int update_every) {
1046 rrdset_done(st);
1047 }
1048
1139 - if(do_ip6_icmp_neighbor == CONFIG_BOOLEAN_YES || (do_ip6_icmp_neighbor == CONFIG_BOOLEAN_AUTO &&
1140 - (Icmp6InNeighborSolicits ||
1141 - Icmp6OutNeighborSolicits ||
1142 - Icmp6InNeighborAdvertisements ||
1143 - Icmp6OutNeighborAdvertisements ||
1144 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1049 + if (do_ip6_icmp_neighbor == CONFIG_BOOLEAN_YES || do_ip6_icmp_neighbor == CONFIG_BOOLEAN_AUTO) {
1050 do_ip6_icmp_neighbor = CONFIG_BOOLEAN_YES;
1051 static RRDSET *st = NULL;
1052 static RRDDIM *rd_InSolicits = NULL,
@@ -1178,10 +1083,7 @@ static void do_proc_net_snmp6(int update_every) {
1083 rrdset_done(st);
1084 }
1085
1181 - if(do_ip6_icmp_mldv2 == CONFIG_BOOLEAN_YES || (do_ip6_icmp_mldv2 == CONFIG_BOOLEAN_AUTO &&
1182 - (Icmp6InMLDv2Reports ||
1183 - Icmp6OutMLDv2Reports ||
1184 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1086 + if (do_ip6_icmp_mldv2 == CONFIG_BOOLEAN_YES || do_ip6_icmp_mldv2 == CONFIG_BOOLEAN_AUTO) {
1087 do_ip6_icmp_mldv2 = CONFIG_BOOLEAN_YES;
1088 static RRDSET *st = NULL;
1089 static RRDDIM *rd_InMLDv2Reports = NULL,
@@ -1212,18 +1114,7 @@ static void do_proc_net_snmp6(int update_every) {
1114 rrdset_done(st);
1115 }
1116
1215 - if(do_ip6_icmp_types == CONFIG_BOOLEAN_YES || (do_ip6_icmp_types == CONFIG_BOOLEAN_AUTO &&
1216 - (Icmp6InType1 ||
1217 - Icmp6InType128 ||
1218 - Icmp6InType129 ||
1219 - Icmp6InType136 ||
1220 - Icmp6OutType1 ||
1221 - Icmp6OutType128 ||
1222 - Icmp6OutType129 ||
1223 - Icmp6OutType133 ||
1224 - Icmp6OutType135 ||
1225 - Icmp6OutType143 ||
1226 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1117 + if (do_ip6_icmp_types == CONFIG_BOOLEAN_YES || do_ip6_icmp_types == CONFIG_BOOLEAN_AUTO) {
1118 do_ip6_icmp_types = CONFIG_BOOLEAN_YES;
1119 static RRDSET *st = NULL;
1120 static RRDDIM *rd_InType1 = NULL,
@@ -1278,9 +1169,7 @@ static void do_proc_net_snmp6(int update_every) {
1169 rrdset_done(st);
1170 }
1171
1281 - if (do_ip6_ect == CONFIG_BOOLEAN_YES ||
1282 - (do_ip6_ect == CONFIG_BOOLEAN_AUTO && (Ip6InNoECTPkts || Ip6InECT1Pkts || Ip6InECT0Pkts || Ip6InCEPkts ||
1283 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1172 + if (do_ip6_ect == CONFIG_BOOLEAN_YES || do_ip6_ect == CONFIG_BOOLEAN_AUTO) {
1173 do_ip6_ect = CONFIG_BOOLEAN_YES;
1174 static RRDSET *st = NULL;
1175 static RRDDIM *rd_InNoECTPkts = NULL, *rd_InECT1Pkts = NULL, *rd_InECT0Pkts = NULL, *rd_InCEPkts = NULL;
@@ -1841,10 +1730,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
1730
1731 // netstat IpExt charts
1732
1844 - if(do_bandwidth == CONFIG_BOOLEAN_YES || (do_bandwidth == CONFIG_BOOLEAN_AUTO &&
1845 - (ipext_InOctets ||
1846 - ipext_OutOctets ||
1847 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1733 + if (do_bandwidth == CONFIG_BOOLEAN_YES || do_bandwidth == CONFIG_BOOLEAN_AUTO) {
1734 do_bandwidth = CONFIG_BOOLEAN_YES;
1735 static RRDSET *st_system_ip = NULL;
1736 static RRDDIM *rd_in = NULL, *rd_out = NULL;
@@ -1874,10 +1760,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
1760 rrdset_done(st_system_ip);
1761 }
1762
1877 - if(do_mcast == CONFIG_BOOLEAN_YES || (do_mcast == CONFIG_BOOLEAN_AUTO &&
1878 - (ipext_InMcastOctets ||
1879 - ipext_OutMcastOctets ||
1880 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1763 + if (do_mcast == CONFIG_BOOLEAN_YES || do_mcast == CONFIG_BOOLEAN_AUTO) {
1764 do_mcast = CONFIG_BOOLEAN_YES;
1765 static RRDSET *st_ip_mcast = NULL;
1766 static RRDDIM *rd_in = NULL, *rd_out = NULL;
@@ -1912,10 +1795,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
1795
1796 // --------------------------------------------------------------------
1797
1915 - if(do_bcast == CONFIG_BOOLEAN_YES || (do_bcast == CONFIG_BOOLEAN_AUTO &&
1916 - (ipext_InBcastOctets ||
1917 - ipext_OutBcastOctets ||
1918 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1798 + if (do_bcast == CONFIG_BOOLEAN_YES || do_bcast == CONFIG_BOOLEAN_AUTO) {
1799 do_bcast = CONFIG_BOOLEAN_YES;
1800
1801 static RRDSET *st_ip_bcast = NULL;
@@ -1951,10 +1831,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
1831
1832 // --------------------------------------------------------------------
1833
1954 - if(do_mcast_p == CONFIG_BOOLEAN_YES || (do_mcast_p == CONFIG_BOOLEAN_AUTO &&
1955 - (ipext_InMcastPkts ||
1956 - ipext_OutMcastPkts ||
1957 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1834 + if (do_mcast_p == CONFIG_BOOLEAN_YES || do_mcast_p == CONFIG_BOOLEAN_AUTO) {
1835 do_mcast_p = CONFIG_BOOLEAN_YES;
1836
1837 static RRDSET *st_ip_mcastpkts = NULL;
@@ -1987,10 +1864,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
1864 rrdset_done(st_ip_mcastpkts);
1865 }
1866
1990 - if(do_bcast_p == CONFIG_BOOLEAN_YES || (do_bcast_p == CONFIG_BOOLEAN_AUTO &&
1991 - (ipext_InBcastPkts ||
1992 - ipext_OutBcastPkts ||
1993 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1867 + if (do_bcast_p == CONFIG_BOOLEAN_YES || do_bcast_p == CONFIG_BOOLEAN_AUTO) {
1868 do_bcast_p = CONFIG_BOOLEAN_YES;
1869
1870 static RRDSET *st_ip_bcastpkts = NULL;
@@ -2023,12 +1897,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
1897 rrdset_done(st_ip_bcastpkts);
1898 }
1899
2026 - if(do_ecn == CONFIG_BOOLEAN_YES || (do_ecn == CONFIG_BOOLEAN_AUTO &&
2027 - (ipext_InCEPkts ||
2028 - ipext_InECT0Pkts ||
2029 - ipext_InECT1Pkts ||
2030 - ipext_InNoECTPkts ||
2031 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1900 + if (do_ecn == CONFIG_BOOLEAN_YES || do_ecn == CONFIG_BOOLEAN_AUTO) {
1901 do_ecn = CONFIG_BOOLEAN_YES;
1902
1903 static RRDSET *st_ecnpkts = NULL;
@@ -2067,9 +1936,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
1936
1937 // netstat TcpExt charts
1938
2070 - if(do_tcpext_memory == CONFIG_BOOLEAN_YES || (do_tcpext_memory == CONFIG_BOOLEAN_AUTO &&
2071 - (tcpext_TCPMemoryPressures ||
2072 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1939 + if (do_tcpext_memory == CONFIG_BOOLEAN_YES || do_tcpext_memory == CONFIG_BOOLEAN_AUTO) {
1940 do_tcpext_memory = CONFIG_BOOLEAN_YES;
1941
1942 static RRDSET *st_tcpmemorypressures = NULL;
@@ -2098,14 +1965,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
1965 rrdset_done(st_tcpmemorypressures);
1966 }
1967
2101 - if(do_tcpext_connaborts == CONFIG_BOOLEAN_YES || (do_tcpext_connaborts == CONFIG_BOOLEAN_AUTO &&
2102 - (tcpext_TCPAbortOnData ||
2103 - tcpext_TCPAbortOnClose ||
2104 - tcpext_TCPAbortOnMemory ||
2105 - tcpext_TCPAbortOnTimeout ||
2106 - tcpext_TCPAbortOnLinger ||
2107 - tcpext_TCPAbortFailed ||
2108 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
1968 + if (do_tcpext_connaborts == CONFIG_BOOLEAN_YES || do_tcpext_connaborts == CONFIG_BOOLEAN_AUTO) {
1969 do_tcpext_connaborts = CONFIG_BOOLEAN_YES;
1970
1971 static RRDSET *st_tcpconnaborts = NULL;
@@ -2144,12 +2004,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2004 rrdset_done(st_tcpconnaborts);
2005 }
2006
2147 - if(do_tcpext_reorder == CONFIG_BOOLEAN_YES || (do_tcpext_reorder == CONFIG_BOOLEAN_AUTO &&
2148 - (tcpext_TCPRenoReorder ||
2149 - tcpext_TCPFACKReorder ||
2150 - tcpext_TCPSACKReorder ||
2151 - tcpext_TCPTSReorder ||
2152 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2007 + if (do_tcpext_reorder == CONFIG_BOOLEAN_YES || do_tcpext_reorder == CONFIG_BOOLEAN_AUTO) {
2008 do_tcpext_reorder = CONFIG_BOOLEAN_YES;
2009
2010 static RRDSET *st_tcpreorders = NULL;
@@ -2186,11 +2041,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2041
2042 // --------------------------------------------------------------------
2043
2189 - if(do_tcpext_ofo == CONFIG_BOOLEAN_YES || (do_tcpext_ofo == CONFIG_BOOLEAN_AUTO &&
2190 - (tcpext_TCPOFOQueue ||
2191 - tcpext_TCPOFODrop ||
2192 - tcpext_TCPOFOMerge ||
2193 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2044 + if (do_tcpext_ofo == CONFIG_BOOLEAN_YES || do_tcpext_ofo == CONFIG_BOOLEAN_AUTO) {
2045 do_tcpext_ofo = CONFIG_BOOLEAN_YES;
2046
2047 static RRDSET *st_ip_tcpofo = NULL;
@@ -2226,11 +2077,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2077 rrdset_done(st_ip_tcpofo);
2078 }
2079
2229 - if(do_tcpext_syscookies == CONFIG_BOOLEAN_YES || (do_tcpext_syscookies == CONFIG_BOOLEAN_AUTO &&
2230 - (tcpext_SyncookiesSent ||
2231 - tcpext_SyncookiesRecv ||
2232 - tcpext_SyncookiesFailed ||
2233 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2080 + if (do_tcpext_syscookies == CONFIG_BOOLEAN_YES || do_tcpext_syscookies == CONFIG_BOOLEAN_AUTO) {
2081 do_tcpext_syscookies = CONFIG_BOOLEAN_YES;
2082
2083 static RRDSET *st_syncookies = NULL;
@@ -2264,10 +2111,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2111 rrdset_done(st_syncookies);
2112 }
2113
2267 - if(do_tcpext_syn_queue == CONFIG_BOOLEAN_YES || (do_tcpext_syn_queue == CONFIG_BOOLEAN_AUTO &&
2268 - (tcpext_TCPReqQFullDrop ||
2269 - tcpext_TCPReqQFullDoCookies ||
2270 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2114 + if (do_tcpext_syn_queue == CONFIG_BOOLEAN_YES || do_tcpext_syn_queue == CONFIG_BOOLEAN_AUTO) {
2115 do_tcpext_syn_queue = CONFIG_BOOLEAN_YES;
2116
2117 static RRDSET *st_syn_queue = NULL;
@@ -2301,10 +2145,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2145 rrdset_done(st_syn_queue);
2146 }
2147
2304 - if(do_tcpext_accept_queue == CONFIG_BOOLEAN_YES || (do_tcpext_accept_queue == CONFIG_BOOLEAN_AUTO &&
2305 - (tcpext_ListenOverflows ||
2306 - tcpext_ListenDrops ||
2307 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2148 + if (do_tcpext_accept_queue == CONFIG_BOOLEAN_YES || do_tcpext_accept_queue == CONFIG_BOOLEAN_AUTO) {
2149 do_tcpext_accept_queue = CONFIG_BOOLEAN_YES;
2150
2151 static RRDSET *st_accept_queue = NULL;
@@ -2336,15 +2177,10 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2177 rrddim_set_by_pointer(st_accept_queue, rd_drops, tcpext_ListenDrops);
2178 rrdset_done(st_accept_queue);
2179 }
2339 -
2180 +
2181 // snmp Ip charts
2182
2342 - if(do_ip_packets == CONFIG_BOOLEAN_YES || (do_ip_packets == CONFIG_BOOLEAN_AUTO &&
2343 - (snmp_root.ip_OutRequests ||
2344 - snmp_root.ip_InReceives ||
2345 - snmp_root.ip_ForwDatagrams ||
2346 - snmp_root.ip_InDelivers ||
2347 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2183 + if (do_ip_packets == CONFIG_BOOLEAN_YES || do_ip_packets == CONFIG_BOOLEAN_AUTO) {
2184 do_ip_packets = CONFIG_BOOLEAN_YES;
2185
2186 static RRDSET *st = NULL;
@@ -2382,11 +2218,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2218 rrdset_done(st);
2219 }
2220
2385 - if(do_ip_fragsout == CONFIG_BOOLEAN_YES || (do_ip_fragsout == CONFIG_BOOLEAN_AUTO &&
2386 - (snmp_root.ip_FragOKs ||
2387 - snmp_root.ip_FragFails ||
2388 - snmp_root.ip_FragCreates ||
2389 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2221 + if (do_ip_fragsout == CONFIG_BOOLEAN_YES || do_ip_fragsout == CONFIG_BOOLEAN_AUTO) {
2222 do_ip_fragsout = CONFIG_BOOLEAN_YES;
2223
2224 static RRDSET *st = NULL;
@@ -2422,11 +2254,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2254 rrdset_done(st);
2255 }
2256
2425 - if(do_ip_fragsin == CONFIG_BOOLEAN_YES || (do_ip_fragsin == CONFIG_BOOLEAN_AUTO &&
2426 - (snmp_root.ip_ReasmOKs ||
2427 - snmp_root.ip_ReasmFails ||
2428 - snmp_root.ip_ReasmReqds ||
2429 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2257 + if (do_ip_fragsin == CONFIG_BOOLEAN_YES || do_ip_fragsin == CONFIG_BOOLEAN_AUTO) {
2258 do_ip_fragsin = CONFIG_BOOLEAN_YES;
2259
2260 static RRDSET *st = NULL;
@@ -2462,14 +2290,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2290 rrdset_done(st);
2291 }
2292
2465 - if(do_ip_errors == CONFIG_BOOLEAN_YES || (do_ip_errors == CONFIG_BOOLEAN_AUTO &&
2466 - (snmp_root.ip_InDiscards ||
2467 - snmp_root.ip_OutDiscards ||
2468 - snmp_root.ip_InHdrErrors ||
2469 - snmp_root.ip_InAddrErrors ||
2470 - snmp_root.ip_InUnknownProtos ||
2471 - snmp_root.ip_OutNoRoutes ||
2472 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2293 + if (do_ip_errors == CONFIG_BOOLEAN_YES || do_ip_errors == CONFIG_BOOLEAN_AUTO) {
2294 do_ip_errors = CONFIG_BOOLEAN_YES;
2295
2296 static RRDSET *st = NULL;
@@ -2527,13 +2348,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2348
2349 // snmp Icmp charts
2350
2530 - if(do_icmp_packets == CONFIG_BOOLEAN_YES || (do_icmp_packets == CONFIG_BOOLEAN_AUTO &&
2531 - (snmp_root.icmp_InMsgs ||
2532 - snmp_root.icmp_OutMsgs ||
2533 - snmp_root.icmp_InErrors ||
2534 - snmp_root.icmp_OutErrors ||
2535 - snmp_root.icmp_InCsumErrors ||
2536 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2351 + if (do_icmp_packets == CONFIG_BOOLEAN_YES || do_icmp_packets == CONFIG_BOOLEAN_AUTO) {
2352 do_icmp_packets = CONFIG_BOOLEAN_YES;
2353
2354 {
@@ -2602,28 +2417,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2417
2418 // snmp IcmpMsg charts
2419
2605 - if(do_icmpmsg == CONFIG_BOOLEAN_YES || (do_icmpmsg == CONFIG_BOOLEAN_AUTO &&
2606 - (snmp_root.icmpmsg_InEchoReps ||
2607 - snmp_root.icmpmsg_OutEchoReps ||
2608 - snmp_root.icmpmsg_InDestUnreachs ||
2609 - snmp_root.icmpmsg_OutDestUnreachs ||
2610 - snmp_root.icmpmsg_InRedirects ||
2611 - snmp_root.icmpmsg_OutRedirects ||
2612 - snmp_root.icmpmsg_InEchos ||
2613 - snmp_root.icmpmsg_OutEchos ||
2614 - snmp_root.icmpmsg_InRouterAdvert ||
2615 - snmp_root.icmpmsg_OutRouterAdvert ||
2616 - snmp_root.icmpmsg_InRouterSelect ||
2617 - snmp_root.icmpmsg_OutRouterSelect ||
2618 - snmp_root.icmpmsg_InTimeExcds ||
2619 - snmp_root.icmpmsg_OutTimeExcds ||
2620 - snmp_root.icmpmsg_InParmProbs ||
2621 - snmp_root.icmpmsg_OutParmProbs ||
2622 - snmp_root.icmpmsg_InTimestamps ||
2623 - snmp_root.icmpmsg_OutTimestamps ||
2624 - snmp_root.icmpmsg_InTimestampReps ||
2625 - snmp_root.icmpmsg_OutTimestampReps ||
2626 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2420 + if (do_icmpmsg == CONFIG_BOOLEAN_YES || do_icmpmsg == CONFIG_BOOLEAN_AUTO) {
2421 do_icmpmsg = CONFIG_BOOLEAN_YES;
2422
2423 static RRDSET *st = NULL;
@@ -2716,9 +2510,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2510 rrdvar_host_variable_set(localhost, tcp_max_connections_var, snmp_root.tcp_MaxConn);
2511
2512 // see http://net-snmp.sourceforge.net/docs/mibs/tcp.html
2719 - if(do_tcp_sockets == CONFIG_BOOLEAN_YES || (do_tcp_sockets == CONFIG_BOOLEAN_AUTO &&
2720 - (snmp_root.tcp_CurrEstab ||
2721 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2513 + if (do_tcp_sockets == CONFIG_BOOLEAN_YES || do_tcp_sockets == CONFIG_BOOLEAN_AUTO) {
2514 do_tcp_sockets = CONFIG_BOOLEAN_YES;
2515
2516 static RRDSET *st = NULL;
@@ -2747,10 +2539,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2539 rrdset_done(st);
2540 }
2541
2750 - if(do_tcp_packets == CONFIG_BOOLEAN_YES || (do_tcp_packets == CONFIG_BOOLEAN_AUTO &&
2751 - (snmp_root.tcp_InSegs ||
2752 - snmp_root.tcp_OutSegs ||
2753 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2542 + if (do_tcp_packets == CONFIG_BOOLEAN_YES || do_tcp_packets == CONFIG_BOOLEAN_AUTO) {
2543 do_tcp_packets = CONFIG_BOOLEAN_YES;
2544
2545 static RRDSET *st = NULL;
@@ -2784,11 +2573,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2573
2574 // --------------------------------------------------------------------
2575
2787 - if(do_tcp_errors == CONFIG_BOOLEAN_YES || (do_tcp_errors == CONFIG_BOOLEAN_AUTO &&
2788 - (snmp_root.tcp_InErrs ||
2789 - snmp_root.tcp_InCsumErrors ||
2790 - snmp_root.tcp_RetransSegs ||
2791 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2576 + if (do_tcp_errors == CONFIG_BOOLEAN_YES || do_tcp_errors == CONFIG_BOOLEAN_AUTO) {
2577 do_tcp_errors = CONFIG_BOOLEAN_YES;
2578
2579 static RRDSET *st = NULL;
@@ -2824,10 +2609,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2609 rrdset_done(st);
2610 }
2611
2827 - if(do_tcp_opens == CONFIG_BOOLEAN_YES || (do_tcp_opens == CONFIG_BOOLEAN_AUTO &&
2828 - (snmp_root.tcp_ActiveOpens ||
2829 - snmp_root.tcp_PassiveOpens ||
2830 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2612 + if (do_tcp_opens == CONFIG_BOOLEAN_YES || do_tcp_opens == CONFIG_BOOLEAN_AUTO) {
2613 do_tcp_opens = CONFIG_BOOLEAN_YES;
2614
2615 static RRDSET *st = NULL;
@@ -2860,11 +2642,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2642 rrdset_done(st);
2643 }
2644
2863 - if(do_tcp_handshake == CONFIG_BOOLEAN_YES || (do_tcp_handshake == CONFIG_BOOLEAN_AUTO &&
2864 - (snmp_root.tcp_EstabResets ||
2865 - snmp_root.tcp_OutRsts ||
2866 - snmp_root.tcp_AttemptFails ||
2867 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2645 + if (do_tcp_handshake == CONFIG_BOOLEAN_YES || do_tcp_handshake == CONFIG_BOOLEAN_AUTO) {
2646 do_tcp_handshake = CONFIG_BOOLEAN_YES;
2647
2648 static RRDSET *st = NULL;
@@ -2906,10 +2684,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2684 // snmp Udp charts
2685
2686 // see http://net-snmp.sourceforge.net/docs/mibs/udp.html
2909 - if(do_udp_packets == CONFIG_BOOLEAN_YES || (do_udp_packets == CONFIG_BOOLEAN_AUTO &&
2910 - (snmp_root.udp_InDatagrams ||
2911 - snmp_root.udp_OutDatagrams ||
2912 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2687 + if (do_udp_packets == CONFIG_BOOLEAN_YES || do_udp_packets == CONFIG_BOOLEAN_AUTO) {
2688 do_udp_packets = CONFIG_BOOLEAN_YES;
2689
2690 static RRDSET *st = NULL;
@@ -2943,14 +2718,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2718
2719 // --------------------------------------------------------------------
2720
2946 - if(do_udp_errors == CONFIG_BOOLEAN_YES || (do_udp_errors == CONFIG_BOOLEAN_AUTO &&
2947 - (snmp_root.udp_InErrors ||
2948 - snmp_root.udp_NoPorts ||
2949 - snmp_root.udp_RcvbufErrors ||
2950 - snmp_root.udp_SndbufErrors ||
2951 - snmp_root.udp_InCsumErrors ||
2952 - snmp_root.udp_IgnoredMulti ||
2953 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2721 + if (do_udp_errors == CONFIG_BOOLEAN_YES || do_udp_errors == CONFIG_BOOLEAN_AUTO) {
2722 do_udp_errors = CONFIG_BOOLEAN_YES;
2723
2724 static RRDSET *st = NULL;
@@ -2997,16 +2765,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
2765
2766 // snmp UdpLite charts
2767
3000 - if(do_udplite_packets == CONFIG_BOOLEAN_YES || (do_udplite_packets == CONFIG_BOOLEAN_AUTO &&
3001 - (snmp_root.udplite_InDatagrams ||
3002 - snmp_root.udplite_OutDatagrams ||
3003 - snmp_root.udplite_NoPorts ||
3004 - snmp_root.udplite_InErrors ||
3005 - snmp_root.udplite_InCsumErrors ||
3006 - snmp_root.udplite_RcvbufErrors ||
3007 - snmp_root.udplite_SndbufErrors ||
3008 - snmp_root.udplite_IgnoredMulti ||
3009 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
2768 + if (do_udplite_packets == CONFIG_BOOLEAN_YES || do_udplite_packets == CONFIG_BOOLEAN_AUTO) {
2769 do_udplite_packets = CONFIG_BOOLEAN_YES;
2770
2771 {
src/collectors/proc.plugin/proc_net_sctp_snmp.c
+6 -28
@@ -124,8 +124,7 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
124
125 // --------------------------------------------------------------------
126
127 - if(do_associations == CONFIG_BOOLEAN_YES || (do_associations == CONFIG_BOOLEAN_AUTO &&
128 - (SctpCurrEstab || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
127 + if (do_associations == CONFIG_BOOLEAN_YES || do_associations == CONFIG_BOOLEAN_AUTO) {
128 do_associations = CONFIG_BOOLEAN_YES;
129 static RRDSET *st = NULL;
130 static RRDDIM *rd_established = NULL;
@@ -155,12 +154,7 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
154
155 // --------------------------------------------------------------------
156
158 - if(do_transitions == CONFIG_BOOLEAN_YES || (do_transitions == CONFIG_BOOLEAN_AUTO &&
159 - (SctpActiveEstabs ||
160 - SctpPassiveEstabs ||
161 - SctpAborteds ||
162 - SctpShutdowns ||
163 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
157 + if (do_transitions == CONFIG_BOOLEAN_YES || do_transitions == CONFIG_BOOLEAN_AUTO) {
158 do_transitions = CONFIG_BOOLEAN_YES;
159 static RRDSET *st = NULL;
160 static RRDDIM *rd_active = NULL,
@@ -199,10 +193,7 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
193
194 // --------------------------------------------------------------------
195
202 - if(do_packets == CONFIG_BOOLEAN_YES || (do_packets == CONFIG_BOOLEAN_AUTO &&
203 - (SctpInSCTPPacks ||
204 - SctpOutSCTPPacks ||
205 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
196 + if (do_packets == CONFIG_BOOLEAN_YES || do_packets == CONFIG_BOOLEAN_AUTO) {
197 do_packets = CONFIG_BOOLEAN_YES;
198 static RRDSET *st = NULL;
199 static RRDDIM *rd_received = NULL,
@@ -236,10 +227,7 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
227
228 // --------------------------------------------------------------------
229
239 - if(do_packet_errors == CONFIG_BOOLEAN_YES || (do_packet_errors == CONFIG_BOOLEAN_AUTO &&
240 - (SctpOutOfBlues ||
241 - SctpChecksumErrors ||
242 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
230 + if (do_packet_errors == CONFIG_BOOLEAN_YES || do_packet_errors == CONFIG_BOOLEAN_AUTO) {
231 do_packet_errors = CONFIG_BOOLEAN_YES;
232 static RRDSET *st = NULL;
233 static RRDDIM *rd_invalid = NULL,
@@ -273,10 +261,7 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
261
262 // --------------------------------------------------------------------
263
276 - if(do_fragmentation == CONFIG_BOOLEAN_YES || (do_fragmentation == CONFIG_BOOLEAN_AUTO &&
277 - (SctpFragUsrMsgs ||
278 - SctpReasmUsrMsgs ||
279 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
264 + if (do_fragmentation == CONFIG_BOOLEAN_YES || do_fragmentation == CONFIG_BOOLEAN_AUTO) {
265 do_fragmentation = CONFIG_BOOLEAN_YES;
266
267 static RRDSET *st = NULL;
@@ -310,14 +295,7 @@ int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
295
296 // --------------------------------------------------------------------
297
313 - if(do_chunk_types == CONFIG_BOOLEAN_YES || (do_chunk_types == CONFIG_BOOLEAN_AUTO &&
314 - (SctpInCtrlChunks ||
315 - SctpInOrderChunks ||
316 - SctpInUnorderChunks ||
317 - SctpOutCtrlChunks ||
318 - SctpOutOrderChunks ||
319 - SctpOutUnorderChunks ||
320 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
298 + if (do_chunk_types == CONFIG_BOOLEAN_YES || do_chunk_types == CONFIG_BOOLEAN_AUTO) {
299 do_chunk_types = CONFIG_BOOLEAN_YES;
300 static RRDSET *st = NULL;
301 static RRDDIM
src/collectors/proc.plugin/proc_net_sockstat.c
+9 -29
@@ -218,9 +218,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
218
219 // ------------------------------------------------------------------------
220
221 - if(do_sockets == CONFIG_BOOLEAN_YES || (do_sockets == CONFIG_BOOLEAN_AUTO &&
222 - (sockstat_root.sockets_used ||
223 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
221 + if (do_sockets == CONFIG_BOOLEAN_YES || do_sockets == CONFIG_BOOLEAN_AUTO) {
222 do_sockets = CONFIG_BOOLEAN_YES;
223
224 static RRDSET *st = NULL;
@@ -251,12 +249,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
249
250 // ------------------------------------------------------------------------
251
254 - if(do_tcp_sockets == CONFIG_BOOLEAN_YES || (do_tcp_sockets == CONFIG_BOOLEAN_AUTO &&
255 - (sockstat_root.tcp_inuse ||
256 - sockstat_root.tcp_orphan ||
257 - sockstat_root.tcp_tw ||
258 - sockstat_root.tcp_alloc ||
259 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
252 + if (do_tcp_sockets == CONFIG_BOOLEAN_YES || do_tcp_sockets == CONFIG_BOOLEAN_AUTO) {
253 do_tcp_sockets = CONFIG_BOOLEAN_YES;
254
255 static RRDSET *st = NULL;
@@ -296,8 +289,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
289
290 // ------------------------------------------------------------------------
291
299 - if(do_tcp_mem == CONFIG_BOOLEAN_YES || (do_tcp_mem == CONFIG_BOOLEAN_AUTO &&
300 - (sockstat_root.tcp_mem || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
292 + if (do_tcp_mem == CONFIG_BOOLEAN_YES || do_tcp_mem == CONFIG_BOOLEAN_AUTO) {
293 do_tcp_mem = CONFIG_BOOLEAN_YES;
294
295 static RRDSET *st = NULL;
@@ -328,9 +320,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
320
321 // ------------------------------------------------------------------------
322
331 - if(do_udp_sockets == CONFIG_BOOLEAN_YES || (do_udp_sockets == CONFIG_BOOLEAN_AUTO &&
332 - (sockstat_root.udp_inuse ||
333 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
323 + if (do_udp_sockets == CONFIG_BOOLEAN_YES || do_udp_sockets == CONFIG_BOOLEAN_AUTO) {
324 do_udp_sockets = CONFIG_BOOLEAN_YES;
325
326 static RRDSET *st = NULL;
@@ -361,9 +351,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
351
352 // ------------------------------------------------------------------------
353
364 - if(do_udp_mem == CONFIG_BOOLEAN_YES || (do_udp_mem == CONFIG_BOOLEAN_AUTO &&
365 - (sockstat_root.udp_mem ||
366 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
354 + if (do_udp_mem == CONFIG_BOOLEAN_YES || do_udp_mem == CONFIG_BOOLEAN_AUTO) {
355 do_udp_mem = CONFIG_BOOLEAN_YES;
356
357 static RRDSET *st = NULL;
@@ -394,9 +382,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
382
383 // ------------------------------------------------------------------------
384
397 - if(do_udplite_sockets == CONFIG_BOOLEAN_YES || (do_udplite_sockets == CONFIG_BOOLEAN_AUTO &&
398 - (sockstat_root.udplite_inuse ||
399 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
385 + if (do_udplite_sockets == CONFIG_BOOLEAN_YES || do_udplite_sockets == CONFIG_BOOLEAN_AUTO) {
386 do_udplite_sockets = CONFIG_BOOLEAN_YES;
387
388 static RRDSET *st = NULL;
@@ -427,9 +413,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
413
414 // ------------------------------------------------------------------------
415
430 - if(do_raw_sockets == CONFIG_BOOLEAN_YES || (do_raw_sockets == CONFIG_BOOLEAN_AUTO &&
431 - (sockstat_root.raw_inuse ||
432 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
416 + if (do_raw_sockets == CONFIG_BOOLEAN_YES || do_raw_sockets == CONFIG_BOOLEAN_AUTO) {
417 do_raw_sockets = CONFIG_BOOLEAN_YES;
418
419 static RRDSET *st = NULL;
@@ -460,9 +444,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
444
445 // ------------------------------------------------------------------------
446
463 - if(do_frag_sockets == CONFIG_BOOLEAN_YES || (do_frag_sockets == CONFIG_BOOLEAN_AUTO &&
464 - (sockstat_root.frag_inuse ||
465 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
447 + if (do_frag_sockets == CONFIG_BOOLEAN_YES || do_frag_sockets == CONFIG_BOOLEAN_AUTO) {
448 do_frag_sockets = CONFIG_BOOLEAN_YES;
449
450 static RRDSET *st = NULL;
@@ -493,9 +475,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
475
476 // ------------------------------------------------------------------------
477
496 - if(do_frag_mem == CONFIG_BOOLEAN_YES || (do_frag_mem == CONFIG_BOOLEAN_AUTO &&
497 - (sockstat_root.frag_memory ||
498 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
478 + if (do_frag_mem == CONFIG_BOOLEAN_YES || do_frag_mem == CONFIG_BOOLEAN_AUTO) {
479 do_frag_mem = CONFIG_BOOLEAN_YES;
480
481 static RRDSET *st = NULL;
src/collectors/proc.plugin/proc_net_sockstat6.c
+5 -15
@@ -111,9 +111,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
111
112 // ------------------------------------------------------------------------
113
114 - if(do_tcp_sockets == CONFIG_BOOLEAN_YES || (do_tcp_sockets == CONFIG_BOOLEAN_AUTO &&
115 - (sockstat6_root.tcp6_inuse ||
116 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
114 + if (do_tcp_sockets == CONFIG_BOOLEAN_YES || do_tcp_sockets == CONFIG_BOOLEAN_AUTO) {
115 do_tcp_sockets = CONFIG_BOOLEAN_YES;
116
117 static RRDSET *st = NULL;
@@ -144,9 +142,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
142
143 // ------------------------------------------------------------------------
144
147 - if(do_udp_sockets == CONFIG_BOOLEAN_YES || (do_udp_sockets == CONFIG_BOOLEAN_AUTO &&
148 - (sockstat6_root.udp6_inuse ||
149 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
145 + if (do_udp_sockets == CONFIG_BOOLEAN_YES || do_udp_sockets == CONFIG_BOOLEAN_AUTO) {
146 do_udp_sockets = CONFIG_BOOLEAN_YES;
147
148 static RRDSET *st = NULL;
@@ -177,9 +173,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
173
174 // ------------------------------------------------------------------------
175
180 - if(do_udplite_sockets == CONFIG_BOOLEAN_YES || (do_udplite_sockets == CONFIG_BOOLEAN_AUTO &&
181 - (sockstat6_root.udplite6_inuse ||
182 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
176 + if (do_udplite_sockets == CONFIG_BOOLEAN_YES || do_udplite_sockets == CONFIG_BOOLEAN_AUTO) {
177 do_udplite_sockets = CONFIG_BOOLEAN_YES;
178
179 static RRDSET *st = NULL;
@@ -210,9 +204,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
204
205 // ------------------------------------------------------------------------
206
213 - if(do_raw_sockets == CONFIG_BOOLEAN_YES || (do_raw_sockets == CONFIG_BOOLEAN_AUTO &&
214 - (sockstat6_root.raw6_inuse ||
215 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
207 + if (do_raw_sockets == CONFIG_BOOLEAN_YES || do_raw_sockets == CONFIG_BOOLEAN_AUTO) {
208 do_raw_sockets = CONFIG_BOOLEAN_YES;
209
210 static RRDSET *st = NULL;
@@ -243,9 +235,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
235
236 // ------------------------------------------------------------------------
237
246 - if(do_frag_sockets == CONFIG_BOOLEAN_YES || (do_frag_sockets == CONFIG_BOOLEAN_AUTO &&
247 - (sockstat6_root.frag6_inuse ||
248 - netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
238 + if (do_frag_sockets == CONFIG_BOOLEAN_YES || do_frag_sockets == CONFIG_BOOLEAN_AUTO) {
239 do_frag_sockets = CONFIG_BOOLEAN_YES;
240
241 static RRDSET *st = NULL;
src/collectors/proc.plugin/proc_net_stat_synproxy.c
+3 -6
@@ -57,8 +57,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
57
58 // --------------------------------------------------------------------
59
60 - if(do_syns == CONFIG_BOOLEAN_YES || (do_syns == CONFIG_BOOLEAN_AUTO &&
61 - (events || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
60 + if (do_syns == CONFIG_BOOLEAN_YES || do_syns == CONFIG_BOOLEAN_AUTO) {
61 do_syns = CONFIG_BOOLEAN_YES;
62
63 static RRDSET *st = NULL;
@@ -87,8 +86,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
86
87 // --------------------------------------------------------------------
88
90 - if(do_reopened == CONFIG_BOOLEAN_YES || (do_reopened == CONFIG_BOOLEAN_AUTO &&
91 - (events || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
89 + if (do_reopened == CONFIG_BOOLEAN_YES || do_reopened == CONFIG_BOOLEAN_AUTO) {
90 do_reopened = CONFIG_BOOLEAN_YES;
91
92 static RRDSET *st = NULL;
@@ -117,8 +115,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
115
116 // --------------------------------------------------------------------
117
120 - if(do_cookies == CONFIG_BOOLEAN_YES || (do_cookies == CONFIG_BOOLEAN_AUTO &&
121 - (events || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
118 + if (do_cookies == CONFIG_BOOLEAN_YES || do_cookies == CONFIG_BOOLEAN_AUTO) {
119 do_cookies = CONFIG_BOOLEAN_YES;
120
121 static RRDSET *st = NULL;