@cryptotaxi247 / netdata-1 / commits / 31ae4f083

added SCTP monitoring; fixes #1218

Costa Tsaousis (ktsaou) committed May 10, 2018 at 03:04 UTC 31ae4f08360b018630a37418273395e43c2a65a3
12 files changed +431 -33
CMakeLists.txt
+1
@@ -49,6 +49,7 @@ set(NETDATA_LINUX_FILES
49 src/proc_net_rpc_nfsd.c
50 src/proc_net_snmp.c
51 src/proc_net_snmp6.c
52 + src/proc_net_sctp_snmp.c
53 src/proc_net_sockstat.c
54 src/proc_net_sockstat6.c
55 src/proc_net_softnet_stat.c
src/Makefile.am
+1
@@ -194,6 +194,7 @@ netdata_SOURCES += \
194 proc_net_rpc_nfsd.c \
195 proc_net_snmp.c \
196 proc_net_snmp6.c \
197 + proc_net_sctp_snmp.c \
198 proc_net_sockstat.c \
199 proc_net_sockstat6.c \
200 proc_net_softnet_stat.c \
src/common.h
+39
@@ -144,6 +144,8 @@
144 // - for each FAMILY +100
145 // - for each CHART +10
146
147 +#define NETDATA_CHART_PRIO_SYSTEM_IPV4 501
148 +
149 // Memory Section - 1xxx
150 #define NETDATA_CHART_PRIO_MEM_SYSTEM 1000
151 #define NETDATA_CHART_PRIO_MEM_SYSTEM_AVAILABLE 1010
@@ -157,6 +159,43 @@
159 #define NETDATA_CHART_PRIO_MEM_HW 1500
160
161
162 +// IPv4
163 +
164 +#define NETDATA_CHART_PRIO_IPV4 3000
165 +#define NETDATA_CHART_PRIO_IPV4_SOCKETS 3000
166 +#define NETDATA_CHART_PRIO_IPV4_ERRORS 3120
167 +
168 +#define NETDATA_CHART_PRIO_IPV4_TCP 3200
169 +#define NETDATA_CHART_PRIO_IPV4_TCP_MEM 3290
170 +
171 +#define NETDATA_CHART_PRIO_IPV4_UDP 3300
172 +#define NETDATA_CHART_PRIO_IPV4_UDP_MEM 3390
173 +
174 +#define NETDATA_CHART_PRIO_IPV4_UDPLITE 3400
175 +
176 +#define NETDATA_CHART_PRIO_IPV4_RAW 3450
177 +
178 +#define NETDATA_CHART_PRIO_IPV4_FRAGMENTS 3460
179 +#define NETDATA_CHART_PRIO_IPV4_FRAGMENTS_MEM 3470
180 +
181 +#define NETDATA_CHART_PRIO_IPV4_BCAST 3500
182 +#define NETDATA_CHART_PRIO_IPV4_MCAST 3600
183 +#define NETDATA_CHART_PRIO_IPV4_ECN 3700
184 +
185 +// IPv6
186 +
187 +#define NETDATA_CHART_PRIO_IPV6 3500
188 +
189 +// SCTP
190 +
191 +#define NETDATA_CHART_PRIO_SCTP 3600
192 +
193 +// Netfilter
194 +
195 +#define NETDATA_CHART_PRIO_NETFILTER 3700
196 +#define NETDATA_CHART_PRIO_SYNPROXY 3750
197 +
198 +
199 // ----------------------------------------------------------------------------
200 // netdata common definitions
201
src/plugin_proc.c
+1
@@ -37,6 +37,7 @@ static struct proc_module {
37 { .name = "/proc/net/netstat", .dim = "netstat", .func = do_proc_net_netstat }, // this has to be before /proc/net/snmp, because there is a shared metric
38 { .name = "/proc/net/snmp", .dim = "snmp", .func = do_proc_net_snmp },
39 { .name = "/proc/net/snmp6", .dim = "snmp6", .func = do_proc_net_snmp6 },
40 + { .name = "/proc/net/sctp/snmp", .dim = "sctp", .func = do_proc_net_sctp_snmp },
41 { .name = "/proc/net/softnet_stat", .dim = "softnet", .func = do_proc_net_softnet_stat },
42 { .name = "/proc/net/ip_vs/stats", .dim = "ipvs", .func = do_proc_net_ip_vs_stats },
43
src/plugin_proc.h
+1
@@ -29,6 +29,7 @@ extern int do_proc_spl_kstat_zfs_arcstats(int update_every, usec_t dt);
29 extern int do_sys_fs_btrfs(int update_every, usec_t dt);
30 extern int do_proc_net_sockstat(int update_every, usec_t dt);
31 extern int do_proc_net_sockstat6(int update_every, usec_t dt);
32 +extern int do_proc_net_sctp_snmp(int update_every, usec_t dt);
33
34 extern int get_numa_node_count(void);
35
src/proc_net_netstat.c
+13 -13
@@ -262,7 +262,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
262 , "kilobits/s"
263 , "proc"
264 , "net/netstat"
265 - , 501
265 + , NETDATA_CHART_PRIO_SYSTEM_IPV4
266 , update_every
267 , RRDSET_TYPE_AREA
268 );
@@ -297,7 +297,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
297 , "packets/s"
298 , "proc"
299 , "net/netstat"
300 - , 4000
300 + , NETDATA_CHART_PRIO_IPV4_ERRORS
301 , update_every
302 , RRDSET_TYPE_LINE
303 );
@@ -336,7 +336,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
336 , "kilobits/s"
337 , "proc"
338 , "net/netstat"
339 - , 9000
339 + , NETDATA_CHART_PRIO_IPV4_MCAST
340 , update_every
341 , RRDSET_TYPE_AREA
342 );
@@ -374,7 +374,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
374 , "kilobits/s"
375 , "proc"
376 , "net/netstat"
377 - , 8000
377 + , NETDATA_CHART_PRIO_IPV4_BCAST
378 , update_every
379 , RRDSET_TYPE_AREA
380 );
@@ -412,7 +412,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
412 , "packets/s"
413 , "proc"
414 , "net/netstat"
415 - , 8600
415 + , NETDATA_CHART_PRIO_IPV4_MCAST + 10
416 , update_every
417 , RRDSET_TYPE_LINE
418 );
@@ -449,7 +449,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
449 , "packets/s"
450 , "proc"
451 , "net/netstat"
452 - , 8500
452 + , NETDATA_CHART_PRIO_IPV4_BCAST + 10
453 , update_every
454 , RRDSET_TYPE_LINE
455 );
@@ -487,7 +487,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
487 , "packets/s"
488 , "proc"
489 , "net/netstat"
490 - , 8700
490 + , NETDATA_CHART_PRIO_IPV4_ECN
491 , update_every
492 , RRDSET_TYPE_LINE
493 );
@@ -539,7 +539,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
539 , "events/s"
540 , "proc"
541 , "net/netstat"
542 - , 3000
542 + , NETDATA_CHART_PRIO_IPV4_TCP_MEM
543 , update_every
544 , RRDSET_TYPE_LINE
545 );
@@ -573,7 +573,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
573 , "connections/s"
574 , "proc"
575 , "net/netstat"
576 - , 3010
576 + , NETDATA_CHART_PRIO_IPV4_TCP + 10
577 , update_every
578 , RRDSET_TYPE_LINE
579 );
@@ -617,7 +617,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
617 , "packets/s"
618 , "proc"
619 , "net/netstat"
620 - , 3020
620 + , NETDATA_CHART_PRIO_IPV4_TCP + 20
621 , update_every
622 , RRDSET_TYPE_LINE
623 );
@@ -658,7 +658,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
658 , "packets/s"
659 , "proc"
660 , "net/netstat"
661 - , 3050
661 + , NETDATA_CHART_PRIO_IPV4_TCP + 50
662 , update_every
663 , RRDSET_TYPE_LINE
664 );
@@ -699,7 +699,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
699 , "packets/s"
700 , "proc"
701 , "net/netstat"
702 - , 3100
702 + , NETDATA_CHART_PRIO_IPV4_TCP + 60
703 , update_every
704 , RRDSET_TYPE_LINE
705 );
@@ -738,7 +738,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
738 , "packets/s"
739 , "proc"
740 , "net/netstat"
741 - , 3015
741 + , NETDATA_CHART_PRIO_IPV4_TCP + 15
742 , update_every
743 , RRDSET_TYPE_LINE
744 );
src/proc_net_sctp_snmp.c new
+349
@@ -0,0 +1,349 @@
1 +#include "common.h"
2 +
3 +int do_proc_net_sctp_snmp(int update_every, usec_t dt) {
4 + (void)dt;
5 +
6 + static procfile *ff = NULL;
7 +
8 + static int
9 + do_associations = -1,
10 + do_transitions = -1,
11 + do_packet_errors = -1,
12 + do_packets = -1,
13 + do_fragmentation = -1,
14 + do_chunk_types = -1;
15 +
16 + static ARL_BASE *arl_base = NULL;
17 +
18 + static unsigned long long SctpCurrEstab = 0ULL;
19 + static unsigned long long SctpActiveEstabs = 0ULL;
20 + static unsigned long long SctpPassiveEstabs = 0ULL;
21 + static unsigned long long SctpAborteds = 0ULL;
22 + static unsigned long long SctpShutdowns = 0ULL;
23 + static unsigned long long SctpOutOfBlues = 0ULL;
24 + static unsigned long long SctpChecksumErrors = 0ULL;
25 + static unsigned long long SctpOutCtrlChunks = 0ULL;
26 + static unsigned long long SctpOutOrderChunks = 0ULL;
27 + static unsigned long long SctpOutUnorderChunks = 0ULL;
28 + static unsigned long long SctpInCtrlChunks = 0ULL;
29 + static unsigned long long SctpInOrderChunks = 0ULL;
30 + static unsigned long long SctpInUnorderChunks = 0ULL;
31 + static unsigned long long SctpFragUsrMsgs = 0ULL;
32 + static unsigned long long SctpReasmUsrMsgs = 0ULL;
33 + static unsigned long long SctpOutSCTPPacks = 0ULL;
34 + static unsigned long long SctpInSCTPPacks = 0ULL;
35 + static unsigned long long SctpT1InitExpireds = 0ULL;
36 + static unsigned long long SctpT1CookieExpireds = 0ULL;
37 + static unsigned long long SctpT2ShutdownExpireds = 0ULL;
38 + static unsigned long long SctpT3RtxExpireds = 0ULL;
39 + static unsigned long long SctpT4RtoExpireds = 0ULL;
40 + static unsigned long long SctpT5ShutdownGuardExpireds = 0ULL;
41 + static unsigned long long SctpDelaySackExpireds = 0ULL;
42 + static unsigned long long SctpAutocloseExpireds = 0ULL;
43 + static unsigned long long SctpT3Retransmits = 0ULL;
44 + static unsigned long long SctpPmtudRetransmits = 0ULL;
45 + static unsigned long long SctpFastRetransmits = 0ULL;
46 + static unsigned long long SctpInPktSoftirq = 0ULL;
47 + static unsigned long long SctpInPktBacklog = 0ULL;
48 + static unsigned long long SctpInPktDiscards = 0ULL;
49 + static unsigned long long SctpInDataChunkDiscards = 0ULL;
50 +
51 + if(unlikely(!arl_base)) {
52 + do_associations = config_get_boolean_ondemand("plugin:proc:/proc/net/sctp/snmp", "established associations", CONFIG_BOOLEAN_AUTO);
53 + do_transitions = config_get_boolean_ondemand("plugin:proc:/proc/net/sctp/snmp", "association transitions", CONFIG_BOOLEAN_AUTO);
54 + do_fragmentation = config_get_boolean_ondemand("plugin:proc:/proc/net/sctp/snmp", "fragmentation", CONFIG_BOOLEAN_AUTO);
55 + do_packets = config_get_boolean_ondemand("plugin:proc:/proc/net/sctp/snmp", "packets", CONFIG_BOOLEAN_AUTO);
56 + do_packet_errors = config_get_boolean_ondemand("plugin:proc:/proc/net/sctp/snmp", "packet errors", CONFIG_BOOLEAN_AUTO);
57 + do_chunk_types = config_get_boolean_ondemand("plugin:proc:/proc/net/sctp/snmp", "chunk types", CONFIG_BOOLEAN_AUTO);
58 +
59 + arl_base = arl_create("sctp", NULL, 60);
60 + arl_expect(arl_base, "SctpCurrEstab", &SctpCurrEstab);
61 + arl_expect(arl_base, "SctpActiveEstabs", &SctpActiveEstabs);
62 + arl_expect(arl_base, "SctpPassiveEstabs", &SctpPassiveEstabs);
63 + arl_expect(arl_base, "SctpAborteds", &SctpAborteds);
64 + arl_expect(arl_base, "SctpShutdowns", &SctpShutdowns);
65 + arl_expect(arl_base, "SctpOutOfBlues", &SctpOutOfBlues);
66 + arl_expect(arl_base, "SctpChecksumErrors", &SctpChecksumErrors);
67 + arl_expect(arl_base, "SctpOutCtrlChunks", &SctpOutCtrlChunks);
68 + arl_expect(arl_base, "SctpOutOrderChunks", &SctpOutOrderChunks);
69 + arl_expect(arl_base, "SctpOutUnorderChunks", &SctpOutUnorderChunks);
70 + arl_expect(arl_base, "SctpInCtrlChunks", &SctpInCtrlChunks);
71 + arl_expect(arl_base, "SctpInOrderChunks", &SctpInOrderChunks);
72 + arl_expect(arl_base, "SctpInUnorderChunks", &SctpInUnorderChunks);
73 + arl_expect(arl_base, "SctpFragUsrMsgs", &SctpFragUsrMsgs);
74 + arl_expect(arl_base, "SctpReasmUsrMsgs", &SctpReasmUsrMsgs);
75 + arl_expect(arl_base, "SctpOutSCTPPacks", &SctpOutSCTPPacks);
76 + arl_expect(arl_base, "SctpInSCTPPacks", &SctpInSCTPPacks);
77 + arl_expect(arl_base, "SctpT1InitExpireds", &SctpT1InitExpireds);
78 + arl_expect(arl_base, "SctpT1CookieExpireds", &SctpT1CookieExpireds);
79 + arl_expect(arl_base, "SctpT2ShutdownExpireds", &SctpT2ShutdownExpireds);
80 + arl_expect(arl_base, "SctpT3RtxExpireds", &SctpT3RtxExpireds);
81 + arl_expect(arl_base, "SctpT4RtoExpireds", &SctpT4RtoExpireds);
82 + arl_expect(arl_base, "SctpT5ShutdownGuardExpireds", &SctpT5ShutdownGuardExpireds);
83 + arl_expect(arl_base, "SctpDelaySackExpireds", &SctpDelaySackExpireds);
84 + arl_expect(arl_base, "SctpAutocloseExpireds", &SctpAutocloseExpireds);
85 + arl_expect(arl_base, "SctpT3Retransmits", &SctpT3Retransmits);
86 + arl_expect(arl_base, "SctpPmtudRetransmits", &SctpPmtudRetransmits);
87 + arl_expect(arl_base, "SctpFastRetransmits", &SctpFastRetransmits);
88 + arl_expect(arl_base, "SctpInPktSoftirq", &SctpInPktSoftirq);
89 + arl_expect(arl_base, "SctpInPktBacklog", &SctpInPktBacklog);
90 + arl_expect(arl_base, "SctpInPktDiscards", &SctpInPktDiscards);
91 + arl_expect(arl_base, "SctpInDataChunkDiscards", &SctpInDataChunkDiscards);
92 + }
93 +
94 + if(unlikely(!ff)) {
95 + char filename[FILENAME_MAX + 1];
96 + snprintfz(filename, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/proc/net/sctp/snmp");
97 + ff = procfile_open(config_get("plugin:proc:/proc/net/sctp/snmp", "filename to monitor", filename), " \t:", PROCFILE_FLAG_DEFAULT);
98 + if(unlikely(!ff))
99 + return 1;
100 + }
101 +
102 + ff = procfile_readall(ff);
103 + if(unlikely(!ff))
104 + return 0; // we return 0, so that we will retry to open it next time
105 +
106 + size_t lines = procfile_lines(ff), l;
107 +
108 + arl_begin(arl_base);
109 +
110 + for(l = 0; l < lines ;l++) {
111 + size_t words = procfile_linewords(ff, l);
112 + if(unlikely(words < 2)) {
113 + if(unlikely(words)) error("Cannot read /proc/net/sctp/snmp line %zu. Expected 2 params, read %zu.", l, words);
114 + continue;
115 + }
116 +
117 + if(unlikely(arl_check(arl_base,
118 + procfile_lineword(ff, l, 0),
119 + procfile_lineword(ff, l, 1)))) break;
120 + }
121 +
122 + // --------------------------------------------------------------------
123 +
124 + if(do_associations == CONFIG_BOOLEAN_YES || (do_associations == CONFIG_BOOLEAN_AUTO && SctpCurrEstab)) {
125 + do_associations = CONFIG_BOOLEAN_YES;
126 + static RRDSET *st = NULL;
127 + static RRDDIM *rd_established = NULL;
128 +
129 + if(unlikely(!st)) {
130 + st = rrdset_create_localhost(
131 + "sctp"
132 + , "established"
133 + , NULL
134 + , "associations"
135 + , NULL
136 + , "SCTP current total number of established associations"
137 + , "associations"
138 + , "proc"
139 + , "net/sctp/snmp"
140 + , NETDATA_CHART_PRIO_SCTP
141 + , update_every
142 + , RRDSET_TYPE_LINE
143 + );
144 +
145 + rd_established = rrddim_add(st, "SctpCurrEstab", "established", 1, 1, RRD_ALGORITHM_ABSOLUTE);
146 + }
147 + else rrdset_next(st);
148 +
149 + rrddim_set_by_pointer(st, rd_established, SctpCurrEstab);
150 + rrdset_done(st);
151 + }
152 +
153 + // --------------------------------------------------------------------
154 +
155 + if(do_transitions == CONFIG_BOOLEAN_YES || (do_transitions == CONFIG_BOOLEAN_AUTO && (SctpActiveEstabs || SctpPassiveEstabs || SctpAborteds || SctpShutdowns))) {
156 + do_transitions = CONFIG_BOOLEAN_YES;
157 + static RRDSET *st = NULL;
158 + static RRDDIM *rd_active = NULL,
159 + *rd_passive = NULL,
160 + *rd_aborted = NULL,
161 + *rd_shutdown = NULL;
162 +
163 + if(unlikely(!st)) {
164 + st = rrdset_create_localhost(
165 + "sctp"
166 + , "transitions"
167 + , NULL
168 + , "transitions"
169 + , NULL
170 + , "SCTP Association Transitions"
171 + , "transitions/s"
172 + , "proc"
173 + , "net/sctp/snmp"
174 + , NETDATA_CHART_PRIO_SCTP + 10
175 + , update_every
176 + , RRDSET_TYPE_LINE
177 + );
178 +
179 + rd_active = rrddim_add(st, "SctpActiveEstabs", "active", 1, 1, RRD_ALGORITHM_INCREMENTAL);
180 + rd_passive = rrddim_add(st, "SctpPassiveEstabs", "passive", 1, 1, RRD_ALGORITHM_INCREMENTAL);
181 + rd_aborted = rrddim_add(st, "SctpAborteds", "aborted", -1, 1, RRD_ALGORITHM_INCREMENTAL);
182 + rd_shutdown = rrddim_add(st, "SctpShutdowns", "shutdown", -1, 1, RRD_ALGORITHM_INCREMENTAL);
183 + }
184 + else rrdset_next(st);
185 +
186 + rrddim_set_by_pointer(st, rd_active, SctpActiveEstabs);
187 + rrddim_set_by_pointer(st, rd_passive, SctpPassiveEstabs);
188 + rrddim_set_by_pointer(st, rd_aborted, SctpAborteds);
189 + rrddim_set_by_pointer(st, rd_shutdown, SctpShutdowns);
190 + rrdset_done(st);
191 + }
192 +
193 + // --------------------------------------------------------------------
194 +
195 + if(do_packets == CONFIG_BOOLEAN_YES || (do_packets == CONFIG_BOOLEAN_AUTO && (SctpInSCTPPacks || SctpOutSCTPPacks))) {
196 + do_packets = CONFIG_BOOLEAN_YES;
197 + static RRDSET *st = NULL;
198 + static RRDDIM *rd_received = NULL,
199 + *rd_sent = NULL;
200 +
201 + if(unlikely(!st)) {
202 + st = rrdset_create_localhost(
203 + "sctp"
204 + , "packets"
205 + , NULL
206 + , "packets"
207 + , NULL
208 + , "SCTP Packets"
209 + , "packets/s"
210 + , "proc"
211 + , "net/sctp/snmp"
212 + , NETDATA_CHART_PRIO_SCTP + 20
213 + , update_every
214 + , RRDSET_TYPE_LINE
215 + );
216 + rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
217 +
218 + rd_received = rrddim_add(st, "SctpInSCTPPacks", "received", 1, 1, RRD_ALGORITHM_INCREMENTAL);
219 + rd_sent = rrddim_add(st, "SctpOutSCTPPacks", "sent", 1, 1, RRD_ALGORITHM_INCREMENTAL);
220 + }
221 + else rrdset_next(st);
222 +
223 + rrddim_set_by_pointer(st, rd_received, SctpInSCTPPacks);
224 + rrddim_set_by_pointer(st, rd_sent, SctpOutSCTPPacks);
225 + rrdset_done(st);
226 + }
227 +
228 + // --------------------------------------------------------------------
229 +
230 + if(do_packet_errors == CONFIG_BOOLEAN_YES || (do_packet_errors == CONFIG_BOOLEAN_AUTO && (SctpOutOfBlues || SctpChecksumErrors))) {
231 + do_packet_errors = CONFIG_BOOLEAN_YES;
232 + static RRDSET *st = NULL;
233 + static RRDDIM *rd_invalid = NULL,
234 + *rd_csum = NULL;
235 +
236 + if(unlikely(!st)) {
237 + st = rrdset_create_localhost(
238 + "sctp"
239 + , "packet_errors"
240 + , NULL
241 + , "packets"
242 + , NULL
243 + , "SCTP Packet Errors"
244 + , "packets/s"
245 + , "proc"
246 + , "net/sctp/snmp"
247 + , NETDATA_CHART_PRIO_SCTP + 30
248 + , update_every
249 + , RRDSET_TYPE_LINE
250 + );
251 + rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
252 +
253 + rd_invalid = rrddim_add(st, "SctpOutOfBlues", "invalid", 1, 1, RRD_ALGORITHM_INCREMENTAL);
254 + rd_csum = rrddim_add(st, "SctpChecksumErrors", "checksum", 1, 1, RRD_ALGORITHM_INCREMENTAL);
255 + }
256 + else rrdset_next(st);
257 +
258 + rrddim_set_by_pointer(st, rd_invalid, SctpOutOfBlues);
259 + rrddim_set_by_pointer(st, rd_csum, SctpChecksumErrors);
260 + rrdset_done(st);
261 + }
262 +
263 + // --------------------------------------------------------------------
264 +
265 + if(do_fragmentation == CONFIG_BOOLEAN_YES || (do_fragmentation == CONFIG_BOOLEAN_AUTO && (SctpFragUsrMsgs || SctpReasmUsrMsgs))) {
266 + do_fragmentation = CONFIG_BOOLEAN_YES;
267 +
268 + static RRDSET *st = NULL;
269 + static RRDDIM *rd_fragmented = NULL,
270 + *rd_reassembled = NULL;
271 +
272 + if(unlikely(!st)) {
273 + st = rrdset_create_localhost(
274 + "sctp"
275 + , "fragmentation"
276 + , NULL
277 + , "fragmentation"
278 + , NULL
279 + , "SCTP Fragmentation"
280 + , "packets/s"
281 + , "proc"
282 + , "net/sctp/snmp"
283 + , NETDATA_CHART_PRIO_SCTP + 40
284 + , update_every
285 + , RRDSET_TYPE_LINE);
286 + rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
287 +
288 + rd_reassembled = rrddim_add(st, "SctpReasmUsrMsgs", "reassembled", 1, 1, RRD_ALGORITHM_INCREMENTAL);
289 + rd_fragmented = rrddim_add(st, "SctpFragUsrMsgs", "fragmented", -1, 1, RRD_ALGORITHM_INCREMENTAL);
290 + }
291 + else rrdset_next(st);
292 +
293 + rrddim_set_by_pointer(st, rd_reassembled, SctpReasmUsrMsgs);
294 + rrddim_set_by_pointer(st, rd_fragmented, SctpFragUsrMsgs);
295 + rrdset_done(st);
296 + }
297 +
298 + // --------------------------------------------------------------------
299 +
300 + if(do_chunk_types == CONFIG_BOOLEAN_YES || (do_chunk_types == CONFIG_BOOLEAN_AUTO
301 + && (SctpInCtrlChunks || SctpInOrderChunks || SctpInUnorderChunks || SctpOutCtrlChunks || SctpOutOrderChunks || SctpOutUnorderChunks))) {
302 + do_chunk_types = CONFIG_BOOLEAN_YES;
303 + static RRDSET *st = NULL;
304 + static RRDDIM
305 + *rd_InCtrl = NULL,
306 + *rd_InOrder = NULL,
307 + *rd_InUnorder = NULL,
308 + *rd_OutCtrl = NULL,
309 + *rd_OutOrder = NULL,
310 + *rd_OutUnorder = NULL;
311 +
312 + if(unlikely(!st)) {
313 + st = rrdset_create_localhost(
314 + "sctp"
315 + , "chunks"
316 + , NULL
317 + , "chunks"
318 + , NULL
319 + , "SCTP Chunk Types"
320 + , "chunks/s"
321 + , "proc"
322 + , "net/sctp/snmp"
323 + , NETDATA_CHART_PRIO_SCTP + 50
324 + , update_every
325 + , RRDSET_TYPE_LINE
326 + );
327 + rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
328 +
329 + rd_InCtrl = rrddim_add(st, "SctpInCtrlChunks", "InCtrl", 1, 1, RRD_ALGORITHM_INCREMENTAL);
330 + rd_InOrder = rrddim_add(st, "SctpInOrderChunks", "InOrder", 1, 1, RRD_ALGORITHM_INCREMENTAL);
331 + rd_InUnorder = rrddim_add(st, "SctpInUnorderChunks", "InUnorder", 1, 1, RRD_ALGORITHM_INCREMENTAL);
332 + rd_OutCtrl = rrddim_add(st, "SctpOutCtrlChunks", "OutCtrl", -1, 1, RRD_ALGORITHM_INCREMENTAL);
333 + rd_OutOrder = rrddim_add(st, "SctpOutOrderChunks", "OutOrder", -1, 1, RRD_ALGORITHM_INCREMENTAL);
334 + rd_OutUnorder = rrddim_add(st, "SctpOutUnorderChunks", "OutUnorder", -1, 1, RRD_ALGORITHM_INCREMENTAL);
335 + }
336 + else rrdset_next(st);
337 +
338 + rrddim_set_by_pointer(st, rd_InCtrl, SctpInCtrlChunks);
339 + rrddim_set_by_pointer(st, rd_InOrder, SctpInOrderChunks);
340 + rrddim_set_by_pointer(st, rd_InUnorder, SctpInUnorderChunks);
341 + rrddim_set_by_pointer(st, rd_OutCtrl, SctpOutCtrlChunks);
342 + rrddim_set_by_pointer(st, rd_OutOrder, SctpOutOrderChunks);
343 + rrddim_set_by_pointer(st, rd_OutUnorder, SctpOutUnorderChunks);
344 + rrdset_done(st);
345 + }
346 +
347 + return 0;
348 +}
349 +
src/proc_net_sockstat.c
+9 -9
@@ -231,7 +231,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
231 , "sockets"
232 , "proc"
233 , "net/sockstat"
234 - , 2400
234 + , NETDATA_CHART_PRIO_IPV4_SOCKETS
235 , update_every
236 , RRDSET_TYPE_LINE
237 );
@@ -266,7 +266,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
266 , "sockets"
267 , "proc"
268 , "net/sockstat"
269 - , 2500
269 + , NETDATA_CHART_PRIO_IPV4_TCP + 1
270 , update_every
271 , RRDSET_TYPE_LINE
272 );
@@ -304,7 +304,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
304 , "KB"
305 , "proc"
306 , "net/sockstat"
307 - , 4000
307 + , NETDATA_CHART_PRIO_IPV4_TCP_MEM
308 , update_every
309 , RRDSET_TYPE_AREA
310 );
@@ -336,7 +336,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
336 , "sockets"
337 , "proc"
338 , "net/sockstat"
339 - , 2600
339 + , NETDATA_CHART_PRIO_IPV4_UDP
340 , update_every
341 , RRDSET_TYPE_LINE
342 );
@@ -368,7 +368,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
368 , "KB"
369 , "proc"
370 , "net/sockstat"
371 - , 2603
371 + , NETDATA_CHART_PRIO_IPV4_UDP_MEM
372 , update_every
373 , RRDSET_TYPE_AREA
374 );
@@ -400,7 +400,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
400 , "sockets"
401 , "proc"
402 , "net/sockstat"
403 - , 2602
403 + , NETDATA_CHART_PRIO_IPV4_UDPLITE
404 , update_every
405 , RRDSET_TYPE_LINE
406 );
@@ -432,7 +432,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
432 , "sockets"
433 , "proc"
434 , "net/sockstat"
435 - , 3010
435 + , NETDATA_CHART_PRIO_IPV4_RAW
436 , update_every
437 , RRDSET_TYPE_LINE
438 );
@@ -464,7 +464,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
464 , "fragments"
465 , "proc"
466 , "net/sockstat"
467 - , 3010
467 + , NETDATA_CHART_PRIO_IPV4_FRAGMENTS
468 , update_every
469 , RRDSET_TYPE_LINE
470 );
@@ -496,7 +496,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
496 , "KB"
497 , "proc"
498 , "net/sockstat"
499 - , 3020
499 + , NETDATA_CHART_PRIO_IPV4_FRAGMENTS_MEM
500 , update_every
501 , RRDSET_TYPE_AREA
502 );
src/proc_net_stat_conntrack.c
+6 -6
@@ -142,7 +142,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
142 , "active connections"
143 , "proc"
144 , "net/stat/nf_conntrack"
145 - , 3000
145 + , NETDATA_CHART_PRIO_NETFILTER
146 , update_every
147 , RRDSET_TYPE_LINE
148 );
@@ -175,7 +175,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
175 , "connections/s"
176 , "proc"
177 , "net/stat/nf_conntrack"
178 - , 3001
178 + , NETDATA_CHART_PRIO_NETFILTER + 1
179 , update_every
180 , RRDSET_TYPE_LINE
181 );
@@ -212,7 +212,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
212 , "changes/s"
213 , "proc"
214 , "net/stat/nf_conntrack"
215 - , 3002
215 + , NETDATA_CHART_PRIO_NETFILTER + 2
216 , update_every
217 , RRDSET_TYPE_LINE
218 );
@@ -249,7 +249,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
249 , "expectations/s"
250 , "proc"
251 , "net/stat/nf_conntrack"
252 - , 3003
252 + , NETDATA_CHART_PRIO_NETFILTER + 3
253 , update_every
254 , RRDSET_TYPE_LINE
255 );
@@ -286,7 +286,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
286 , "searches/s"
287 , "proc"
288 , "net/stat/nf_conntrack"
289 - , 3010
289 + , NETDATA_CHART_PRIO_NETFILTER + 10
290 , update_every
291 , RRDSET_TYPE_LINE
292 );
@@ -324,7 +324,7 @@ int do_proc_net_stat_conntrack(int update_every, usec_t dt) {
324 , "events/s"
325 , "proc"
326 , "net/stat/nf_conntrack"
327 - , 3005
327 + , NETDATA_CHART_PRIO_NETFILTER + 5
328 , update_every
329 , RRDSET_TYPE_LINE
330 );
src/proc_net_stat_synproxy.c
+4 -4
@@ -70,7 +70,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
70 , "entries"
71 , "proc"
72 , "net/stat/synproxy"
73 - , 3304
73 + , NETDATA_CHART_PRIO_SYNPROXY + 4
74 , update_every
75 , RRDSET_TYPE_LINE
76 );
@@ -100,7 +100,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
100 , "SYN/s"
101 , "proc"
102 , "net/stat/synproxy"
103 - , 3301
103 + , NETDATA_CHART_PRIO_SYNPROXY + 1
104 , update_every
105 , RRDSET_TYPE_LINE
106 );
@@ -130,7 +130,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
130 , "connections/s"
131 , "proc"
132 , "net/stat/synproxy"
133 - , 3303
133 + , NETDATA_CHART_PRIO_SYNPROXY + 3
134 , update_every
135 , RRDSET_TYPE_LINE
136 );
@@ -160,7 +160,7 @@ int do_proc_net_stat_synproxy(int update_every, usec_t dt) {
160 , "cookies/s"
161 , "proc"
162 , "net/stat/synproxy"
163 - , 3302
163 + , NETDATA_CHART_PRIO_SYNPROXY + 2
164 , update_every
165 , RRDSET_TYPE_LINE
166 );
web/dashboard_info.js
+6
@@ -49,6 +49,12 @@ netdataDashboard.menu = {
49 info: 'Metrics for the IPv6 stack of the system. <a href="https://en.wikipedia.org/wiki/IPv6" target="_blank">Internet Protocol version 6 (IPv6)</a> is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion. IPv6 is intended to replace IPv4.'
50 },
51
52 + 'sctp': {
53 + title: 'Stream Control Protocol',
54 + icon: '<i class="fas fa-cloud"></i>',
55 + info: '<a href="https://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol" target="_blank">Stream Control Transmission Protocol (SCTP)</a> is a computer network protocol which operates at the transport layer and serves a role similar to the popular protocols TCP and UDP. SCTP provides some of the features of both UDP and TCP: it is message-oriented like UDP and ensures reliable, in-sequence transport of messages with congestion control like TCP. It differs from those protocols by providing multi-homing and redundant paths to increase resilience and reliability.'
56 + },
57 +
58 'ipvs': {
59 title: 'IP Virtual Server',
60 icon: '<i class="fas fa-eye"></i>',
web/index.html
+1 -1
@@ -4403,7 +4403,7 @@
4403 });
4404
4405 NETDATA.requiredJs.push({
4406 - url: NETDATA.serverStatic + 'dashboard_info.js?v20180507-1',
4406 + url: NETDATA.serverStatic + 'dashboard_info.js?v20180510-2',
4407 async: false,
4408 isAlreadyLoaded: function() { return false; }
4409 });