summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@tsaousis.gr>2018-09-23 02:26:19 +0300
committerGitHub <noreply@github.com>2018-09-23 02:26:19 +0300
commitdaaa9cd82fb31bf4413fa0d9e451f6ab31c8bbf1 (patch)
tree67d406b83c3eeae735fac85dc6242cd4579388c2
parentc01f8ea930f821b377879df3970c16e9c1ebfe6f (diff)
collect TcpExtTCPReqQFullDrop; #3234 (#4246)
-rw-r--r--src/plugin_proc.h1
-rw-r--r--src/proc_net_netstat.c5
-rw-r--r--src/proc_net_snmp.c21
3 files changed, 17 insertions, 10 deletions
diff --git a/src/plugin_proc.h b/src/plugin_proc.h
index 27d6aa63db..6f976b693b 100644
--- a/src/plugin_proc.h
+++ b/src/plugin_proc.h
@@ -37,6 +37,7 @@ extern int get_numa_node_count(void);
// metrics that need to be shared among data collectors
extern unsigned long long tcpext_TCPSynRetrans;
+extern unsigned long long tcpext_TCPReqQFullDrop;
// netdev renames
extern void netdev_rename_device_add(const char *host_device, const char *container_device, const char *container_name);
diff --git a/src/proc_net_netstat.c b/src/proc_net_netstat.c
index a84d664888..965164a215 100644
--- a/src/proc_net_netstat.c
+++ b/src/proc_net_netstat.c
@@ -2,7 +2,8 @@
#include "common.h"
-unsigned long long tcpext_TCPSynRetrans;
+unsigned long long tcpext_TCPSynRetrans = 0;
+unsigned long long tcpext_TCPReqQFullDrop = 0;
static void parse_line_pair(procfile *ff, ARL_BASE *base, size_t header_line, size_t values_line) {
size_t hwords = procfile_linewords(ff, header_line);
@@ -104,6 +105,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// IPv4 TCP memory pressures
static unsigned long long tcpext_TCPMemoryPressures = 0;
+ // shared tcpext_TCPReqQFullDrop
// shared: tcpext_TCPSynRetrans
@@ -213,6 +215,7 @@ int do_proc_net_netstat(int update_every, usec_t dt) {
// shared metrics
arl_expect(arl_tcpext, "TCPSynRetrans", &tcpext_TCPSynRetrans);
+ arl_expect(arl_tcpext, "TCPReqQFullDrop", &tcpext_TCPReqQFullDrop);
}
if(unlikely(!ff)) {
diff --git a/src/proc_net_snmp.c b/src/proc_net_snmp.c
index 76af527e90..5ce0271b85 100644
--- a/src/proc_net_snmp.c
+++ b/src/proc_net_snmp.c
@@ -825,7 +825,8 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
static RRDDIM *rd_EstabResets = NULL,
*rd_OutRsts = NULL,
*rd_AttemptFails = NULL,
- *rd_TCPSynRetrans = NULL;
+ *rd_TCPSynRetrans = NULL,
+ *rd_TCPReqQFullDrop = NULL;
if(unlikely(!st)) {
st = rrdset_create_localhost(
@@ -844,17 +845,19 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
);
rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
- rd_EstabResets = rrddim_add(st, "EstabResets", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
- rd_OutRsts = rrddim_add(st, "OutRsts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
- rd_AttemptFails = rrddim_add(st, "AttemptFails", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
- rd_TCPSynRetrans = rrddim_add(st, "TCPSynRetrans", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
+ rd_EstabResets = rrddim_add(st, "EstabResets", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
+ rd_OutRsts = rrddim_add(st, "OutRsts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
+ rd_AttemptFails = rrddim_add(st, "AttemptFails", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
+ rd_TCPSynRetrans = rrddim_add(st, "TCPSynRetrans", "SysRetrans", 1, 1, RRD_ALGORITHM_INCREMENTAL);
+ rd_TCPReqQFullDrop = rrddim_add(st, "TCPReqQFullDrop", "ReqQFullDrop", 1, 1, RRD_ALGORITHM_INCREMENTAL);
}
else rrdset_next(st);
- rrddim_set_by_pointer(st, rd_EstabResets, (collected_number)snmp_root.tcp_EstabResets);
- rrddim_set_by_pointer(st, rd_OutRsts, (collected_number)snmp_root.tcp_OutRsts);
- rrddim_set_by_pointer(st, rd_AttemptFails, (collected_number)snmp_root.tcp_AttemptFails);
- rrddim_set_by_pointer(st, rd_TCPSynRetrans, tcpext_TCPSynRetrans);
+ rrddim_set_by_pointer(st, rd_EstabResets, (collected_number)snmp_root.tcp_EstabResets);
+ rrddim_set_by_pointer(st, rd_OutRsts, (collected_number)snmp_root.tcp_OutRsts);
+ rrddim_set_by_pointer(st, rd_AttemptFails, (collected_number)snmp_root.tcp_AttemptFails);
+ rrddim_set_by_pointer(st, rd_TCPSynRetrans, tcpext_TCPSynRetrans);
+ rrddim_set_by_pointer(st, rd_TCPReqQFullDrop, tcpext_TCPReqQFullDrop);
rrdset_done(st);
}
}