Don't have to use awk to extract the name if we restrict the fields.

This commit is contained in:
Ask Solem 2009-06-18 15:47:06 +02:00
parent 706c91ea22
commit 80b2fda42e
5 changed files with 10 additions and 15 deletions

View File

@ -29,10 +29,9 @@ fi
# graphs should look. # graphs should look.
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUE_STATUS=$(sudo rabbitmqctl list_queues -p $VHOST | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done.$') grep -v 'done\.$')
QUEUES=$(echo $QUEUE_STATUS | awk '{print $1}')
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-100} QUEUE_WARN=${queue_warn:-100}

View File

@ -29,10 +29,9 @@ fi
# graphs should look. # graphs should look.
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUE_STATUS=$(sudo rabbitmqctl list_queues -p $VHOST | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done.$') grep -v 'done\.$')
QUEUES=$(echo $QUEUE_STATUS | awk '{print $1}')
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-10000} QUEUE_WARN=${queue_warn:-10000}

View File

@ -29,10 +29,9 @@ fi
# graphs should look. # graphs should look.
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUE_STATUS=$(sudo rabbitmqctl list_queues -p $VHOST | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done.$') grep -v 'done\.$')
QUEUES=$(echo $QUEUE_STATUS | awk '{print $1}')
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-10000} QUEUE_WARN=${queue_warn:-10000}

View File

@ -29,10 +29,9 @@ fi
# graphs should look. # graphs should look.
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUE_STATUS=$(sudo rabbitmqctl list_queues -p $VHOST | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done.$') grep -v 'done\.$')
QUEUES=$(echo $QUEUE_STATUS | awk '{print $1}')
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-10000} QUEUE_WARN=${queue_warn:-10000}

View File

@ -29,10 +29,9 @@ fi
# graphs should look. # graphs should look.
VHOST=${vhost:-"/"} VHOST=${vhost:-"/"}
QUEUE_STATUS=$(sudo rabbitmqctl list_queues -p $VHOST | \ QUEUES=$(sudo rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \ grep -v '^Listing' | \
grep -v 'done.$') grep -v 'done\.$')
QUEUES=$(echo $QUEUE_STATUS | awk '{print $1}')
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
QUEUE_WARN=${queue_warn:-10000} QUEUE_WARN=${queue_warn:-10000}