diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-04-09 00:19:05 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-04-09 00:19:05 +0300 |
commit | 31a1faf7ad89b66a68b0ac548f1c9a9dfc3c37af (patch) | |
tree | 8f85820d3cd8080051d305c40cf8c2a52e24aec9 /src/plugin_proc.c | |
parent | 0636114786d767a72eed227c629af1b882bf6d33 (diff) |
new feature: added data collection for SYNPROXY - netfilter TCP anti-DDoS protection; renamed the conntrack and nfacct charts to group them under netfilter; updated the dashboard for netfilter;
Diffstat (limited to 'src/plugin_proc.c')
-rw-r--r-- | src/plugin_proc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugin_proc.c b/src/plugin_proc.c index c0ed40cd0b..4cd20afc56 100644 --- a/src/plugin_proc.c +++ b/src/plugin_proc.c @@ -47,6 +47,7 @@ void *proc_main(void *ptr) int vdo_proc_net_netstat = !config_get_boolean("plugin:proc", "/proc/net/netstat", 1); int vdo_proc_net_stat_conntrack = !config_get_boolean("plugin:proc", "/proc/net/stat/conntrack", 1); int vdo_proc_net_ip_vs_stats = !config_get_boolean("plugin:proc", "/proc/net/ip_vs/stats", 1); + int vdo_proc_net_stat_synproxy = !config_get_boolean("plugin:proc", "/proc/net/stat/synproxy", 1); int vdo_proc_stat = !config_get_boolean("plugin:proc", "/proc/stat", 1); int vdo_proc_meminfo = !config_get_boolean("plugin:proc", "/proc/meminfo", 1); int vdo_proc_vmstat = !config_get_boolean("plugin:proc", "/proc/vmstat", 1); @@ -66,6 +67,7 @@ void *proc_main(void *ptr) unsigned long long sutime_proc_net_netstat = 0ULL; unsigned long long sutime_proc_net_stat_conntrack = 0ULL; unsigned long long sutime_proc_net_ip_vs_stats = 0ULL; + unsigned long long sutime_proc_net_stat_synproxy = 0ULL; unsigned long long sutime_proc_stat = 0ULL; unsigned long long sutime_proc_meminfo = 0ULL; unsigned long long sutime_proc_vmstat = 0ULL; @@ -194,6 +196,14 @@ void *proc_main(void *ptr) } if(unlikely(netdata_exit)) break; + if(!vdo_proc_net_stat_synproxy) { + debug(D_PROCNETDEV_LOOP, "PROCNETDEV: calling vdo_proc_net_stat_synproxy()."); + sunow = sutime(); + vdo_proc_net_stat_synproxy = do_proc_net_stat_synproxy(rrd_update_every, (sutime_proc_net_stat_synproxy > 0)?sunow - sutime_proc_net_stat_synproxy:0ULL); + sutime_proc_net_stat_synproxy = sunow; + } + if(unlikely(netdata_exit)) break; + if(!vdo_proc_stat) { debug(D_PROCNETDEV_LOOP, "PROCNETDEV: calling do_proc_stat()."); sunow = sutime(); |