collect TcpExtTCPReqQFullDrop; #3234 (#4246)
Costa Tsaousis committed
Sep 23, 2018 at 02:26 UTC
daaa9cd82fb31bf4413fa0d9e451f6ab31c8bbf1
3 files changed
+17
-10
src/plugin_proc.h
+1
@@ -37,6 +37,7 @@ 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;
41
42
// netdev renames
43
extern void netdev_rename_device_add(const char *host_device, const char *container_device, const char *container_name);
src/proc_net_netstat.c
+4
-1
@@ -2,7 +2,8 @@
2
3
#include "common.h"
4
5
-unsigned long long tcpext_TCPSynRetrans;
5
+unsigned long long tcpext_TCPSynRetrans = 0;
6
+unsigned long long tcpext_TCPReqQFullDrop = 0;
7
8
static void parse_line_pair(procfile *ff, ARL_BASE *base, size_t header_line, size_t values_line) {
9
size_t hwords = procfile_linewords(ff, header_line);
@@ -104,6 +105,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
105
// IPv4 TCP memory pressures
106
static unsigned long long tcpext_TCPMemoryPressures = 0;
107
108
+ // shared tcpext_TCPReqQFullDrop
109
// shared: tcpext_TCPSynRetrans
110
111
@@ -213,6 +215,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
215
216
// shared metrics
217
arl_expect(arl_tcpext, "TCPSynRetrans", &tcpext_TCPSynRetrans);
218
+ arl_expect(arl_tcpext, "TCPReqQFullDrop", &tcpext_TCPReqQFullDrop);
219
}
220
221
if(unlikely(!ff)) {
src/proc_net_snmp.c
+12
-9
@@ -825,7 +825,8 @@ 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;
828
+ *rd_TCPSynRetrans = NULL,
829
+ *rd_TCPReqQFullDrop = NULL;
830
831
if(unlikely(!st)) {
832
st = rrdset_create_localhost(
@@ -844,17 +845,19 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
845
);
846
rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
847
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", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
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);
853
}
854
else rrdset_next(st);
855
854
- rrddim_set_by_pointer(st, rd_EstabResets, (collected_number)snmp_root.tcp_EstabResets);
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);
856
+ rrddim_set_by_pointer(st, rd_EstabResets, (collected_number)snmp_root.tcp_EstabResets);
857
+ rrddim_set_by_pointer(st, rd_OutRsts, (collected_number)snmp_root.tcp_OutRsts);
858
+ rrddim_set_by_pointer(st, rd_AttemptFails, (collected_number)snmp_root.tcp_AttemptFails);
859
+ rrddim_set_by_pointer(st, rd_TCPSynRetrans, tcpext_TCPSynRetrans);
860
+ rrddim_set_by_pointer(st, rd_TCPReqQFullDrop, tcpext_TCPReqQFullDrop);
861
rrdset_done(st);
862
}
863
}