From ea1e17cc518849d23083374dc003d4e3a355a596 Mon Sep 17 00:00:00 2001 From: Joan Perez i Cauhe Date: Sat, 1 Jan 2011 01:20:28 +0100 Subject: [PATCH] Now the correct value is added --- plugins/other/nginx_vhost_traffic | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/other/nginx_vhost_traffic b/plugins/other/nginx_vhost_traffic index 439111ae..ea1e3485 100755 --- a/plugins/other/nginx_vhost_traffic +++ b/plugins/other/nginx_vhost_traffic @@ -70,14 +70,14 @@ export VHOSTS export AGGREGATE # Awk Script -$LOGTAIL ${ACCESS_LOG} $STATEFILE | awk ' +$LOGTAIL ${ACCESS_LOG} -o $STATEFILE | awk ' BEGIN { split(ENVIRON["VHOSTS"], hosts) for (host in hosts) { track[hosts[host]] = host} } { - cn[$2]+=ENVIRON["BPARAM"] + cn[$2]+=$ENVIRON["BPARAM"] } END { for (host in cn) { @@ -100,4 +100,4 @@ END { print "agregate: " ENVIRON["AGGREGATE"] for (vhost in track) print "vhost" track[vhost] ".value " res[vhost]+0 print "rest.value " rest + 0 -}' \ No newline at end of file +}'