@cryptotaxi247 / netdata-1 / commits / a440a2468

tcp syn and accept queue charts and alarms (#4281)

* tcp syn and accept queue charts and alarms; fixes #3234 * tcp syn and accept queue converted to auto * updated configs.signatures * enable 1m_ipv4_tcp_accept_queue_drops alarm * /proc/net/netstat refers to the whole networking stack * updated configs.signatures

Costa Tsaousis committed Sep 27, 2018 at 20:37 UTC a440a24688f2258bba3ac2e7bbd57c112581893d
14 files changed +439 -248
conf.d/health.d/tcp_listen.conf
+62 -8
@@ -1,28 +1,82 @@
1 +#
2 +# There are two queues involved when incoming TCP connections are handled
3 +# (both at the kernel):
4 +#
5 +# SYN queue
6 +# The SYN queue tracks TCP handshakes until connections are fully established.
7 +# It overflows when too many incoming TCP connection requests hang in the
8 +# half-open state and the server is not configured to fall back to SYN cookies.
9 +# Overflows are usually caused by SYN flood DoS attacks (i.e. someone sends
10 +# lots of SYN packets and never completes the handshakes).
11 +#
12 +# Accept queue
13 +# The accept queue holds fully established TCP connections waiting to be handled
14 +# by the listening application. It overflows when the server application fails
15 +# to accept new connections at the rate they are coming in.
16 +#
17 +#
18 # -----------------------------------------------------------------------------
2 -# tcp listen sockets issues
19 +# tcp accept queue (at the kernel)
20
4 - alarm: 1m_ipv4_tcp_listen_overflows
5 - on: ipv4.tcplistenissues
6 - os: linux freebsd
21 + alarm: 1m_tcp_accept_queue_overflows
22 + on: ip.tcp_accept_queue
23 + os: linux
24 hosts: *
25 lookup: sum -60s unaligned absolute of ListenOverflows
26 units: overflows
27 every: 10s
28 crit: $this > 0
29 delay: up 0 down 5m multiplier 1.5 max 1h
13 - info: the number of TCP listen socket overflows during the last minute
30 + info: the number of times the TCP accept queue of the kernel overflown, during the last minute
31 to: sysadmin
32
16 - alarm: 1m_ipv4_tcp_listen_drops
17 - on: ipv4.tcplistenissues
33 +# THIS IS TOO GENERIC
34 +# CHECK: https://github.com/netdata/netdata/issues/3234#issuecomment-423935842
35 + alarm: 1m_tcp_accept_queue_drops
36 + on: ip.tcp_accept_queue
37 os: linux
38 hosts: *
39 lookup: sum -60s unaligned absolute of ListenDrops
40 units: drops
41 every: 10s
42 +# warn: $this > 0
43 + crit: $this > (($status == $CRITICAL) ? (0) : (150))
44 + delay: up 0 down 5m multiplier 1.5 max 1h
45 + info: the number of times the TCP accept queue of the kernel dropped packets, during the last minute (includes bogus packets received)
46 + to: sysadmin
47 +
48 +
49 +# -----------------------------------------------------------------------------
50 +# tcp SYN queue (at the kernel)
51 +
52 +# When the SYN queue is full, either TcpExtTCPReqQFullDoCookies or
53 +# TcpExtTCPReqQFullDrop is incremented, depending on whether SYN cookies are
54 +# enabled or not. In both cases this probably indicates a SYN flood attack,
55 +# so i guess a notification should be sent.
56 +
57 + alarm: 1m_tcp_syn_queue_drops
58 + on: ip.tcp_syn_queue
59 + os: linux
60 + hosts: *
61 + lookup: sum -60s unaligned absolute of TCPReqQFullDrop
62 + units: drops
63 + every: 10s
64 + warn: $this > 0
65 + crit: $this > (($status == $CRITICAL) ? (0) : (60))
66 + delay: up 0 down 5m multiplier 1.5 max 1h
67 + info: the number of times the TCP SYN queue of the kernel was full and dropped packets, during the last minute
68 + to: sysadmin
69 +
70 + alarm: 1m_tcp_syn_queue_cookies
71 + on: ip.tcp_syn_queue
72 + os: linux
73 + hosts: *
74 + lookup: sum -60s unaligned absolute of TCPReqQFullDoCookies
75 + units: cookies
76 + every: 10s
77 warn: $this > 0
78 crit: $this > (($status == $CRITICAL) ? (0) : (60))
79 delay: up 0 down 5m multiplier 1.5 max 1h
26 - info: the number of TCP listen socket drops during the last minute (includes bogus packets received)
80 + info: the number of times the TCP SYN queue of the kernel was full and sent SYN cookies, during the last minute
81 to: sysadmin
82
configs.signatures
+6
@@ -35,6 +35,7 @@ declare -A configs_signatures=(
35 ['084ee72d64760f2641b0720e79c922f3']='health.d/cpu.conf'
36 ['0856124b1eecf01681b4fdf4e21efb3f']='health.d/net.conf'
37 ['0862e7cf3d32ef48795702c6aefd27e0']='python.d/fail2ban.conf'
38 + ['08de9ae0765a4161abe24c09e47b3454']='python.d/go_expvar.conf'
39 ['08ff5218f938fc48e09e718821169d14']='health.d/redis.conf'
40 ['091572888425bc3b8b559c3c53367ec7']='apps_groups.conf'
41 ['09225283977a6584f8063016091cc4f2']='health.d/tcp_resets.conf'
@@ -239,6 +240,7 @@ declare -A configs_signatures=(
240 ['5050b5963599f13ad5dc0263fa39a906']='python.d/fail2ban.conf'
241 ['508771d8e4611a058991a1bc11039dea']='health.d/disks.conf'
242 ['5120492fa26be3749192607f62dc05f8']='health.d/mdstat.conf'
243 + ['51cb420bffed106ad9a710d64ee9ef0b']='health.d/tcp_listen.conf'
244 ['5271cf9fc0fd10915a9759add70f7d78']='health.d/swap.conf'
245 ['5278ebbae19c60db600f0a119cb3664e']='python.d/apache.conf'
246 ['52d230aff57850a5aacc4e0420fcd8f5']='python.d.conf'
@@ -318,6 +320,7 @@ declare -A configs_signatures=(
320 ['6aa4507f86657383917a0407f2a9cc0d']='python.d.conf'
321 ['6acad8ce5c33e642742825db0eb9bb56']='python.d/web_log.conf'
322 ['6b39de5d85db45115db236347a6896d4']='health.d/named.conf'
323 + ['6b598533309e08d71023e46801d45d7e']='apps_groups.conf'
324 ['6bb278bd9e171c4cb5c0fe639231288b']='python.d/web_log.conf'
325 ['6bf0de6e3b251b765b10a71d8c5c319d']='python.d/apache.conf'
326 ['6c9f2f0abe49a6f1a69db052ebcef1bf']='python.d/elasticsearch.conf'
@@ -427,6 +430,7 @@ declare -A configs_signatures=(
430 ['8f520e787d995943e61a777c826bddf7']='python.d/litespeed.conf'
431 ['8f7b734ea0f89abf8acbb47c50234477']='health.d/web_log.conf'
432 ['8fd472a854b0996327e8ed3562161182']='health_alarm_notify.conf'
433 + ['8fd9796492424780932b128edc62c1a4']='health.d/tcp_listen.conf'
434 ['919911d13901d60a7580f5dfd7fc87bb']='health.d/ram.conf'
435 ['91c377e7d26a1120cfbbd488332f0398']='python.d/dns_query_time.conf'
436 ['91c757ef6be3abdb86906d9dbb9c217a']='fping.conf'
@@ -553,6 +557,7 @@ declare -A configs_signatures=(
557 ['b8969be5b3ceb4a99477937119bd4323']='python.d.conf'
558 ['b8aff60806fb6829a4e72a824e655375']='health.d/beanstalkd.conf'
559 ['b8b87574fd496a66ede884c5336493bd']='python.d/phpfpm.conf'
560 + ['b8ca1449d142b7f1cd202d875d400882']='health.d/apcupsd.conf'
561 ['b915126262d08aa9da81de539a58a3fb']='python.d/redis.conf'
562 ['ba11ea2d2f632b2de4b1224bcdc54f07']='python.d/smartd_log.conf'
563 ['bb51112d01ff20053196a57632df8962']='apps_groups.conf'
@@ -650,6 +655,7 @@ declare -A configs_signatures=(
655 ['dc0d2b96378f290eec3fcf98b89ad824']='python.d/cpufreq.conf'
656 ['dc9c2a66778623a759706c14c3d91983']='health.d/net.conf'
657 ['dd220677c42c487549952048ee1f7750']='python.d/postgres.conf'
658 + ['dd221c29dfb7c5586fc906748aa7c831']='health.d/tcp_listen.conf'
659 ['dd7764507804a2296bfd091a58ad4ad7']='health.d/memcached.conf'
660 ['dd8254ef74509a3e38cb2838e30f7e63']='health.d/disks.conf'
661 ['ddda2bb1c88be03b637d3285406f7910']='health.d/named.conf'
src/appconfig.h
+5
@@ -1,5 +1,7 @@
1 // SPDX-License-Identifier: GPL-3.0+
2
3 +#include "common.h"
4 +
5 #ifndef NETDATA_CONFIG_H
6 #define NETDATA_CONFIG_H 1
7
@@ -31,7 +33,10 @@ extern struct config
33
34 #define CONFIG_BOOLEAN_NO 0
35 #define CONFIG_BOOLEAN_YES 1
36 +
37 +#ifndef CONFIG_BOOLEAN_AUTO
38 #define CONFIG_BOOLEAN_AUTO 2
39 +#endif
40
41 extern int appconfig_load(struct config *root, char *filename, int overwrite_used);
42
src/common.h
+42 -26
@@ -145,7 +145,8 @@
145 // - for each FAMILY +100
146 // - for each CHART +10
147
148 -#define NETDATA_CHART_PRIO_SYSTEM_IPV4 501
148 +#define NETDATA_CHART_PRIO_SYSTEM_IP 501
149 +#define NETDATA_CHART_PRIO_SYSTEM_IPV6 502
150
151 // Memory Section - 1xxx
152 #define NETDATA_CHART_PRIO_MEM_SYSTEM 1000
@@ -160,44 +161,59 @@
161 #define NETDATA_CHART_PRIO_MEM_HW 1500
162
163
163 -// IPv4
164 -
165 -#define NETDATA_CHART_PRIO_IPV4 3000
166 -#define NETDATA_CHART_PRIO_IPV4_SOCKETS 3000
167 -#define NETDATA_CHART_PRIO_IPV4_PACKETS 3050
168 -#define NETDATA_CHART_PRIO_IPV4_ERRORS 3100
169 -
170 -#define NETDATA_CHART_PRIO_IPV4_ICMP 3150
171 -
172 -#define NETDATA_CHART_PRIO_IPV4_TCP 3200
173 -#define NETDATA_CHART_PRIO_IPV4_TCP_MEM 3290
164 +// IP
165
175 -#define NETDATA_CHART_PRIO_IPV4_UDP 3300
176 -#define NETDATA_CHART_PRIO_IPV4_UDP_MEM 3390
166 +#define NETDATA_CHART_PRIO_IP 4000
167 +#define NETDATA_CHART_PRIO_IP_ERRORS 4100
168 +#define NETDATA_CHART_PRIO_IP_TCP 4200
169 +#define NETDATA_CHART_PRIO_IP_TCP_MEM 4290
170 +#define NETDATA_CHART_PRIO_IP_BCAST 4500
171 +#define NETDATA_CHART_PRIO_IP_MCAST 4600
172 +#define NETDATA_CHART_PRIO_IP_ECN 4700
173
178 -#define NETDATA_CHART_PRIO_IPV4_UDPLITE 3400
174
180 -#define NETDATA_CHART_PRIO_IPV4_RAW 3450
181 -
182 -#define NETDATA_CHART_PRIO_IPV4_FRAGMENTS 3460
183 -#define NETDATA_CHART_PRIO_IPV4_FRAGMENTS_MEM 3470
175 +// IPv4
176
185 -#define NETDATA_CHART_PRIO_IPV4_BCAST 3500
186 -#define NETDATA_CHART_PRIO_IPV4_MCAST 3600
187 -#define NETDATA_CHART_PRIO_IPV4_ECN 3700
177 +#define NETDATA_CHART_PRIO_IPV4 5100
178 +#define NETDATA_CHART_PRIO_IPV4_SOCKETS 5100
179 +#define NETDATA_CHART_PRIO_IPV4_PACKETS 5130
180 +#define NETDATA_CHART_PRIO_IPV4_ERRORS 5150
181 +#define NETDATA_CHART_PRIO_IPV4_ICMP 5170
182 +#define NETDATA_CHART_PRIO_IPV4_TCP 5200
183 +#define NETDATA_CHART_PRIO_IPV4_TCP_MEM 5290
184 +#define NETDATA_CHART_PRIO_IPV4_UDP 5300
185 +#define NETDATA_CHART_PRIO_IPV4_UDP_MEM 5390
186 +#define NETDATA_CHART_PRIO_IPV4_UDPLITE 5400
187 +#define NETDATA_CHART_PRIO_IPV4_RAW 5450
188 +#define NETDATA_CHART_PRIO_IPV4_FRAGMENTS 5460
189 +#define NETDATA_CHART_PRIO_IPV4_FRAGMENTS_MEM 5470
190
191 // IPv6
192
191 -#define NETDATA_CHART_PRIO_IPV6 3500
193 +#define NETDATA_CHART_PRIO_IPV6 6200
194 +#define NETDATA_CHART_PRIO_IPV6_PACKETS 6200
195 +#define NETDATA_CHART_PRIO_IPV6_ERRORS 6300
196 +#define NETDATA_CHART_PRIO_IPV6_FRAGMENTS 6400
197 +#define NETDATA_CHART_PRIO_IPV6_TCP 6500
198 +#define NETDATA_CHART_PRIO_IPV6_UDP 6600
199 +#define NETDATA_CHART_PRIO_IPV6_UDP_ERRORS 6610
200 +#define NETDATA_CHART_PRIO_IPV6_UDPLITE 6700
201 +#define NETDATA_CHART_PRIO_IPV6_UDPLITE_ERRORS 6710
202 +#define NETDATA_CHART_PRIO_IPV6_RAW 6800
203 +#define NETDATA_CHART_PRIO_IPV6_BCAST 6840
204 +#define NETDATA_CHART_PRIO_IPV6_MCAST 6850
205 +#define NETDATA_CHART_PRIO_IPV6_ICMP 6900
206 +
207
208 // SCTP
209
195 -#define NETDATA_CHART_PRIO_SCTP 3600
210 +#define NETDATA_CHART_PRIO_SCTP 7000
211 +
212
213 // Netfilter
214
199 -#define NETDATA_CHART_PRIO_NETFILTER 3700
200 -#define NETDATA_CHART_PRIO_SYNPROXY 3750
215 +#define NETDATA_CHART_PRIO_NETFILTER 8700
216 +#define NETDATA_CHART_PRIO_SYNPROXY 8750
217
218
219 // ----------------------------------------------------------------------------
src/plugin_nfacct.c
+7 -7
@@ -306,7 +306,7 @@ static void nfstat_send_metrics() {
306 , "connections/s"
307 , "nfacct"
308 , NULL
309 - , 3001
309 + , NETDATA_CHART_PRIO_NETFILTER + 1
310 , nfstat_root.update_every
311 , RRDSET_TYPE_LINE
312 );
@@ -342,7 +342,7 @@ static void nfstat_send_metrics() {
342 , "changes/s"
343 , "nfacct"
344 , NULL
345 - , 3002
345 + , NETDATA_CHART_PRIO_NETFILTER + 2
346 , nfstat_root.update_every
347 , RRDSET_TYPE_LINE
348 );
@@ -379,7 +379,7 @@ static void nfstat_send_metrics() {
379 , "searches/s"
380 , "nfacct"
381 , NULL
382 - , 3010
382 + , NETDATA_CHART_PRIO_NETFILTER + 10
383 , nfstat_root.update_every
384 , RRDSET_TYPE_LINE
385 );
@@ -416,7 +416,7 @@ static void nfstat_send_metrics() {
416 , "events/s"
417 , "nfacct"
418 , NULL
419 - , 3005
419 + , NETDATA_CHART_PRIO_NETFILTER + 5
420 , nfstat_root.update_every
421 , RRDSET_TYPE_LINE
422 );
@@ -455,7 +455,7 @@ static void nfstat_send_metrics() {
455 , "expectations/s"
456 , "nfacct"
457 , NULL
458 - , 3003
458 + , NETDATA_CHART_PRIO_NETFILTER + 3
459 , nfstat_root.update_every
460 , RRDSET_TYPE_LINE
461 );
@@ -675,7 +675,7 @@ static void nfacct_send_metrics() {
675 , "packets/s"
676 , "nfacct"
677 , NULL
678 - , 3206
678 + , NETDATA_CHART_PRIO_NETFILTER + 206
679 , nfacct_root.update_every
680 , RRDSET_TYPE_STACKED
681 );
@@ -718,7 +718,7 @@ static void nfacct_send_metrics() {
718 , "kilobytes/s"
719 , "nfacct"
720 , NULL
721 - , 3207
721 + , NETDATA_CHART_PRIO_NETFILTER + 207
722 , nfacct_root.update_every
723 , RRDSET_TYPE_STACKED
724 );
src/plugin_proc.h
-1
@@ -37,7 +37,6 @@ extern int get_numa_node_count(void);
37
38 // metrics that need to be shared among data collectors
39 extern unsigned long long tcpext_TCPSynRetrans;
40 -extern unsigned long long tcpext_TCPReqQFullDrop;
40
41 // netdev renames
42 extern void netdev_rename_device_add(const char *host_device, const char *container_device, const char *container_name);
src/proc_net_netstat.c
+193 -143
@@ -2,8 +2,9 @@
2
3 #include "common.h"
4
5 +#define RRD_TYPE_NET_NETSTAT "ip"
6 +
7 unsigned long long tcpext_TCPSynRetrans = 0;
6 -unsigned long long tcpext_TCPReqQFullDrop = 0;
8
9 static void parse_line_pair(procfile *ff, ARL_BASE *base, size_t header_line, size_t values_line) {
10 size_t hwords = procfile_linewords(ff, header_line);
@@ -26,7 +27,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
27
28 static int do_bandwidth = -1, do_inerrors = -1, do_mcast = -1, do_bcast = -1, do_mcast_p = -1, do_bcast_p = -1, do_ecn = -1, \
29 do_tcpext_reorder = -1, do_tcpext_syscookies = -1, do_tcpext_ofo = -1, do_tcpext_connaborts = -1, do_tcpext_memory = -1,
29 - do_tcpext_listen = -1;
30 + do_tcpext_syn_queue = -1, do_tcpext_accept_queue = -1;
31
32 static uint32_t hash_ipext = 0, hash_tcpext = 0;
33 static procfile *ff = NULL;
@@ -35,61 +36,61 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
36 static ARL_BASE *arl_ipext = NULL;
37
38 // --------------------------------------------------------------------
38 - // IPv4
39 + // IP
40
40 - // IPv4 bandwidth
41 + // IP bandwidth
42 static unsigned long long ipext_InOctets = 0;
43 static unsigned long long ipext_OutOctets = 0;
44
44 - // IPv4 input errors
45 + // IP input errors
46 static unsigned long long ipext_InNoRoutes = 0;
47 static unsigned long long ipext_InTruncatedPkts = 0;
48 static unsigned long long ipext_InCsumErrors = 0;
49
49 - // IPv4 multicast bandwidth
50 + // IP multicast bandwidth
51 static unsigned long long ipext_InMcastOctets = 0;
52 static unsigned long long ipext_OutMcastOctets = 0;
53
53 - // IPv4 multicast packets
54 + // IP multicast packets
55 static unsigned long long ipext_InMcastPkts = 0;
56 static unsigned long long ipext_OutMcastPkts = 0;
57
57 - // IPv4 broadcast bandwidth
58 + // IP broadcast bandwidth
59 static unsigned long long ipext_InBcastOctets = 0;
60 static unsigned long long ipext_OutBcastOctets = 0;
61
61 - // IPv4 broadcast packets
62 + // IP broadcast packets
63 static unsigned long long ipext_InBcastPkts = 0;
64 static unsigned long long ipext_OutBcastPkts = 0;
65
65 - // IPv4 ECN
66 + // IP ECN
67 static unsigned long long ipext_InNoECTPkts = 0;
68 static unsigned long long ipext_InECT1Pkts = 0;
69 static unsigned long long ipext_InECT0Pkts = 0;
70 static unsigned long long ipext_InCEPkts = 0;
71
72 // --------------------------------------------------------------------
72 - // IPv4 TCP
73 + // IP TCP
74
74 - // IPv4 TCP Reordering
75 + // IP TCP Reordering
76 static unsigned long long tcpext_TCPRenoReorder = 0;
77 static unsigned long long tcpext_TCPFACKReorder = 0;
78 static unsigned long long tcpext_TCPSACKReorder = 0;
79 static unsigned long long tcpext_TCPTSReorder = 0;
80
80 - // IPv4 TCP SYN Cookies
81 + // IP TCP SYN Cookies
82 static unsigned long long tcpext_SyncookiesSent = 0;
83 static unsigned long long tcpext_SyncookiesRecv = 0;
84 static unsigned long long tcpext_SyncookiesFailed = 0;
85
85 - // IPv4 TCP Out Of Order Queue
86 + // IP TCP Out Of Order Queue
87 // http://www.spinics.net/lists/netdev/msg204696.html
88 static unsigned long long tcpext_TCPOFOQueue = 0; // Number of packets queued in OFO queue
89 static unsigned long long tcpext_TCPOFODrop = 0; // Number of packets meant to be queued in OFO but dropped because socket rcvbuf limit hit.
90 static unsigned long long tcpext_TCPOFOMerge = 0; // Number of packets in OFO that were merged with other packets.
91 static unsigned long long tcpext_OfoPruned = 0; // packets dropped from out-of-order queue because of socket buffer overrun
92
92 - // IPv4 TCP connection resets
93 + // IP TCP connection resets
94 // https://github.com/ecki/net-tools/blob/bd8bceaed2311651710331a7f8990c3e31be9840/statistics.c
95 static unsigned long long tcpext_TCPAbortOnData = 0; // connections reset due to unexpected data
96 static unsigned long long tcpext_TCPAbortOnClose = 0; // connections reset due to early user close
@@ -102,10 +103,12 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
103 static unsigned long long tcpext_ListenOverflows = 0; // times the listen queue of a socket overflowed
104 static unsigned long long tcpext_ListenDrops = 0; // SYNs to LISTEN sockets ignored
105
105 - // IPv4 TCP memory pressures
106 + // IP TCP memory pressures
107 static unsigned long long tcpext_TCPMemoryPressures = 0;
108
108 - // shared tcpext_TCPReqQFullDrop
109 + static unsigned long long tcpext_TCPReqQFullDrop = 0;
110 + static unsigned long long tcpext_TCPReqQFullDoCookies = 0;
111 +
112 // shared: tcpext_TCPSynRetrans
113
114
@@ -126,13 +129,15 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
129 do_tcpext_ofo = config_get_boolean_ondemand("plugin:proc:/proc/net/netstat", "TCP out-of-order queue", CONFIG_BOOLEAN_AUTO);
130 do_tcpext_connaborts = config_get_boolean_ondemand("plugin:proc:/proc/net/netstat", "TCP connection aborts", CONFIG_BOOLEAN_AUTO);
131 do_tcpext_memory = config_get_boolean_ondemand("plugin:proc:/proc/net/netstat", "TCP memory pressures", CONFIG_BOOLEAN_AUTO);
129 - do_tcpext_listen = config_get_boolean_ondemand("plugin:proc:/proc/net/netstat", "TCP listen issues", CONFIG_BOOLEAN_AUTO);
132 +
133 + do_tcpext_syn_queue = config_get_boolean_ondemand("plugin:proc:/proc/net/netstat", "TCP SYN queue", CONFIG_BOOLEAN_AUTO);
134 + do_tcpext_accept_queue = config_get_boolean_ondemand("plugin:proc:/proc/net/netstat", "TCP accept queue", CONFIG_BOOLEAN_AUTO);
135
136 arl_ipext = arl_create("netstat/ipext", NULL, 60);
137 arl_tcpext = arl_create("netstat/tcpext", NULL, 60);
138
139 // --------------------------------------------------------------------
135 - // IPv4
140 + // IP
141
142 if(do_bandwidth != CONFIG_BOOLEAN_NO) {
143 arl_expect(arl_ipext, "InOctets", &ipext_InOctets);
@@ -173,7 +178,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
178 }
179
180 // --------------------------------------------------------------------
176 - // IPv4 TCP
181 + // IP TCP
182
183 if(do_tcpext_reorder != CONFIG_BOOLEAN_NO) {
184 arl_expect(arl_tcpext, "TCPFACKReorder", &tcpext_TCPFACKReorder);
@@ -208,14 +213,18 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
213 arl_expect(arl_tcpext, "TCPMemoryPressures", &tcpext_TCPMemoryPressures);
214 }
215
211 - if(do_tcpext_listen != CONFIG_BOOLEAN_NO) {
216 + if(do_tcpext_accept_queue != CONFIG_BOOLEAN_NO) {
217 arl_expect(arl_tcpext, "ListenOverflows", &tcpext_ListenOverflows);
218 arl_expect(arl_tcpext, "ListenDrops", &tcpext_ListenDrops);
219 }
220
221 + if(do_tcpext_syn_queue != CONFIG_BOOLEAN_NO) {
222 + arl_expect(arl_tcpext, "TCPReqQFullDrop", &tcpext_TCPReqQFullDrop);
223 + arl_expect(arl_tcpext, "TCPReqQFullDoCookies", &tcpext_TCPReqQFullDoCookies);
224 + }
225 +
226 // shared metrics
227 arl_expect(arl_tcpext, "TCPSynRetrans", &tcpext_TCPSynRetrans);
218 - arl_expect(arl_tcpext, "TCPReqQFullDrop", &tcpext_TCPReqQFullDrop);
228 }
229
230 if(unlikely(!ff)) {
@@ -253,111 +262,111 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
262
263 if(do_bandwidth == CONFIG_BOOLEAN_YES || (do_bandwidth == CONFIG_BOOLEAN_AUTO && (ipext_InOctets || ipext_OutOctets))) {
264 do_bandwidth = CONFIG_BOOLEAN_YES;
256 - static RRDSET *st_system_ipv4 = NULL;
265 + static RRDSET *st_system_ip = NULL;
266 static RRDDIM *rd_in = NULL, *rd_out = NULL;
267
259 - if(unlikely(!st_system_ipv4)) {
260 - st_system_ipv4 = rrdset_create_localhost(
268 + if(unlikely(!st_system_ip)) {
269 + st_system_ip = rrdset_create_localhost(
270 "system"
262 - , "ipv4"
271 + , RRD_TYPE_NET_NETSTAT
272 , NULL
273 , "network"
274 , NULL
266 - , "IPv4 Bandwidth"
275 + , "IP Bandwidth"
276 , "kilobits/s"
277 , "proc"
278 , "net/netstat"
270 - , NETDATA_CHART_PRIO_SYSTEM_IPV4
279 + , NETDATA_CHART_PRIO_SYSTEM_IP
280 , update_every
281 , RRDSET_TYPE_AREA
282 );
283
275 - rd_in = rrddim_add(st_system_ipv4, "InOctets", "received", 8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
276 - rd_out = rrddim_add(st_system_ipv4, "OutOctets", "sent", -8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
284 + rd_in = rrddim_add(st_system_ip, "InOctets", "received", 8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
285 + rd_out = rrddim_add(st_system_ip, "OutOctets", "sent", -8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
286 }
287 else
279 - rrdset_next(st_system_ipv4);
288 + rrdset_next(st_system_ip);
289
281 - rrddim_set_by_pointer(st_system_ipv4, rd_in, ipext_InOctets);
282 - rrddim_set_by_pointer(st_system_ipv4, rd_out, ipext_OutOctets);
290 + rrddim_set_by_pointer(st_system_ip, rd_in, ipext_InOctets);
291 + rrddim_set_by_pointer(st_system_ip, rd_out, ipext_OutOctets);
292
284 - rrdset_done(st_system_ipv4);
293 + rrdset_done(st_system_ip);
294 }
295
296 // --------------------------------------------------------------------
297
298 if(do_inerrors == CONFIG_BOOLEAN_YES || (do_inerrors == CONFIG_BOOLEAN_AUTO && (ipext_InNoRoutes || ipext_InTruncatedPkts))) {
299 do_inerrors = CONFIG_BOOLEAN_YES;
291 - static RRDSET *st_ipv4_inerrors = NULL;
300 + static RRDSET *st_ip_inerrors = NULL;
301 static RRDDIM *rd_noroutes = NULL, *rd_truncated = NULL, *rd_checksum = NULL;
302
294 - if(unlikely(!st_ipv4_inerrors)) {
295 - st_ipv4_inerrors = rrdset_create_localhost(
296 - "ipv4"
303 + if(unlikely(!st_ip_inerrors)) {
304 + st_ip_inerrors = rrdset_create_localhost(
305 + RRD_TYPE_NET_NETSTAT
306 , "inerrors"
307 , NULL
308 , "errors"
309 , NULL
301 - , "IPv4 Input Errors"
310 + , "IP Input Errors"
311 , "packets/s"
312 , "proc"
313 , "net/netstat"
305 - , NETDATA_CHART_PRIO_IPV4_ERRORS
314 + , NETDATA_CHART_PRIO_IP_ERRORS
315 , update_every
316 , RRDSET_TYPE_LINE
317 );
318
310 - rrdset_flag_set(st_ipv4_inerrors, RRDSET_FLAG_DETAIL);
319 + rrdset_flag_set(st_ip_inerrors, RRDSET_FLAG_DETAIL);
320
312 - rd_noroutes = rrddim_add(st_ipv4_inerrors, "InNoRoutes", "noroutes", 1, 1, RRD_ALGORITHM_INCREMENTAL);
313 - rd_truncated = rrddim_add(st_ipv4_inerrors, "InTruncatedPkts", "truncated", 1, 1, RRD_ALGORITHM_INCREMENTAL);
314 - rd_checksum = rrddim_add(st_ipv4_inerrors, "InCsumErrors", "checksum", 1, 1, RRD_ALGORITHM_INCREMENTAL);
321 + rd_noroutes = rrddim_add(st_ip_inerrors, "InNoRoutes", "noroutes", 1, 1, RRD_ALGORITHM_INCREMENTAL);
322 + rd_truncated = rrddim_add(st_ip_inerrors, "InTruncatedPkts", "truncated", 1, 1, RRD_ALGORITHM_INCREMENTAL);
323 + rd_checksum = rrddim_add(st_ip_inerrors, "InCsumErrors", "checksum", 1, 1, RRD_ALGORITHM_INCREMENTAL);
324 }
325 else
317 - rrdset_next(st_ipv4_inerrors);
326 + rrdset_next(st_ip_inerrors);
327
319 - rrddim_set_by_pointer(st_ipv4_inerrors, rd_noroutes, ipext_InNoRoutes);
320 - rrddim_set_by_pointer(st_ipv4_inerrors, rd_truncated, ipext_InTruncatedPkts);
321 - rrddim_set_by_pointer(st_ipv4_inerrors, rd_checksum, ipext_InCsumErrors);
328 + rrddim_set_by_pointer(st_ip_inerrors, rd_noroutes, ipext_InNoRoutes);
329 + rrddim_set_by_pointer(st_ip_inerrors, rd_truncated, ipext_InTruncatedPkts);
330 + rrddim_set_by_pointer(st_ip_inerrors, rd_checksum, ipext_InCsumErrors);
331
323 - rrdset_done(st_ipv4_inerrors);
332 + rrdset_done(st_ip_inerrors);
333 }
334
335 // --------------------------------------------------------------------
336
337 if(do_mcast == CONFIG_BOOLEAN_YES || (do_mcast == CONFIG_BOOLEAN_AUTO && (ipext_InMcastOctets || ipext_OutMcastOctets))) {
338 do_mcast = CONFIG_BOOLEAN_YES;
330 - static RRDSET *st_ipv4_mcast = NULL;
339 + static RRDSET *st_ip_mcast = NULL;
340 static RRDDIM *rd_in = NULL, *rd_out = NULL;
341
333 - if(unlikely(!st_ipv4_mcast)) {
334 - st_ipv4_mcast = rrdset_create_localhost(
335 - "ipv4"
342 + if(unlikely(!st_ip_mcast)) {
343 + st_ip_mcast = rrdset_create_localhost(
344 + RRD_TYPE_NET_NETSTAT
345 , "mcast"
346 , NULL
347 , "multicast"
348 , NULL
340 - , "IPv4 Multicast Bandwidth"
349 + , "IP Multicast Bandwidth"
350 , "kilobits/s"
351 , "proc"
352 , "net/netstat"
344 - , NETDATA_CHART_PRIO_IPV4_MCAST
353 + , NETDATA_CHART_PRIO_IP_MCAST
354 , update_every
355 , RRDSET_TYPE_AREA
356 );
357
349 - rrdset_flag_set(st_ipv4_mcast, RRDSET_FLAG_DETAIL);
358 + rrdset_flag_set(st_ip_mcast, RRDSET_FLAG_DETAIL);
359
351 - rd_in = rrddim_add(st_ipv4_mcast, "InMcastOctets", "received", 8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
352 - rd_out = rrddim_add(st_ipv4_mcast, "OutMcastOctets", "sent", -8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
360 + rd_in = rrddim_add(st_ip_mcast, "InMcastOctets", "received", 8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
361 + rd_out = rrddim_add(st_ip_mcast, "OutMcastOctets", "sent", -8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
362 }
363 else
355 - rrdset_next(st_ipv4_mcast);
364 + rrdset_next(st_ip_mcast);
365
357 - rrddim_set_by_pointer(st_ipv4_mcast, rd_in, ipext_InMcastOctets);
358 - rrddim_set_by_pointer(st_ipv4_mcast, rd_out, ipext_OutMcastOctets);
366 + rrddim_set_by_pointer(st_ip_mcast, rd_in, ipext_InMcastOctets);
367 + rrddim_set_by_pointer(st_ip_mcast, rd_out, ipext_OutMcastOctets);
368
360 - rrdset_done(st_ipv4_mcast);
369 + rrdset_done(st_ip_mcast);
370 }
371
372 // --------------------------------------------------------------------
@@ -365,37 +374,37 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
374 if(do_bcast == CONFIG_BOOLEAN_YES || (do_bcast == CONFIG_BOOLEAN_AUTO && (ipext_InBcastOctets || ipext_OutBcastOctets))) {
375 do_bcast = CONFIG_BOOLEAN_YES;
376
368 - static RRDSET *st_ipv4_bcast = NULL;
377 + static RRDSET *st_ip_bcast = NULL;
378 static RRDDIM *rd_in = NULL, *rd_out = NULL;
379
371 - if(unlikely(!st_ipv4_bcast)) {
372 - st_ipv4_bcast = rrdset_create_localhost(
373 - "ipv4"
380 + if(unlikely(!st_ip_bcast)) {
381 + st_ip_bcast = rrdset_create_localhost(
382 + RRD_TYPE_NET_NETSTAT
383 , "bcast"
384 , NULL
385 , "broadcast"
386 , NULL
378 - , "IPv4 Broadcast Bandwidth"
387 + , "IP Broadcast Bandwidth"
388 , "kilobits/s"
389 , "proc"
390 , "net/netstat"
382 - , NETDATA_CHART_PRIO_IPV4_BCAST
391 + , NETDATA_CHART_PRIO_IP_BCAST
392 , update_every
393 , RRDSET_TYPE_AREA
394 );
395
387 - rrdset_flag_set(st_ipv4_bcast, RRDSET_FLAG_DETAIL);
396 + rrdset_flag_set(st_ip_bcast, RRDSET_FLAG_DETAIL);
397
389 - rd_in = rrddim_add(st_ipv4_bcast, "InBcastOctets", "received", 8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
390 - rd_out = rrddim_add(st_ipv4_bcast, "OutBcastOctets", "sent", -8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
398 + rd_in = rrddim_add(st_ip_bcast, "InBcastOctets", "received", 8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
399 + rd_out = rrddim_add(st_ip_bcast, "OutBcastOctets", "sent", -8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL);
400 }
401 else
393 - rrdset_next(st_ipv4_bcast);
402 + rrdset_next(st_ip_bcast);
403
395 - rrddim_set_by_pointer(st_ipv4_bcast, rd_in, ipext_InBcastOctets);
396 - rrddim_set_by_pointer(st_ipv4_bcast, rd_out, ipext_OutBcastOctets);
404 + rrddim_set_by_pointer(st_ip_bcast, rd_in, ipext_InBcastOctets);
405 + rrddim_set_by_pointer(st_ip_bcast, rd_out, ipext_OutBcastOctets);
406
398 - rrdset_done(st_ipv4_bcast);
407 + rrdset_done(st_ip_bcast);
408 }
409
410 // --------------------------------------------------------------------
@@ -403,36 +412,36 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
412 if(do_mcast_p == CONFIG_BOOLEAN_YES || (do_mcast_p == CONFIG_BOOLEAN_AUTO && (ipext_InMcastPkts || ipext_OutMcastPkts))) {
413 do_mcast_p = CONFIG_BOOLEAN_YES;
414
406 - static RRDSET *st_ipv4_mcastpkts = NULL;
415 + static RRDSET *st_ip_mcastpkts = NULL;
416 static RRDDIM *rd_in = NULL, *rd_out = NULL;
417
409 - if(unlikely(!st_ipv4_mcastpkts)) {
410 - st_ipv4_mcastpkts = rrdset_create_localhost(
411 - "ipv4"
418 + if(unlikely(!st_ip_mcastpkts)) {
419 + st_ip_mcastpkts = rrdset_create_localhost(
420 + RRD_TYPE_NET_NETSTAT
421 , "mcastpkts"
422 , NULL
423 , "multicast"
424 , NULL
416 - , "IPv4 Multicast Packets"
425 + , "IP Multicast Packets"
426 , "packets/s"
427 , "proc"
428 , "net/netstat"
420 - , NETDATA_CHART_PRIO_IPV4_MCAST + 10
429 + , NETDATA_CHART_PRIO_IP_MCAST + 10
430 , update_every
431 , RRDSET_TYPE_LINE
432 );
433
425 - rrdset_flag_set(st_ipv4_mcastpkts, RRDSET_FLAG_DETAIL);
434 + rrdset_flag_set(st_ip_mcastpkts, RRDSET_FLAG_DETAIL);
435
427 - rd_in = rrddim_add(st_ipv4_mcastpkts, "InMcastPkts", "received", 1, 1, RRD_ALGORITHM_INCREMENTAL);
428 - rd_out = rrddim_add(st_ipv4_mcastpkts, "OutMcastPkts", "sent", -1, 1, RRD_ALGORITHM_INCREMENTAL);
436 + rd_in = rrddim_add(st_ip_mcastpkts, "InMcastPkts", "received", 1, 1, RRD_ALGORITHM_INCREMENTAL);
437 + rd_out = rrddim_add(st_ip_mcastpkts, "OutMcastPkts", "sent", -1, 1, RRD_ALGORITHM_INCREMENTAL);
438 }
430 - else rrdset_next(st_ipv4_mcastpkts);
439 + else rrdset_next(st_ip_mcastpkts);
440
432 - rrddim_set_by_pointer(st_ipv4_mcastpkts, rd_in, ipext_InMcastPkts);
433 - rrddim_set_by_pointer(st_ipv4_mcastpkts, rd_out, ipext_OutMcastPkts);
441 + rrddim_set_by_pointer(st_ip_mcastpkts, rd_in, ipext_InMcastPkts);
442 + rrddim_set_by_pointer(st_ip_mcastpkts, rd_out, ipext_OutMcastPkts);
443
435 - rrdset_done(st_ipv4_mcastpkts);
444 + rrdset_done(st_ip_mcastpkts);
445 }
446
447 // --------------------------------------------------------------------
@@ -440,37 +449,37 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
449 if(do_bcast_p == CONFIG_BOOLEAN_YES || (do_bcast_p == CONFIG_BOOLEAN_AUTO && (ipext_InBcastPkts || ipext_OutBcastPkts))) {
450 do_bcast_p = CONFIG_BOOLEAN_YES;
451
443 - static RRDSET *st_ipv4_bcastpkts = NULL;
452 + static RRDSET *st_ip_bcastpkts = NULL;
453 static RRDDIM *rd_in = NULL, *rd_out = NULL;
454
446 - if(unlikely(!st_ipv4_bcastpkts)) {
447 - st_ipv4_bcastpkts = rrdset_create_localhost(
448 - "ipv4"
455 + if(unlikely(!st_ip_bcastpkts)) {
456 + st_ip_bcastpkts = rrdset_create_localhost(
457 + RRD_TYPE_NET_NETSTAT
458 , "bcastpkts"
459 , NULL
460 , "broadcast"
461 , NULL
453 - , "IPv4 Broadcast Packets"
462 + , "IP Broadcast Packets"
463 , "packets/s"
464 , "proc"
465 , "net/netstat"
457 - , NETDATA_CHART_PRIO_IPV4_BCAST + 10
466 + , NETDATA_CHART_PRIO_IP_BCAST + 10
467 , update_every
468 , RRDSET_TYPE_LINE
469 );
470
462 - rrdset_flag_set(st_ipv4_bcastpkts, RRDSET_FLAG_DETAIL);
471 + rrdset_flag_set(st_ip_bcastpkts, RRDSET_FLAG_DETAIL);
472
464 - rd_in = rrddim_add(st_ipv4_bcastpkts, "InBcastPkts", "received", 1, 1, RRD_ALGORITHM_INCREMENTAL);
465 - rd_out = rrddim_add(st_ipv4_bcastpkts, "OutBcastPkts", "sent", -1, 1, RRD_ALGORITHM_INCREMENTAL);
473 + rd_in = rrddim_add(st_ip_bcastpkts, "InBcastPkts", "received", 1, 1, RRD_ALGORITHM_INCREMENTAL);
474 + rd_out = rrddim_add(st_ip_bcastpkts, "OutBcastPkts", "sent", -1, 1, RRD_ALGORITHM_INCREMENTAL);
475 }
476 else
468 - rrdset_next(st_ipv4_bcastpkts);
477 + rrdset_next(st_ip_bcastpkts);
478
470 - rrddim_set_by_pointer(st_ipv4_bcastpkts, rd_in, ipext_InBcastPkts);
471 - rrddim_set_by_pointer(st_ipv4_bcastpkts, rd_out, ipext_OutBcastPkts);
479 + rrddim_set_by_pointer(st_ip_bcastpkts, rd_in, ipext_InBcastPkts);
480 + rrddim_set_by_pointer(st_ip_bcastpkts, rd_out, ipext_OutBcastPkts);
481
473 - rrdset_done(st_ipv4_bcastpkts);
482 + rrdset_done(st_ip_bcastpkts);
483 }
484
485 // --------------------------------------------------------------------
@@ -483,16 +492,16 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
492
493 if(unlikely(!st_ecnpkts)) {
494 st_ecnpkts = rrdset_create_localhost(
486 - "ipv4"
495 + RRD_TYPE_NET_NETSTAT
496 , "ecnpkts"
497 , NULL
498 , "ecn"
499 , NULL
491 - , "IPv4 ECN Statistics"
500 + , "IP ECN Statistics"
501 , "packets/s"
502 , "proc"
503 , "net/netstat"
495 - , NETDATA_CHART_PRIO_IPV4_ECN
504 + , NETDATA_CHART_PRIO_IP_ECN
505 , update_every
506 , RRDSET_TYPE_LINE
507 );
@@ -535,7 +544,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
544
545 if(unlikely(!st_tcpmemorypressures)) {
546 st_tcpmemorypressures = rrdset_create_localhost(
538 - "ipv4"
547 + RRD_TYPE_NET_NETSTAT
548 , "tcpmemorypressures"
549 , NULL
550 , "tcp"
@@ -544,7 +553,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
553 , "events/s"
554 , "proc"
555 , "net/netstat"
547 - , NETDATA_CHART_PRIO_IPV4_TCP_MEM
556 + , NETDATA_CHART_PRIO_IP_TCP_MEM
557 , update_every
558 , RRDSET_TYPE_LINE
559 );
@@ -569,7 +578,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
578
579 if(unlikely(!st_tcpconnaborts)) {
580 st_tcpconnaborts = rrdset_create_localhost(
572 - "ipv4"
581 + RRD_TYPE_NET_NETSTAT
582 , "tcpconnaborts"
583 , NULL
584 , "tcp"
@@ -578,7 +587,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
587 , "connections/s"
588 , "proc"
589 , "net/netstat"
581 - , NETDATA_CHART_PRIO_IPV4_TCP + 10
590 + , NETDATA_CHART_PRIO_IP_TCP + 10
591 , update_every
592 , RRDSET_TYPE_LINE
593 );
@@ -613,7 +622,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
622
623 if(unlikely(!st_tcpreorders)) {
624 st_tcpreorders = rrdset_create_localhost(
616 - "ipv4"
625 + RRD_TYPE_NET_NETSTAT
626 , "tcpreorders"
627 , NULL
628 , "tcp"
@@ -622,7 +631,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
631 , "packets/s"
632 , "proc"
633 , "net/netstat"
625 - , NETDATA_CHART_PRIO_IPV4_TCP + 20
634 + , NETDATA_CHART_PRIO_IP_TCP + 20
635 , update_every
636 , RRDSET_TYPE_LINE
637 );
@@ -648,13 +657,13 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
657 if(do_tcpext_ofo == CONFIG_BOOLEAN_YES || (do_tcpext_ofo == CONFIG_BOOLEAN_AUTO && (tcpext_TCPOFOQueue || tcpext_TCPOFODrop || tcpext_TCPOFOMerge))) {
658 do_tcpext_ofo = CONFIG_BOOLEAN_YES;
659
651 - static RRDSET *st_ipv4_tcpofo = NULL;
660 + static RRDSET *st_ip_tcpofo = NULL;
661 static RRDDIM *rd_inqueue = NULL, *rd_dropped = NULL, *rd_merged = NULL, *rd_pruned = NULL;
662
654 - if(unlikely(!st_ipv4_tcpofo)) {
663 + if(unlikely(!st_ip_tcpofo)) {
664
656 - st_ipv4_tcpofo = rrdset_create_localhost(
657 - "ipv4"
665 + st_ip_tcpofo = rrdset_create_localhost(
666 + RRD_TYPE_NET_NETSTAT
667 , "tcpofo"
668 , NULL
669 , "tcp"
@@ -663,25 +672,25 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
672 , "packets/s"
673 , "proc"
674 , "net/netstat"
666 - , NETDATA_CHART_PRIO_IPV4_TCP + 50
675 + , NETDATA_CHART_PRIO_IP_TCP + 50
676 , update_every
677 , RRDSET_TYPE_LINE
678 );
679
671 - rd_inqueue = rrddim_add(st_ipv4_tcpofo, "TCPOFOQueue", "inqueue", 1, 1, RRD_ALGORITHM_INCREMENTAL);
672 - rd_dropped = rrddim_add(st_ipv4_tcpofo, "TCPOFODrop", "dropped", -1, 1, RRD_ALGORITHM_INCREMENTAL);
673 - rd_merged = rrddim_add(st_ipv4_tcpofo, "TCPOFOMerge", "merged", 1, 1, RRD_ALGORITHM_INCREMENTAL);
674 - rd_pruned = rrddim_add(st_ipv4_tcpofo, "OfoPruned", "pruned", -1, 1, RRD_ALGORITHM_INCREMENTAL);
680 + rd_inqueue = rrddim_add(st_ip_tcpofo, "TCPOFOQueue", "inqueue", 1, 1, RRD_ALGORITHM_INCREMENTAL);
681 + rd_dropped = rrddim_add(st_ip_tcpofo, "TCPOFODrop", "dropped", -1, 1, RRD_ALGORITHM_INCREMENTAL);
682 + rd_merged = rrddim_add(st_ip_tcpofo, "TCPOFOMerge", "merged", 1, 1, RRD_ALGORITHM_INCREMENTAL);
683 + rd_pruned = rrddim_add(st_ip_tcpofo, "OfoPruned", "pruned", -1, 1, RRD_ALGORITHM_INCREMENTAL);
684 }
685 else
677 - rrdset_next(st_ipv4_tcpofo);
686 + rrdset_next(st_ip_tcpofo);
687
679 - rrddim_set_by_pointer(st_ipv4_tcpofo, rd_inqueue, tcpext_TCPOFOQueue);
680 - rrddim_set_by_pointer(st_ipv4_tcpofo, rd_dropped, tcpext_TCPOFODrop);
681 - rrddim_set_by_pointer(st_ipv4_tcpofo, rd_merged, tcpext_TCPOFOMerge);
682 - rrddim_set_by_pointer(st_ipv4_tcpofo, rd_pruned, tcpext_OfoPruned);
688 + rrddim_set_by_pointer(st_ip_tcpofo, rd_inqueue, tcpext_TCPOFOQueue);
689 + rrddim_set_by_pointer(st_ip_tcpofo, rd_dropped, tcpext_TCPOFODrop);
690 + rrddim_set_by_pointer(st_ip_tcpofo, rd_merged, tcpext_TCPOFOMerge);
691 + rrddim_set_by_pointer(st_ip_tcpofo, rd_pruned, tcpext_OfoPruned);
692
684 - rrdset_done(st_ipv4_tcpofo);
693 + rrdset_done(st_ip_tcpofo);
694 }
695
696 // --------------------------------------------------------------------
@@ -695,7 +704,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
704 if(unlikely(!st_syncookies)) {
705
706 st_syncookies = rrdset_create_localhost(
698 - "ipv4"
707 + RRD_TYPE_NET_NETSTAT
708 , "tcpsyncookies"
709 , NULL
710 , "tcp"
@@ -704,7 +713,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
713 , "packets/s"
714 , "proc"
715 , "net/netstat"
707 - , NETDATA_CHART_PRIO_IPV4_TCP + 60
716 + , NETDATA_CHART_PRIO_IP_TCP + 60
717 , update_every
718 , RRDSET_TYPE_LINE
719 );
@@ -725,40 +734,81 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
734
735 // --------------------------------------------------------------------
736
728 - if(do_tcpext_listen == CONFIG_BOOLEAN_YES || (do_tcpext_listen == CONFIG_BOOLEAN_AUTO && (tcpext_ListenOverflows || tcpext_ListenDrops))) {
729 - do_tcpext_listen = CONFIG_BOOLEAN_YES;
737 + if(do_tcpext_syn_queue == CONFIG_BOOLEAN_YES || (do_tcpext_syn_queue == CONFIG_BOOLEAN_AUTO && (tcpext_TCPReqQFullDrop || tcpext_TCPReqQFullDoCookies))) {
738 + do_tcpext_syn_queue = CONFIG_BOOLEAN_YES;
739
731 - static RRDSET *st_listen = NULL;
732 - static RRDDIM *rd_overflows = NULL, *rd_drops = NULL;
740 + static RRDSET *st_syn_queue = NULL;
741 + static RRDDIM
742 + *rd_TCPReqQFullDrop = NULL,
743 + *rd_TCPReqQFullDoCookies = NULL;
744
734 - if(unlikely(!st_listen)) {
745 + if(unlikely(!st_syn_queue)) {
746
736 - st_listen = rrdset_create_localhost(
737 - "ipv4"
738 - , "tcplistenissues"
747 + st_syn_queue = rrdset_create_localhost(
748 + RRD_TYPE_NET_NETSTAT
749 + , "tcp_syn_queue"
750 , NULL
751 , "tcp"
752 , NULL
742 - , "TCP Listen Socket Issues"
753 + , "TCP SYN Queue Issues"
754 , "packets/s"
755 , "proc"
756 , "net/netstat"
746 - , NETDATA_CHART_PRIO_IPV4_TCP + 15
757 + , NETDATA_CHART_PRIO_IP_TCP + 15
758 , update_every
759 , RRDSET_TYPE_LINE
760 );
761
751 - rd_overflows = rrddim_add(st_listen, "ListenOverflows", "overflows", 1, 1, RRD_ALGORITHM_INCREMENTAL);
752 - rd_drops = rrddim_add(st_listen, "ListenDrops", "drops", 1, 1, RRD_ALGORITHM_INCREMENTAL);
762 + rd_TCPReqQFullDrop = rrddim_add(st_syn_queue, "TCPReqQFullDrop", "drops", 1, 1, RRD_ALGORITHM_INCREMENTAL);
763 + rd_TCPReqQFullDoCookies = rrddim_add(st_syn_queue, "TCPReqQFullDoCookies", "cookies", 1, 1, RRD_ALGORITHM_INCREMENTAL);
764 }
765 else
755 - rrdset_next(st_listen);
766 + rrdset_next(st_syn_queue);
767
757 - rrddim_set_by_pointer(st_listen, rd_overflows, tcpext_ListenOverflows);
758 - rrddim_set_by_pointer(st_listen, rd_drops, tcpext_ListenDrops);
768 + rrddim_set_by_pointer(st_syn_queue, rd_TCPReqQFullDrop, tcpext_TCPReqQFullDrop);
769 + rrddim_set_by_pointer(st_syn_queue, rd_TCPReqQFullDoCookies, tcpext_TCPReqQFullDoCookies);
770
760 - rrdset_done(st_listen);
771 + rrdset_done(st_syn_queue);
772 }
773 +
774 + // --------------------------------------------------------------------
775 +
776 + if(do_tcpext_accept_queue == CONFIG_BOOLEAN_YES || (do_tcpext_accept_queue == CONFIG_BOOLEAN_AUTO && (tcpext_ListenOverflows || tcpext_ListenDrops))) {
777 + do_tcpext_accept_queue = CONFIG_BOOLEAN_YES;
778 +
779 + static RRDSET *st_accept_queue = NULL;
780 + static RRDDIM *rd_overflows = NULL,
781 + *rd_drops = NULL;
782 +
783 + if(unlikely(!st_accept_queue)) {
784 +
785 + st_accept_queue = rrdset_create_localhost(
786 + RRD_TYPE_NET_NETSTAT
787 + , "tcp_accept_queue"
788 + , NULL
789 + , "tcp"
790 + , NULL
791 + , "TCP Accept Queue Issues"
792 + , "packets/s"
793 + , "proc"
794 + , "net/netstat"
795 + , NETDATA_CHART_PRIO_IP_TCP + 16
796 + , update_every
797 + , RRDSET_TYPE_LINE
798 + );
799 +
800 + rd_overflows = rrddim_add(st_accept_queue, "ListenOverflows", "overflows", 1, 1, RRD_ALGORITHM_INCREMENTAL);
801 + rd_drops = rrddim_add(st_accept_queue, "ListenDrops", "drops", 1, 1, RRD_ALGORITHM_INCREMENTAL);
802 + }
803 + else
804 + rrdset_next(st_accept_queue);
805 +
806 + rrddim_set_by_pointer(st_accept_queue, rd_overflows, tcpext_ListenOverflows);
807 + rrddim_set_by_pointer(st_accept_queue, rd_drops, tcpext_ListenDrops);
808 +
809 + rrdset_done(st_accept_queue);
810 + }
811 +
812 }
813 }
814
src/proc_net_snmp.c
+7 -10
@@ -2,7 +2,7 @@
2
3 #include "common.h"
4
5 -#define RRD_TYPE_NET_SNMP "ipv4"
5 +#define RRD_TYPE_NET_SNMP "ipv4"
6
7 static struct proc_net_snmp {
8 // kernel_uint_t ip_Forwarding;
@@ -726,7 +726,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
726 , "packets/s"
727 , "proc"
728 , "net/snmp"
729 - , NETDATA_CHART_PRIO_IPV4_TCP + 10
729 + , NETDATA_CHART_PRIO_IPV4_TCP + 4
730 , update_every
731 , RRDSET_TYPE_LINE
732 );
@@ -825,8 +825,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
825 static RRDDIM *rd_EstabResets = NULL,
826 *rd_OutRsts = NULL,
827 *rd_AttemptFails = NULL,
828 - *rd_TCPSynRetrans = NULL,
829 - *rd_TCPReqQFullDrop = NULL;
828 + *rd_TCPSynRetrans = NULL;
829
830 if(unlikely(!st)) {
831 st = rrdset_create_localhost(
@@ -845,11 +844,10 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
844 );
845 rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
846
848 - rd_EstabResets = rrddim_add(st, "EstabResets", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
849 - rd_OutRsts = rrddim_add(st, "OutRsts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
850 - rd_AttemptFails = rrddim_add(st, "AttemptFails", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
851 - rd_TCPSynRetrans = rrddim_add(st, "TCPSynRetrans", "SysRetrans", 1, 1, RRD_ALGORITHM_INCREMENTAL);
852 - rd_TCPReqQFullDrop = rrddim_add(st, "TCPReqQFullDrop", "ReqQFullDrop", 1, 1, RRD_ALGORITHM_INCREMENTAL);
847 + rd_EstabResets = rrddim_add(st, "EstabResets", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
848 + rd_OutRsts = rrddim_add(st, "OutRsts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
849 + rd_AttemptFails = rrddim_add(st, "AttemptFails", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
850 + rd_TCPSynRetrans = rrddim_add(st, "TCPSynRetrans", "SynRetrans", 1, 1, RRD_ALGORITHM_INCREMENTAL);
851 }
852 else rrdset_next(st);
853
@@ -857,7 +855,6 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
855 rrddim_set_by_pointer(st, rd_OutRsts, (collected_number)snmp_root.tcp_OutRsts);
856 rrddim_set_by_pointer(st, rd_AttemptFails, (collected_number)snmp_root.tcp_AttemptFails);
857 rrddim_set_by_pointer(st, rd_TCPSynRetrans, tcpext_TCPSynRetrans);
860 - rrddim_set_by_pointer(st, rd_TCPReqQFullDrop, tcpext_TCPReqQFullDrop);
858 rrdset_done(st);
859 }
860 }
src/proc_net_snmp6.c
+22 -22
@@ -293,7 +293,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
293 , "kilobits/s"
294 , "proc"
295 , "net/snmp6"
296 - , 502
296 + , NETDATA_CHART_PRIO_SYSTEM_IPV6
297 , update_every
298 , RRDSET_TYPE_AREA
299 );
@@ -329,7 +329,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
329 , "packets/s"
330 , "proc"
331 , "net/snmp6"
332 - , 3000
332 + , NETDATA_CHART_PRIO_IPV6_PACKETS
333 , update_every
334 , RRDSET_TYPE_LINE
335 );
@@ -368,7 +368,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
368 , "packets/s"
369 , "proc"
370 , "net/snmp6"
371 - , 3011
371 + , NETDATA_CHART_PRIO_IPV6_FRAGMENTS + 1
372 , update_every
373 , RRDSET_TYPE_LINE
374 );
@@ -414,7 +414,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
414 , "packets/s"
415 , "proc"
416 , "net/snmp6"
417 - , 3012
417 + , NETDATA_CHART_PRIO_IPV6_FRAGMENTS + 2
418 , update_every
419 , RRDSET_TYPE_LINE);
420 rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
@@ -469,7 +469,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
469 , "packets/s"
470 , "proc"
471 , "net/snmp6"
472 - , 3002
472 + , NETDATA_CHART_PRIO_IPV6_ERRORS
473 , update_every
474 , RRDSET_TYPE_LINE
475 );
@@ -518,7 +518,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
518 , "packets/s"
519 , "proc"
520 , "net/snmp6"
521 - , 3601
521 + , NETDATA_CHART_PRIO_IPV6_UDP + 1
522 , update_every
523 , RRDSET_TYPE_LINE
524 );
@@ -564,7 +564,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
564 , "events/s"
565 , "proc"
566 , "net/snmp6"
567 - , 3701
567 + , NETDATA_CHART_PRIO_IPV6_UDP_ERRORS
568 , update_every
569 , RRDSET_TYPE_LINE
570 );
@@ -607,7 +607,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
607 , "packets/s"
608 , "proc"
609 , "net/snmp6"
610 - , 3602
610 + , NETDATA_CHART_PRIO_IPV6_UDPLITE + 1
611 , update_every
612 , RRDSET_TYPE_LINE
613 );
@@ -652,7 +652,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
652 , "events/s"
653 , "proc"
654 , "net/snmp6"
655 - , 3701
655 + , NETDATA_CHART_PRIO_IPV6_UDPLITE_ERRORS
656 , update_every
657 , RRDSET_TYPE_LINE
658 );
@@ -693,7 +693,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
693 , "kilobits/s"
694 , "proc"
695 , "net/snmp6"
696 - , 9000
696 + , NETDATA_CHART_PRIO_IPV6_MCAST
697 , update_every
698 , RRDSET_TYPE_AREA
699 );
@@ -728,7 +728,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
728 , "kilobits/s"
729 , "proc"
730 , "net/snmp6"
731 - , 8000
731 + , NETDATA_CHART_PRIO_IPV6_BCAST
732 , update_every
733 , RRDSET_TYPE_AREA
734 );
@@ -763,7 +763,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
763 , "packets/s"
764 , "proc"
765 , "net/snmp6"
766 - , 9500
766 + , NETDATA_CHART_PRIO_IPV6_MCAST + 1
767 , update_every
768 , RRDSET_TYPE_LINE
769 );
@@ -798,7 +798,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
798 , "messages/s"
799 , "proc"
800 , "net/snmp6"
801 - , 10000
801 + , NETDATA_CHART_PRIO_IPV6_ICMP
802 , update_every
803 , RRDSET_TYPE_LINE
804 );
@@ -832,7 +832,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
832 , "redirects/s"
833 , "proc"
834 , "net/snmp6"
835 - , 10050
835 + , NETDATA_CHART_PRIO_IPV6_ICMP + 10
836 , update_every
837 , RRDSET_TYPE_LINE
838 );
@@ -888,7 +888,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
888 , "errors/s"
889 , "proc"
890 , "net/snmp6"
891 - , 10100
891 + , NETDATA_CHART_PRIO_IPV6_ICMP + 20
892 , update_every
893 , RRDSET_TYPE_LINE
894 );
@@ -948,7 +948,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
948 , "messages/s"
949 , "proc"
950 , "net/snmp6"
951 - , 10200
951 + , NETDATA_CHART_PRIO_IPV6_ICMP + 30
952 , update_every
953 , RRDSET_TYPE_LINE
954 );
@@ -998,7 +998,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
998 , "messages/s"
999 , "proc"
1000 , "net/snmp6"
1001 - , 10300
1001 + , NETDATA_CHART_PRIO_IPV6_ICMP + 40
1002 , update_every
1003 , RRDSET_TYPE_LINE);
1004
@@ -1047,7 +1047,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
1047 , "messages/s"
1048 , "proc"
1049 , "net/snmp6"
1050 - , 10400
1050 + , NETDATA_CHART_PRIO_IPV6_ICMP + 50
1051 , update_every
1052 , RRDSET_TYPE_LINE
1053 );
@@ -1093,7 +1093,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
1093 , "messages/s"
1094 , "proc"
1095 , "net/snmp6"
1096 - , 10500
1096 + , NETDATA_CHART_PRIO_IPV6_ICMP + 60
1097 , update_every
1098 , RRDSET_TYPE_LINE
1099 );
@@ -1131,7 +1131,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
1131 , "reports/s"
1132 , "proc"
1133 , "net/snmp6"
1134 - , 10600
1134 + , NETDATA_CHART_PRIO_IPV6_ICMP + 70
1135 , update_every
1136 , RRDSET_TYPE_LINE
1137 );
@@ -1185,7 +1185,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
1185 , "messages/s"
1186 , "proc"
1187 , "net/snmp6"
1188 - , 10700
1188 + , NETDATA_CHART_PRIO_IPV6_ICMP + 80
1189 , update_every
1190 , RRDSET_TYPE_LINE
1191 );
@@ -1243,7 +1243,7 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
1243 , "packets/s"
1244 , "proc"
1245 , "net/snmp6"
1246 - , 10800
1246 + , NETDATA_CHART_PRIO_IPV6_PACKETS + 10
1247 , update_every
1248 , RRDSET_TYPE_LINE
1249 );
src/proc_net_sockstat6.c
+5 -5
@@ -126,7 +126,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
126 , "sockets"
127 , "proc"
128 , "net/sockstat6"
129 - , 3599
129 + , NETDATA_CHART_PRIO_IPV6_TCP
130 , update_every
131 , RRDSET_TYPE_LINE
132 );
@@ -158,7 +158,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
158 , "sockets"
159 , "proc"
160 , "net/sockstat6"
161 - , 3600
161 + , NETDATA_CHART_PRIO_IPV6_UDP
162 , update_every
163 , RRDSET_TYPE_LINE
164 );
@@ -190,7 +190,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
190 , "sockets"
191 , "proc"
192 , "net/sockstat6"
193 - , 3601
193 + , NETDATA_CHART_PRIO_IPV6_UDPLITE
194 , update_every
195 , RRDSET_TYPE_LINE
196 );
@@ -222,7 +222,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
222 , "sockets"
223 , "proc"
224 , "net/sockstat6"
225 - , 3700
225 + , NETDATA_CHART_PRIO_IPV6_RAW
226 , update_every
227 , RRDSET_TYPE_LINE
228 );
@@ -254,7 +254,7 @@ int do_proc_net_sockstat6(int update_every, usec_t dt) {
254 , "fragments"
255 , "proc"
256 , "net/sockstat6"
257 - , 3010
257 + , NETDATA_CHART_PRIO_IPV6_FRAGMENTS
258 , update_every
259 , RRDSET_TYPE_LINE
260 );
web/dashboard.html
+12 -12
@@ -105,7 +105,7 @@ They also have mouse-hover support.
105 <small>rendered in <span id="time101">X</span> ms</small>
106 </div>
107 <div style="width: 33%; display: inline-block;">
108 - <div data-netdata="system.ipv4"
108 + <div data-netdata="system.net"
109 data-chart-library="sparkline"
110 data-width="100%"
111 data-height="30"
@@ -147,7 +147,7 @@ the total of all dimensions.
147 <small>rendered in <span id="time001">X</span> ms</small>
148 </div>
149 <div style="width: 33%; display: inline-block;">
150 - <div data-netdata="system.ipv4"
150 + <div data-netdata="system.net"
151 data-chart-library="peity"
152 data-width="100%"
153 data-height="30"
@@ -188,7 +188,7 @@ Sparklines using dygraphs
188 data-after="-300"
189 ></div>
190 are also possible! This
191 - <div data-netdata="system.ipv4"
191 + <div data-netdata="system.net"
192 data-chart-library="dygraph"
193 data-dygraph-theme="sparkline"
194 data-legend="no"
@@ -221,7 +221,7 @@ Sparklines using dygraphs
221 <small>rendered in <span id="time501">X</span> ms</small>
222 </div>
223 <div style="width: 33%; display: inline-block;">
224 - <div data-netdata="system.ipv4"
224 + <div data-netdata="system.net"
225 data-chart-library="dygraph"
226 data-dygraph-theme="sparkline"
227 data-width="100%"
@@ -260,7 +260,7 @@ Sparklines using dygraphs
260 <small>rendered in <span id="time201">X</span> ms</small>
261 </div>
262 <div style="width: 33%; display: inline-block;">
263 - <div data-netdata="system.ipv4"
263 + <div data-netdata="system.net"
264 data-chart-library="dygraph"
265 data-width="100%"
266 data-height="200"
@@ -381,7 +381,7 @@ Sparklines using dygraphs
381 </div>
382 <div style="width: 33%; display: inline-block;">
383 <div style="display: inline-block; position: relative;">
384 - <div data-netdata="system.ipv4"
384 + <div data-netdata="system.net"
385 data-chart-library="easypiechart"
386 data-width="200"
387 data-height="200"
@@ -393,7 +393,7 @@ Sparklines using dygraphs
393 <small>rendered in <span id="time602">X</span> ms</small>
394 </div>
395 <div style="display: inline-block; position: relative;">
396 - <div data-netdata="system.ipv4"
396 + <div data-netdata="system.net"
397 data-chart-library="easypiechart"
398 data-width="100"
399 data-height="100"
@@ -464,7 +464,7 @@ Sparklines using dygraphs
464 </div>
465 <div style="width: 33%; display: inline-block;">
466 <div style="display: inline-block; position: relative;">
467 - <div data-netdata="system.ipv4"
467 + <div data-netdata="system.net"
468 data-chart-library="gauge"
469 data-width="250"
470 data-height="200"
@@ -476,7 +476,7 @@ Sparklines using dygraphs
476 <small>rendered in <span id="time702">X</span> ms</small>
477 </div>
478 <div style="display: inline-block; position: relative;">
479 - <div data-netdata="system.ipv4"
479 + <div data-netdata="system.net"
480 data-chart-library="gauge"
481 data-width="125"
482 data-height="100"
@@ -533,7 +533,7 @@ NetData is a complete Google Visualization API provider.
533 <small>rendered in <span id="time301">X</span> ms</small>
534 </div>
535 <div style="width: 33%; display: inline-block;">
536 - <div data-netdata="system.ipv4"
536 + <div data-netdata="system.net"
537 data-chart-library="google"
538 data-width="100%"
539 data-height="200"
@@ -576,7 +576,7 @@ Unfortunatelly, Morris Charts are very slow. Here we force them to lower their d
576 <small>rendered in <span id="time401">X</span> ms</small>
577 </div>
578 <div style="width: 33%; display: inline-block;">
579 - <div data-netdata="system.ipv4"
579 + <div data-netdata="system.net"
580 data-chart-library="morris"
581 data-width="100%"
582 data-height="200"
@@ -622,7 +622,7 @@ So, to avoid flashing the charts, we destroy and re-create the charts on each up
622 <small>rendered in <span id="time801">X</span> ms</small>
623 </div>
624 <div style="width: 33%; display: inline-block;">
625 - <div data-netdata="system.ipv4"
625 + <div data-netdata="system.net"
626 data-chart-library="c3"
627 data-width="100%"
628 data-height="200"
web/dashboard_info.js
+50 -9
@@ -47,6 +47,17 @@ netdataDashboard.menu = {
47 info: 'Performance metrics for network interfaces.'
48 },
49
50 + 'ip': {
51 + title: 'Networking Stack',
52 + icon: '<i class="fas fa-cloud"></i>',
53 + info: function (os) {
54 + if(os === "linux")
55 + return 'Metrics for the networking stack of the system. These metrics are collected from <code>/proc/net/netstat</code>, apply to both IPv4 and IPv6 traffic and are related to operation of the kernel networking stack.';
56 + else
57 + return 'Metrics for the networking stack of the system.';
58 + }
59 + },
60 +
61 'ipv4': {
62 title: 'IPv4 Networking',
63 icon: '<i class="fas fa-cloud"></i>',
@@ -501,7 +512,7 @@ netdataDashboard.submenu = {
512 info: 'Non-Uniform Memory Access (NUMA) is a hierarchical memory design the memory access time is dependent on locality. Under NUMA, a processor can access its own local memory faster than non-local memory (memory local to another processor or memory shared between processors). The individual metrics are described in the <a href="https://www.kernel.org/doc/Documentation/numastat.txt" target="_blank">Linux kernel documentation</a>.'
513 },
514
504 - 'ipv4.ecn': {
515 + 'ip.ecn': {
516 info: '<a href="https://en.wikipedia.org/wiki/Explicit_Congestion_Notification" target="_blank">Explicit Congestion Notification (ECN)</a> is a TCP extension that allows end-to-end notification of network congestion without dropping packets. ECN is an optional feature that may be used between two ECN-enabled endpoints when the underlying network infrastructure also supports it.'
517 },
518
@@ -687,6 +698,10 @@ netdataDashboard.context = {
698 }
699 },
700
701 + 'system.ip': {
702 + info: 'Total IP traffic in the system.'
703 + },
704 +
705 'system.ipv4': {
706 info: 'Total IPv4 Traffic.'
707 },
@@ -796,16 +811,47 @@ netdataDashboard.context = {
811 },
812
813 // ------------------------------------------------------------------------
799 - // IPv4
814 + // IP
815 +
816 + 'ip.inerrors': {
817 + info: 'Errors encountered during the reception of IP packets. ' +
818 + '<code>noroutes</code> (<code>InNoRoutes</code>) counts packets that were dropped because there was no route to send them. ' +
819 + '<code>truncated</code> (<code>InTruncatedPkts</code>) counts packets which is being discarded because the datagram frame didn\'t carry enough data. ' +
820 + '<code>checksum</code> (<code>InCsumErrors</code>) counts packets that were dropped because they had wrong checksum. '
821 + },
822
801 - 'ipv4.tcpmemorypressures': {
823 + 'ip.tcpmemorypressures': {
824 info: 'Number of times a socket was put in <b>memory pressure</b> due to a non fatal memory allocation failure (the kernel attempts to work around this situation by reducing the send buffers, etc).'
825 },
826
805 - 'ipv4.tcpconnaborts': {
827 + 'ip.tcpconnaborts': {
828 info: 'TCP connection aborts. <b>baddata</b> (<code>TCPAbortOnData</code>) happens while the connection is on <code>FIN_WAIT1</code> and the kernel receives a packet with a sequence number beyond the last one for this connection - the kernel responds with <code>RST</code> (closes the connection). <b>userclosed</b> (<code>TCPAbortOnClose</code>) happens when the kernel receives data on an already closed connection and responds with <code>RST</code>. <b>nomemory</b> (<code>TCPAbortOnMemory</code> happens when there are too many orphaned sockets (not attached to an fd) and the kernel has to drop a connection - sometimes it will send an <code>RST</code>, sometimes it won\'t. <b>timeout</b> (<code>TCPAbortOnTimeout</code>) happens when a connection times out. <b>linger</b> (<code>TCPAbortOnLinger</code>) happens when the kernel killed a socket that was already closed by the application and lingered around for long enough. <b>failed</b> (<code>TCPAbortFailed</code>) happens when the kernel attempted to send an <code>RST</code> but failed because there was no memory available.'
829 },
830
831 + 'ip.tcp_syn_queue': {
832 + info: 'The <b>SYN queue</b> of the kernel tracks TCP handshakes until connections get fully established. ' +
833 + 'It overflows when too many incoming TCP connection requests hang in the half-open state and the server ' +
834 + 'is not configured to fall back to SYN cookies*. Overflows are usually caused by SYN flood DoS attacks ' +
835 + '(i.e. someone sends lots of SYN packets and never completes the handshakes). ' +
836 + '<b>drops</b> (or <code>TcpExtTCPReqQFullDrop</code>) is the number of connections dropped because the ' +
837 + 'SYN queue was full and SYN cookies were disabled. ' +
838 + '<b>cookies</b> (or <code>TcpExtTCPReqQFullDoCookies</code>) is the number of SYN cookies sent because the ' +
839 + 'SYN queue was full.'
840 + },
841 +
842 + 'ip.tcp_accept_queue': {
843 + info: 'The <b>accept queue</b> of the kernel holds the fully established TCP connections, waiting to be handled ' +
844 + 'by the listening application. <b>overflows</b> (or <code>ListenOverflows</code>) is the number of ' +
845 + 'established connections that could not be handled because the receive queue of the listening application ' +
846 + 'was full. <b>drops</b> (or <code>ListenDrops</code>) is the number of incoming ' +
847 + 'connections that could not be handled, including SYN floods, overflows, out of memory, security issues, ' +
848 + 'no route to destination, reception of related ICMP messages, socket is broadcast or multicast.'
849 + },
850 +
851 +
852 + // ------------------------------------------------------------------------
853 + // IPv4
854 +
855 'ipv4.tcpsock': {
856 info: 'The number of established TCP connections (known as <code>CurrEstab</code>). This is a snapshot of the established connections at the time of measurement (i.e. a connection established and a connection disconnected within the same iteration will not affect this metric).'
857 },
@@ -828,11 +874,6 @@ netdataDashboard.context = {
874 + ' <code>TCPSynRetrans</code> shows retries for new outbound TCP connections, which can indicate general connectivity issues or backlog on the remote host.'
875 },
876
831 - 'ipv4.tcplistenissues': {
832 - info: '<b>overflows</b> (or <code>ListenOverflows</code>) is the number of incoming connections that could not be handled because the receive queue of the application was full (for both IPv4 and IPv6).'
833 - + ' <b>drops</b> (or <code>ListenDrops</code>) is the number of incoming connections that could not be handled, including SYN floods, overflows, out of memory, security issues, no route to destination, reception of related ICMP messages, socket is broadcast or multicast (for both IPv4 and IPv6).'
834 - },
835 -
877 // ------------------------------------------------------------------------
878 // APPS
879
web/index.html
+24 -1
@@ -1773,6 +1773,29 @@
1773 + ' data-common-units="system.net.mainhead"'
1774 + ' role="application"></div>';
1775 }
1776 + else if(typeof charts['system.ip'] !== 'undefined') {
1777 + head += '<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ip"'
1778 + + ' data-dimensions="received"'
1779 + + ' data-chart-library="easypiechart"'
1780 + + ' data-title="IP Inbound"'
1781 + + ' data-width="11%"'
1782 + + ' data-before="0"'
1783 + + ' data-after="-' + duration.toString() + '"'
1784 + + ' data-points="' + duration.toString() + '"'
1785 + + ' data-common-units="system.ip.mainhead"'
1786 + + ' role="application"></div>';
1787 +
1788 + head += '<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ip"'
1789 + + ' data-dimensions="sent"'
1790 + + ' data-chart-library="easypiechart"'
1791 + + ' data-title="IP Outbound"'
1792 + + ' data-width="11%"'
1793 + + ' data-before="0"'
1794 + + ' data-after="-' + duration.toString() + '"'
1795 + + ' data-points="' + duration.toString() + '"'
1796 + + ' data-common-units="system.ip.mainhead"'
1797 + + ' role="application"></div>';
1798 + }
1799 else if(typeof charts['system.ipv4'] !== 'undefined') {
1800 head += '<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv4"'
1801 + ' data-dimensions="received"'
@@ -4434,7 +4457,7 @@
4457 });
4458
4459 NETDATA.requiredJs.push({
4437 - url: NETDATA.serverStatic + 'dashboard_info.js?v20180922-1',
4460 + url: NETDATA.serverStatic + 'dashboard_info.js?v20180926-3',
4461 async: false,
4462 isAlreadyLoaded: function() { return false; }
4463 });
web/tv.html
+4 -4
@@ -147,18 +147,18 @@ setTimeout(function(){
147 <b>IPv4 traffic on both servers</b>
148 </div>
149 <div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
150 - <div data-netdata="system.ipv4"
150 + <div data-netdata="system.net"
151 data-host="http://registry.my-netdata.io"
152 data-common-max="traffic"
153 data-common-min="traffic"
154 - data-title="IPv4 traffic on registry.my-netdata.io"
154 + data-title="Network traffic on registry.my-netdata.io"
155 data-chart-library="dygraph"
156 data-width="49%"
157 data-height="100%"
158 data-after="-300"
159 ></div>
160 - <div data-netdata="system.ipv4"
161 - data-title="IPv4 traffic on your netdata server"
160 + <div data-netdata="system.net"
161 + data-title="Network traffic on your netdata server"
162 data-common-max="traffic"
163 data-common-min="traffic"
164 data-chart-library="dygraph"