From 55783753ae8f2d857a7225b7a93c1d47039e5a90 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 16 Apr 2018 10:30:15 +0200 Subject: OpenShift monitoring --- remote/check_server_traffic.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 remote/check_server_traffic.sh (limited to 'remote/check_server_traffic.sh') diff --git a/remote/check_server_traffic.sh b/remote/check_server_traffic.sh new file mode 100755 index 0000000..a9f0abf --- /dev/null +++ b/remote/check_server_traffic.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +all_in=`iptables -L traffic_in -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'` +all_out=`iptables -L traffic_out -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'` +all_forward=`iptables -L traffic_forward -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'` + +echo "$all_in $all_out $all_forward" -- cgit v1.2.3